From 9ca9ff93c27cf7239e18828bb476055fce7879f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Lente?= Date: Wed, 9 Oct 2024 11:16:07 +0200 Subject: [PATCH 1/2] Config: Init temp git submodule assets_shared_v2_component_forms Initialize git submodule assets_shared_v2_component_forms temporarily to be used with survey templates until the project is not yet fully migrated to web-assets v2. --- .gitmodules | 4 ++++ assets_shared | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 5a8b7ba..90074f6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,10 @@ [submodule "assets_shared"] path = assets_shared url = https://projects.blender.org/infrastructure/web-assets.git +[submodule "assets_shared_v2_component_forms"] + branch = component-forms + path = assets_shared_v2 + url = https://projects.blender.org/infrastructure/web-assets.git [submodule "donation-box"] path = donation-box url = https://projects.blender.org/infrastructure/devfund-donation-box.git diff --git a/assets_shared b/assets_shared index 8839ec4..ca8eb53 160000 --- a/assets_shared +++ b/assets_shared @@ -1 +1 @@ -Subproject commit 8839ec4de330d84ed68bfdbb27017ab4920e426b +Subproject commit ca8eb5303b6974c2285a8637c93b5f26f41478f0 -- 2.30.2 From a8601424054c2497f71f94ea6963e81f721a7575 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Lente?= Date: Wed, 9 Oct 2024 11:22:16 +0200 Subject: [PATCH 2/2] Config: Init temporary sass compilation of web-assets v2 component forms for survey templates Configure and initialize sass compilation of web-assets-v2 component forms branch to be used in survey templates until the main website is not yet migrated to bwa v2. It decouples surveys' styling from the main website temporarily, to start form building with latest web-assets v2 forms defaults. --- blender_fund/settings.py | 5 +++++ .../styles/main-web-assets-v2-component-forms.sass | 2 ++ blender_fund_main/templates/blender_fund_main/survey.html | 4 ++++ templates/blender_fund/layout.html | 4 +++- 4 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 blender_fund_main/static/blender_fund_main/styles/main-web-assets-v2-component-forms.sass diff --git a/blender_fund/settings.py b/blender_fund/settings.py index b131094..84b7fb6 100644 --- a/blender_fund/settings.py +++ b/blender_fund/settings.py @@ -285,6 +285,11 @@ PIPELINE = { 'output_filename': 'css/main.css', 'extra_context': {'media': 'screen,projection'}, }, + 'main-web-assets-v2-component-forms': { + 'source_filenames': ('blender_fund_main/styles/main-web-assets-v2-component-forms.sass',), + 'output_filename': 'css/main-web-assets-v2-component-forms.css', + 'extra_context': {'media': 'screen,projection'}, + }, 'looper_admin': { 'source_filenames': ('looper/styles/*.sass',), 'output_filename': 'css/looper_admin.css', diff --git a/blender_fund_main/static/blender_fund_main/styles/main-web-assets-v2-component-forms.sass b/blender_fund_main/static/blender_fund_main/styles/main-web-assets-v2-component-forms.sass new file mode 100644 index 0000000..753eab1 --- /dev/null +++ b/blender_fund_main/static/blender_fund_main/styles/main-web-assets-v2-component-forms.sass @@ -0,0 +1,2 @@ +$font-path: '../../assets/fonts' +@import '../../../../assets_shared_v2_component_forms/src/styles/main.sass' diff --git a/blender_fund_main/templates/blender_fund_main/survey.html b/blender_fund_main/templates/blender_fund_main/survey.html index 3f90a8f..6db7909 100644 --- a/blender_fund_main/templates/blender_fund_main/survey.html +++ b/blender_fund_main/templates/blender_fund_main/survey.html @@ -1,3 +1,7 @@ +{% block stylesheet_custom %} + {% stylesheet 'main-web-assets-v2-component-forms' %} +{% endblock stylesheet_custom %} +

Survey

Hi {{ user.username }}! diff --git a/templates/blender_fund/layout.html b/templates/blender_fund/layout.html index c5a2475..794f943 100644 --- a/templates/blender_fund/layout.html +++ b/templates/blender_fund/layout.html @@ -35,7 +35,9 @@ - {% stylesheet 'main' %} + {% block stylesheet_custom %} + {% stylesheet 'main' %} + {% endblock stylesheet_custom %} {% if settings.GOOGLE_ANALYTICS_TRACKING_ID %} -- 2.30.2