fablabbcn/fablabs

View on GitHub
app/views/application/_head.html.haml

Summary

Maintainability
Test Coverage
%head
  %title= content_for?(:title) ? "#{yield(:title)} | FabLabs" : "FabLabs.io - The Fab Lab Network"
  %base{:target => "_parent"}
  %meta{ :charset => "utf-8" }
  %meta{ name: "viewport", content: "width=device-width, initial-scale=1.0, user-scalable=no" }
  %meta{content: (content_for?(:title) ? "#{yield(:title)} | FabLabs" : "FabLabs.io - The Fab Lab Network"), property: "og:title"}/
  %meta{content: "FabLabs.io - The Fab Lab Network", property: "og:site_name"}/
  %meta{content: request.url, property: "og:url"}/
  - if content_for?(:meta)
    = yield(:meta)
  - else
    %meta{content: "https://www.fablabs.io/logo.jpg", property: "og:image"}/
    %meta{content: "A platform for connecting Fab Labs and their users from around the world.", property: "og:description"}/
  %meta{content: "1349222175", property: "fb:admins"}/

  = javascript_include_tag "application", "data-turbolinks-track" => true

  %link{rel: "canonical", href: "#{request.url.split('?').first}"}
  %link{rel: "stylesheet", href: "https://api.mapbox.com/mapbox.js/v3.0.1/mapbox.css"}
  = javascript_include_tag "https://api.mapbox.com/mapbox.js/v3.0.1/mapbox.js"

  <!-- Load chartkick + char.js bundle via CDN -->
  <script src="https://cdnjs.cloudflare.com/ajax/libs/chartkick/2.3.0/chartkick.js" integrity="sha512-vb5WQQcLnuPF84N6gRb9OBxe9AvY+rb04YwZIf66g7GImHwUv/u/gILQGrHRdW9BLideA5cA4OZbrFyWjswIcA==" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.bundle.js" integrity="sha512-zO8oeHCxetPn1Hd9PdDleg5Tw1bAaP0YmNvPY8CwcRyUk7d7/+nyElmFrB6f7vg4f7Fv4sui1mcep8RIEShczg==" crossorigin="anonymous"></script>

  = stylesheet_link_tag "//fonts.googleapis.com/css?family=Open+Sans:400|Montserrat"
  = stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true
  %link{type: "text/plain", rel: "author", href: "/humans.txt"}
  = csrf_meta_tags

  = render 'hotjar' if Rails.env.production?