application.html.haml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  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. - if storage_host?
  9. %link{ rel: 'dns-prefetch', href: storage_host }/
  10. %link{ rel: 'icon', href: favicon_path, type: 'image/x-icon' }/
  11. %link{ rel: 'apple-touch-icon', sizes: '180x180', href: '/apple-touch-icon.png' }/
  12. %link{ rel: 'mask-icon', href: '/mask-icon.svg', color: '#2B90D9' }/
  13. %link{ rel: 'manifest', href: '/manifest.json' }/
  14. %meta{ name: 'msapplication-config', content: '/browserconfig.xml' }/
  15. %meta{ name: 'theme-color', content: '#282c37' }/
  16. %meta{ name: 'apple-mobile-web-app-capable', content: 'yes' }/
  17. %title= content_for?(:page_title) ? safe_join([yield(:page_title).chomp.html_safe, title], ' - ') : title
  18. = stylesheet_pack_tag 'common', media: 'all'
  19. = stylesheet_pack_tag current_theme, media: 'all'
  20. = javascript_pack_tag 'common', integrity: true, crossorigin: 'anonymous'
  21. = javascript_pack_tag "locale_#{I18n.locale}", integrity: true, crossorigin: 'anonymous'
  22. = csrf_meta_tags
  23. - if Setting.custom_css.present?
  24. = stylesheet_link_tag custom_css_path, media: 'all'
  25. = yield :header_tags
  26. %body{ class: body_classes }
  27. = content_for?(:content) ? yield(:content) : yield