application.html.haml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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_path, type: 'image/x-icon' }/
  12. %link{ rel: 'apple-touch-icon', sizes: '180x180', href: '/apple-touch-icon.png' }/
  13. %link{ rel: 'mask-icon', href: '/mask-icon.svg', color: '#2B90D9' }/
  14. %link{ rel: 'manifest', href: '/manifest.json' }/
  15. %meta{ name: 'msapplication-config', content: '/browserconfig.xml' }/
  16. %meta{ name: 'theme-color', content: '#282c37' }/
  17. %meta{ name: 'apple-mobile-web-app-capable', content: 'yes' }/
  18. %title= content_for?(:page_title) ? safe_join([yield(:page_title).chomp.html_safe, title], ' - ') : title
  19. = stylesheet_pack_tag 'common', media: 'all', crossorigin: 'anonymous'
  20. = stylesheet_pack_tag current_theme, media: 'all', crossorigin: 'anonymous'
  21. = javascript_pack_tag 'common', crossorigin: 'anonymous'
  22. = javascript_pack_tag "locale_#{I18n.locale}", crossorigin: 'anonymous'
  23. = csrf_meta_tags
  24. %meta{ name: 'style-nonce', content: request.content_security_policy_nonce }
  25. = stylesheet_link_tag '/inert.css', skip_pipeline: true, media: 'all', id: 'inert-style'
  26. - if Setting.custom_css.present?
  27. = stylesheet_link_tag custom_css_path, media: 'all'
  28. = yield :header_tags
  29. %body{ class: body_classes }
  30. = content_for?(:content) ? yield(:content) : yield
  31. .logo-resources
  32. = render file: Rails.root.join('app', 'javascript', 'images', 'logo_transparent.svg')
  33. = render file: Rails.root.join('app', 'javascript', 'images', 'logo_full.svg')