Rewrite the main course.scss file as well
Just as is done with the main LMS application.scss file, rewrite the course.scss file with Mako to conditionally import a theme's variables overrides. Add the course.scss file to the list of ignored Git files so that it doesn't keep getting committed over and over again. This also requires us to add a hardcoded line in the assets Rakefile for the moment, so that the course.scss.mako file gets properly preprocessed. Once the preprocessing is done by a Django management command, we won't have to do this anymore.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -27,6 +27,7 @@ conf/locale/en/LC_MESSAGES/*.po
|
||||
!messages.po
|
||||
lms/static/sass/*.css
|
||||
lms/static/sass/application.scss
|
||||
lms/static/sass/course.scss
|
||||
cms/static/sass/*.css
|
||||
lms/lib/comment_client/python
|
||||
nosetests.xml
|
||||
|
||||
@@ -4,6 +4,20 @@
|
||||
@import 'base/font_face';
|
||||
@import 'base/mixins';
|
||||
@import 'base/variables';
|
||||
|
||||
## THEMING
|
||||
## -------
|
||||
## Set up this file to import an edX theme library if the environment
|
||||
## indicates that a theme should be used. The assumption is that the
|
||||
## theme resides outside of this main edX repository, in a directory
|
||||
## 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:
|
||||
// import theme's Sass overrides
|
||||
@import '${env.get('THEME_NAME')}';
|
||||
% endif
|
||||
|
||||
@import 'base/base';
|
||||
@import 'base/extends';
|
||||
@import 'base/animations';
|
||||
Reference in New Issue
Block a user