-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add patches to compile and enable themes
- Loading branch information
Showing
7 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{%- if PICASSO_DEFAULT_SITE_THEME is defined or PICASSO_THEMES_NAME is defined %} | ||
DEFAULT_SITE_THEME: "{{ PICASSO_DEFAULT_SITE_THEME | default(PICASSO_THEMES_NAME[0]) }}" | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{%- if PICASSO_DEFAULT_SITE_THEME is defined or PICASSO_THEMES_NAME is defined %} | ||
DEFAULT_SITE_THEME: "{{ PICASSO_DEFAULT_SITE_THEME | default(PICASSO_THEMES_NAME[0]) }}" | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{% if PICASSO_THEMES is defined -%} | ||
ENABLE_COMPREHENSIVE_THEMING = True | ||
{%- endif %} | ||
{% if PICASSO_THEME_DIRS is defined -%} | ||
COMPREHENSIVE_THEME_DIRS.extend({{ PICASSO_THEME_DIRS }}) | ||
{%- endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{% if PICASSO_THEMES is defined -%} | ||
ENABLE_COMPREHENSIVE_THEMING = True | ||
{%- endif %} | ||
{%- if PICASSO_THEME_DIRS is defined %} | ||
COMPREHENSIVE_THEME_DIRS.extend({{ PICASSO_THEME_DIRS }}) | ||
{%- endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{% if PICASSO_THEMES is defined -%} | ||
ENABLE_COMPREHENSIVE_THEMING = True | ||
{%- endif %} | ||
{%- if PICASSO_THEME_DIRS is defined %} | ||
COMPREHENSIVE_THEME_DIRS.extend({{ PICASSO_THEME_DIRS }}) | ||
{%- endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{% if TUTOR_VERSION is defined and PICASSO_THEME_DIRS is defined and PICASSO_THEMES_NAME is defined %} | ||
|
||
COPY --chown=app:app ./themes/ /openedx/themes | ||
|
||
{% set redwood_version = 'v18.0.0'.lstrip('v').split('.') %} | ||
{% set current_version = TUTOR_VERSION.lstrip('v').split('.') %} | ||
|
||
# Compile the assets of the themes defined in PICASSO_THEMES_NAME | ||
# that are at the PICASSO_THEME_DIRS adresses. | ||
{% if current_version|map('int') < redwood_version|map('int') %} | ||
# This compiles the assets in the releases < redwood. | ||
RUN openedx-assets themes \ | ||
--theme-dirs {{ PICASSO_THEME_DIRS | join(' ') }} \ | ||
--themes {{ PICASSO_THEMES_NAME | join(' ') }} \ | ||
&& openedx-assets collect --settings=tutor.assets \ | ||
&& rdfind -makesymlinks true -followsymlinks true /openedx/staticfiles/ | ||
{% else %} | ||
# This compiles the assets from the redwood release. | ||
RUN npm run compile-sass -- \ | ||
--theme-dir {{ PICASSO_THEME_DIRS | join(' --theme-dir ') }} \ | ||
--theme {{ PICASSO_THEMES_NAME | join(' --theme ') }} \ | ||
&& ./manage.py lms collectstatic --noinput --settings=tutor.assets \ | ||
&& rdfind -makesymlinks true -followsymlinks true /openedx/staticfiles/ | ||
{% endif %} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{% if PICASSO_THEMES is defined -%} | ||
ENABLE_COMPREHENSIVE_THEMING = True | ||
{%- endif %} | ||
{% if PICASSO_THEME_DIRS is defined -%} | ||
COMPREHENSIVE_THEME_DIRS.extend({{ PICASSO_THEME_DIRS }}) | ||
{%- endif %} |