1
0

application.html.haml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. - SiteUpload::FAVICON_SIZES.each do |size|
  12. %link{ rel: 'icon', sizes: "#{size}x#{size}", href: favicon_path(size.to_i) || frontend_asset_path("icons/favicon-#{size}x#{size}.png"), type: 'image/png' }/
  13. - SiteUpload::APPLE_ICON_SIZES.each do |size|
  14. %link{ rel: 'apple-touch-icon', sizes: "#{size}x#{size}", href: app_icon_path(size.to_i) || frontend_asset_path("icons/apple-touch-icon-#{size}x#{size}.png") }/
  15. - if use_mask_icon?
  16. %link{ rel: 'mask-icon', href: frontend_asset_path('images/logo-symbol-icon.svg'), color: '#6364FF' }/
  17. %link{ rel: 'manifest', href: manifest_path(format: :json) }/
  18. = theme_color_tags current_theme
  19. %meta{ name: 'mobile-web-app-capable', content: 'yes' }/
  20. %title= html_title
  21. = theme_style_tags current_theme
  22. -# Needed for the wicg-inert polyfill. It needs to be on it's own <style> tag, with this `id`
  23. = stylesheet_pack_tag 'inert', media: 'all', crossorigin: 'anonymous', id: 'inert-style'
  24. = javascript_pack_tag 'common', crossorigin: 'anonymous'
  25. = preload_pack_asset "locale/#{I18n.locale}-json.js"
  26. = csrf_meta_tags unless skip_csrf_meta_tags?
  27. %meta{ name: 'style-nonce', content: request.content_security_policy_nonce }
  28. = stylesheet_link_tag custom_css_path, skip_pipeline: true, host: root_url, media: 'all'
  29. = yield :header_tags
  30. %body{ class: body_classes }
  31. = content_for?(:content) ? yield(:content) : yield
  32. .logo-resources{ 'tabindex' => '-1', 'inert' => true, 'aria-hidden' => 'true' }
  33. = inline_svg_tag 'logo-symbol-icon.svg'
  34. = inline_svg_tag 'logo-symbol-wordmark.svg'