layout.html.haml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. !!! 5
  2. %html
  3. %head{lang: current_page.data.language}
  4. %meta{charset: 'utf-8'}
  5. %meta{content: 'IE=edge', 'http-equiv' => 'X-UA-Compatible'}
  6. %meta{name: 'viewport', content: 'width=device-width, initial-scale=1.0'}
  7. %meta{name: 'description', content: current_page.data.description}
  8. -# Open Graph
  9. %meta{property: 'og:article:publisher', content: config.publisher_url}
  10. %meta{property: 'og:title', content: current_page.data.title}
  11. %meta{property: 'og:type', content: 'article'}
  12. %meta{property: 'og:url', content: path_to_url(current_page.url)}
  13. %meta{property: 'og:description', content: current_page.data.description}
  14. = yield_content :og
  15. -# Icons
  16. %link{rel: 'canonical', href: path_to_url(current_page.url)}
  17. %title= current_page.data.title
  18. = stylesheet_link_tag '//fonts.googleapis.com/css?family=Carrois+Gothic|Source+Code+Pro:400,700'
  19. = stylesheet_link_tag 'application'
  20. :javascript
  21. try{Typekit.load();}catch(e){}
  22. %body
  23. %article
  24. %header{role: "banner"}
  25. %nav.locales{role: "navigation"}
  26. %ul
  27. - $languages.each do |language|
  28. %li= link_to "#{language.last} [#{language.first}]", "/#{language.first}/",
  29. { rel: "alternate", lang: "#{language}", hreflang: "#{language}" }
  30. .main{role: "main"}= yield
  31. %footer.clearfix{role: "banner"}
  32. %p.license
  33. This project is
  34. #{link_to "MIT Licensed", "http://choosealicense.com/licenses/mit/"}.
  35. %p.about
  36. #{link_to "Typed", "https://github.com/olivierlacan/keep-a-changelog/"}
  37. with trepidation by
  38. #{link_to "Olivier Lacan", "http://olivierlacan.com/"} from
  39. #{link_to "Code School", "https://www.codeschool.com/"}.
  40. - unless config.gauges_id.blank?
  41. :javascript
  42. var _gauges = _gauges || [];
  43. (function() {
  44. var t = document.createElement('script');
  45. t.type = 'text/javascript';
  46. t.async = true;
  47. t.id = 'gauges-tracker';
  48. t.setAttribute('data-site-id', '#{config.gauges_id}');
  49. t.src = '//secure.gaug.es/track.js';
  50. var s = document.getElementsByTagName('script')[0];
  51. s.parentNode.insertBefore(t, s);
  52. })();