From e0a3662d7be57166cedc2e320b7dc10499b02e38 Mon Sep 17 00:00:00 2001 From: Claire Date: Sun, 28 Apr 2024 22:38:11 +0200 Subject: [PATCH] Drop hardcoded reliance on vanilla flavor --- app/helpers/application_helper.rb | 4 ++++ app/views/layouts/application.html.haml | 4 ++-- app/views/layouts/embedded.html.haml | 2 +- app/views/layouts/error.html.haml | 2 +- app/views/layouts/mailer.html.haml | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 62c0e78d23..b0114132cc 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -243,6 +243,10 @@ module ApplicationHelper javascript_pack_tag("flavours/#{current_flavour}/#{pack_name}", **options) end + def flavoured_stylesheet_pack_tag(pack_name, **options) + stylesheet_pack_tag("flavours/#{current_flavour}/#{pack_name}", **options) + end + def preload_signed_in_js_packs preload_files = Themes.instance.flavour(current_flavour)&.fetch('signed_in_preload', nil) || [] safe_join(preload_files.map { |entry| preload_pack_asset entry }) diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 4fe314eb4b..7d69ea88e6 100755 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -26,11 +26,11 @@ %title= html_title - = stylesheet_pack_tag 'flavours/vanilla/common', media: 'all', crossorigin: 'anonymous' # upstream uses `common` but that's implicitly defined + = flavoured_stylesheet_pack_tag 'common', media: 'all', crossorigin: 'anonymous' # upstream uses `common` but that's implicitly defined = stylesheet_pack_tag current_theme, media: 'all', crossorigin: 'anonymous' -# Needed for the wicg-inert polyfill. It needs to be on it's own