application.html.haml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. !!! 5
  2. %html{ lang: I18n.locale }
  3. %head
  4. %meta{ charset: 'utf-8' }/
  5. %meta{ name: 'viewport', content: 'width=device-width, initial-scale=1' }/
  6. - if cdn_host?
  7. %link{ rel: 'dns-prefetch', href: cdn_host }/
  8. %meta{ name: 'cdn-host', content: cdn_host }/
  9. - if storage_host?
  10. %link{ rel: 'dns-prefetch', href: storage_host }/
  11. %link{ rel: 'icon', href: '/favicon.ico', type: 'image/x-icon' }/
  12. - %w(16 32 48).each do |size|
  13. %link{ rel: 'icon', sizes: "#{size}x#{size}", href: asset_pack_path("media/icons/favicon-#{size}x#{size}.png"), type: 'image/png' }/
  14. - %w(57 60 72 76 114 120 144 152 167 180 1024).each do |size|
  15. %link{ rel: 'apple-touch-icon', sizes: "#{size}x#{size}", href: asset_pack_path("media/icons/apple-touch-icon-#{size}x#{size}.png") }/
  16. %link{ rel: 'mask-icon', href: asset_pack_path('media/images/logo-symbol-icon.svg'), color: '#6364FF' }/
  17. %link{ rel: 'manifest', href: manifest_path(format: :json) }/
  18. %meta{ name: 'theme-color', content: '#191b22' }/
  19. %meta{ name: 'apple-mobile-web-app-capable', content: 'yes' }/
  20. %title= html_title
  21. = stylesheet_pack_tag 'common', media: 'all', crossorigin: 'anonymous'
  22. = stylesheet_pack_tag current_theme, media: 'all', crossorigin: 'anonymous'
  23. -# Needed for the wicg-inert polyfill. It needs to be on it's own <style> tag, with this `id`
  24. = stylesheet_pack_tag 'inert', media: 'all', id: 'inert-style'
  25. = javascript_pack_tag 'common', crossorigin: 'anonymous'
  26. = preload_pack_asset "locale/#{I18n.locale}-json.js"
  27. = csrf_meta_tags unless skip_csrf_meta_tags?
  28. %meta{ name: 'style-nonce', content: request.content_security_policy_nonce }
  29. = stylesheet_link_tag custom_css_path, skip_pipeline: true, host: root_url, media: 'all'
  30. = yield :header_tags
  31. %body{ class: body_classes }
  32. = content_for?(:content) ? yield(:content) : yield
  33. .logo-resources{ 'tabindex' => '-1', 'inert' => true, 'aria-hidden' => true }
  34. = render_symbol :icon
  35. = render_symbol :wordmark