Skip to content

Commit 495a875

Browse files
committed
feat: add configuration for Paragon theme URLs in dev and local
1 parent f8ae77a commit 495a875

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{% if not PARAGON_ENABLED_THEMES %}
2+
{% set PARAGON_ENABLED_THEMES = ['light'] %}
3+
{% endif %}
4+
5+
{% set PROTOCOL = 'https' if ENABLE_HTTPS else 'http' %}
6+
{% set BASE_URL = PROTOCOL ~ "://" ~ "localhost" ~ ":" ~ PARAGON_STATIC_SERVER_PORT ~ "/" %}
7+
8+
MFE_CONFIG["PARAGON_THEME_URLS"] = {
9+
"core": {
10+
"urls": {
11+
"default": "{{ BASE_URL }}core/core.min.css"
12+
},
13+
},
14+
"defaults": {
15+
{% if 'light' in PARAGON_ENABLED_THEMES %}"light": "light",{% else %}
16+
"light": "{{ PARAGON_ENABLED_THEMES | first }}",{% endif %}
17+
{% if 'dark' in PARAGON_ENABLED_THEMES %}"dark": "dark"{% endif %}
18+
},
19+
"variants": {
20+
{% for theme in PARAGON_ENABLED_THEMES %}"{{ theme }}": {
21+
"urls": {
22+
"default": "{{ BASE_URL }}themes/{{ theme }}/{{ theme }}.min.css"
23+
}
24+
},{% endfor %}
25+
}
26+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{% if not PARAGON_ENABLED_THEMES %}
2+
{% set PARAGON_ENABLED_THEMES = ['light'] %}
3+
{% endif %}
4+
5+
{% set PROTOCOL = 'https' if ENABLE_HTTPS else 'http' %}
6+
{% set BASE_URL = PROTOCOL ~ "://" ~ LMS_HOST ~ "/" ~ PARAGON_STATIC_URL_PREFIX %}
7+
8+
MFE_CONFIG["PARAGON_THEME_URLS"] = {
9+
"core": {
10+
"urls": {
11+
"default": "{{ BASE_URL }}core/core.min.css"
12+
},
13+
},
14+
"defaults": {
15+
{% if 'light' in PARAGON_ENABLED_THEMES %}"light": "light",{% else %}
16+
"light": "{{ PARAGON_ENABLED_THEMES | first }}",{% endif %}
17+
{% if 'dark' in PARAGON_ENABLED_THEMES %}"dark": "dark"{% endif %}
18+
},
19+
"variants": {
20+
{% for theme in PARAGON_ENABLED_THEMES %}"{{ theme }}": {
21+
"urls": {
22+
"default": "{{ BASE_URL }}themes/{{ theme }}/{{ theme }}.min.css"
23+
}
24+
},{% endfor %}
25+
}
26+
}

0 commit comments

Comments
 (0)