Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
4a3cffbb
Commit
4a3cffbb
authored
Jan 10, 2014
by
Will Daly
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2131 from edx/db/fix-theme-name-issues
Fix theme issues in Sass preprocessing
parents
20489f22
85453f70
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
7 deletions
+10
-7
common/djangoapps/edxmako/management/commands/preprocess_assets.py
+4
-1
lms/static/sass/application-extend1.scss.mako
+1
-1
lms/static/sass/application-extend2.scss.mako
+1
-1
lms/static/sass/application.scss.mako
+1
-1
lms/static/sass/course.scss.mako
+1
-1
rakelib/assets.rake
+2
-2
No files found.
common/djangoapps/edxmako/management/commands/preprocess_assets.py
View file @
4a3cffbb
...
...
@@ -53,7 +53,10 @@ class Command(NoArgsCommand):
"""
# TODO: do we need to include anything else?
# TODO: do this with the django-settings-context-processor
return
{
"THEME_NAME"
:
getattr
(
settings
,
"THEME_NAME"
,
None
)
}
return
{
"FEATURES"
:
settings
.
FEATURES
,
"THEME_NAME"
:
getattr
(
settings
,
"THEME_NAME"
,
None
),
}
def
__preprocess
(
self
,
infile
,
outfile
):
...
...
lms/static/sass/application-extend1.scss.mako
View file @
4a3cffbb
...
...
@@ -23,7 +23,7 @@
## called themes/<theme-name>/, with its base Sass file in
## themes/<theme-name>/static/sass/_<theme-name>.scss. That one entry
## point can be used to @import in as many other things as needed.
% if env
.get('THEME_NAME') is not None
:
% if env
["FEATURES"].get("USE_CUSTOM_THEME", False)
:
// import theme's Sass overrides
@import '${env.get('THEME_NAME')}';
% endif
...
...
lms/static/sass/application-extend2.scss.mako
View file @
4a3cffbb
...
...
@@ -23,7 +23,7 @@
## called themes/<theme-name>/, with its base Sass file in
## themes/<theme-name>/static/sass/_<theme-name>.scss. That one entry
## point can be used to @import in as many other things as needed.
% if env
.get('THEME_NAME') is not None
:
% if env
["FEATURES"].get("USE_CUSTOM_THEME", False)
:
// import theme's Sass overrides
@import '${env.get('THEME_NAME')}';
% endif
...
...
lms/static/sass/application.scss.mako
View file @
4a3cffbb
...
...
@@ -22,7 +22,7 @@
## called themes/<theme-name>/, with its base Sass file in
## themes/<theme-name>/static/sass/_<theme-name>.scss. That one entry
## point can be used to @import in as many other things as needed.
% if env
.get('THEME_NAME') is not None
:
% if env
["FEATURES"].get("USE_CUSTOM_THEME", False)
:
// import theme's Sass overrides
@import '${env.get('THEME_NAME')}';
% endif
...
...
lms/static/sass/course.scss.mako
View file @
4a3cffbb
...
...
@@ -13,7 +13,7 @@
## called themes/<theme-name>/, with its base Sass file in
## themes/<theme-name>/static/sass/_<theme-name>.scss. That one entry
## point can be used to @import in as many other things as needed.
% if env
.get('THEME_NAME') is not None
:
% if env
["FEATURES"].get("USE_CUSTOM_THEME", False)
:
// import theme's Sass overrides
@import '${env.get('THEME_NAME')}';
% endif
...
...
rakelib/assets.rake
View file @
4a3cffbb
# Theming constants
THEME_NAME
=
ENV_TOKENS
[
'THEME_NAME'
]
USE_CUSTOM_THEME
=
!
(
THEME_NAME
.
nil?
||
THEME_NAME
.
empty?
)
USE_CUSTOM_THEME
=
ENV_TOKENS
[
'USE_CUSTOM_THEME'
]
if
USE_CUSTOM_THEME
THEME_NAME
=
ENV_TOKENS
[
'THEME_NAME'
]
THEME_ROOT
=
File
.
join
(
ENV_ROOT
,
"themes"
,
THEME_NAME
)
THEME_SASS
=
File
.
join
(
THEME_ROOT
,
"static"
,
"sass"
)
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment