application.html.haml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. %meta{ 'http-equiv' => 'X-UA-Compatible', content: 'IE=edge' }/
  7. %link{ rel: 'icon', href: favicon_path, type: 'image/x-icon' }/
  8. %link{ rel: 'apple-touch-icon', sizes: '180x180', href: '/apple-touch-icon.png' }/
  9. %link{ rel: 'mask-icon', href: '/mask-icon.svg', color: '#2B90D9' }/
  10. %link{ rel: 'manifest', href: '/manifest.json' }/
  11. %meta{ name: 'msapplication-config', content: '/browserconfig.xml' }/
  12. %meta{ name: 'theme-color', content: '#282c37' }/
  13. %meta{ name: 'apple-mobile-web-app-capable', content: 'yes' }/
  14. %title<
  15. - if content_for?(:page_title)
  16. = yield(:page_title)
  17. = ' - '
  18. = title
  19. = stylesheet_pack_tag 'common', media: 'all'
  20. = stylesheet_pack_tag current_theme, media: 'all'
  21. = javascript_pack_tag 'common', integrity: true, crossorigin: 'anonymous'
  22. %link{ href: asset_pack_path('features/getting_started.js'), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/
  23. %link{ href: asset_pack_path('features/compose.js'), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/
  24. %link{ href: asset_pack_path('features/home_timeline.js'), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/
  25. %link{ href: asset_pack_path('features/notifications.js'), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/
  26. %link{ href: asset_pack_path('features/community_timeline.js'), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/
  27. %link{ href: asset_pack_path('features/public_timeline.js'), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/
  28. %link{ href: asset_pack_path('emojione_picker.js'), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/
  29. = javascript_pack_tag "locale_#{I18n.locale}", integrity: true, crossorigin: 'anonymous'
  30. = csrf_meta_tags
  31. = yield :header_tags
  32. - body_classes ||= @body_classes || ''
  33. - body_classes += ' system-font' if current_account&.user&.setting_system_font_ui
  34. %body{ class: add_rtl_body_class(body_classes) }
  35. = content_for?(:content) ? yield(:content) : yield