diff options
author | Thibaut Girka <thib@sitedethib.com> | 2020-11-07 18:19:34 +0100 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2020-11-07 18:23:02 +0100 |
commit | 412218af2ecd4cd004708d781e574208742dea4c (patch) | |
tree | c0bf823109c7481ec9242a0263e091ec4aaeafeb /app/views/layouts | |
parent | 5a9fc749c3eab8d3c93dd282fa89c20a5cb0e994 (diff) | |
parent | ee8cf246cfe8e05914ad7dcf81596f8535b3e161 (diff) |
Merge branch 'master' into glitch-soc/merge-upstream
Diffstat (limited to 'app/views/layouts')
-rw-r--r-- | app/views/layouts/_theme.html.haml | 6 | ||||
-rwxr-xr-x | app/views/layouts/application.html.haml | 6 | ||||
-rw-r--r-- | app/views/layouts/embedded.html.haml | 6 | ||||
-rw-r--r-- | app/views/layouts/error.html.haml | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/app/views/layouts/_theme.html.haml b/app/views/layouts/_theme.html.haml index 066d9de42..92de64b0d 100644 --- a/app/views/layouts/_theme.html.haml +++ b/app/views/layouts/_theme.html.haml @@ -2,12 +2,12 @@ - if theme[:pack] != 'common' && theme[:common] = render partial: 'layouts/theme', object: theme[:common] - if theme[:pack] - = javascript_pack_tag theme[:flavour] ? "flavours/#{theme[:flavour]}/#{theme[:pack]}" : "core/#{theme[:pack]}", integrity: true, crossorigin: 'anonymous' + = javascript_pack_tag theme[:flavour] ? "flavours/#{theme[:flavour]}/#{theme[:pack]}" : "core/#{theme[:pack]}", crossorigin: 'anonymous' - if theme[:skin] - if !theme[:flavour] || theme[:skin] == 'default' - = stylesheet_pack_tag theme[:flavour] ? "flavours/#{theme[:flavour]}/#{theme[:pack]}" : "core/#{theme[:pack]}", integrity: true, media: 'all' + = stylesheet_pack_tag theme[:flavour] ? "flavours/#{theme[:flavour]}/#{theme[:pack]}" : "core/#{theme[:pack]}", media: 'all', crossorigin: 'anonymous' - else - = stylesheet_pack_tag "skins/#{theme[:flavour]}/#{theme[:skin]}/#{theme[:pack]}" + = stylesheet_pack_tag "skins/#{theme[:flavour]}/#{theme[:skin]}/#{theme[:pack]}", crossorigin: 'anonymous' - if theme[:preload] - theme[:preload].each do |link| %link{ href: asset_pack_path("#{link}.js"), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/ diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 1481f6973..32681773f 100755 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -21,12 +21,12 @@ %title= content_for?(:page_title) ? safe_join([yield(:page_title).chomp.html_safe, title], ' - ') : title - = javascript_pack_tag "locales", integrity: true, crossorigin: 'anonymous' + = javascript_pack_tag "locales", crossorigin: 'anonymous' - if @theme - if @theme[:supported_locales].include? I18n.locale.to_s - = javascript_pack_tag "locales/#{@theme[:flavour]}/#{I18n.locale}", integrity: true, crossorigin: 'anonymous' + = javascript_pack_tag "locales/#{@theme[:flavour]}/#{I18n.locale}", crossorigin: 'anonymous' - elsif @theme[:supported_locales].include? 'en' - = javascript_pack_tag "locales/#{@theme[:flavour]}/en", integrity: true, crossorigin: 'anonymous' + = javascript_pack_tag "locales/#{@theme[:flavour]}/en", crossorigin: 'anonymous' = csrf_meta_tags %meta{ name: 'style-nonce', content: request.content_security_policy_nonce } diff --git a/app/views/layouts/embedded.html.haml b/app/views/layouts/embedded.html.haml index 69b206f69..431bd260c 100644 --- a/app/views/layouts/embedded.html.haml +++ b/app/views/layouts/embedded.html.haml @@ -12,12 +12,12 @@ %link{ rel: 'dns-prefetch', href: storage_host }/ = render_initial_state - = javascript_pack_tag "locales", integrity: true, crossorigin: 'anonymous' + = javascript_pack_tag "locales", crossorigin: 'anonymous' - if @theme - if @theme[:supported_locales].include? I18n.locale.to_s - = javascript_pack_tag "locales/#{@theme[:flavour]}/#{I18n.locale}", integrity: true, crossorigin: 'anonymous' + = javascript_pack_tag "locales/#{@theme[:flavour]}/#{I18n.locale}", crossorigin: 'anonymous' - elsif @theme[:supported_locales].include? 'en' - = javascript_pack_tag "locales/#{@theme[:flavour]}/en", integrity: true, crossorigin: 'anonymous' + = javascript_pack_tag "locales/#{@theme[:flavour]}/en", crossorigin: 'anonymous' = render partial: 'layouts/theme', object: @core = render partial: 'layouts/theme', object: @theme diff --git a/app/views/layouts/error.html.haml b/app/views/layouts/error.html.haml index f8315afb5..55da5de3f 100644 --- a/app/views/layouts/error.html.haml +++ b/app/views/layouts/error.html.haml @@ -5,7 +5,7 @@ %meta{ charset: 'utf-8' }/ %title= safe_join([yield(:page_title), Setting.default_settings['site_title']], ' - ') %meta{ content: 'width=device-width,initial-scale=1', name: 'viewport' }/ - = javascript_pack_tag "locales", integrity: true, crossorigin: 'anonymous' + = javascript_pack_tag "locales", crossorigin: 'anonymous' = render partial: 'layouts/theme', object: (@core || { pack: 'common' }) = render partial: 'layouts/theme', object: (@theme || { pack: 'error', flavour: 'glitch', common: { pack: 'common', flavour: 'glitch', skin: 'default' } }) %body.error |