Skip to content

Commit

Permalink
Merge pull request #6 from utecuy/edunext-utec/custom_theme_sass
Browse files Browse the repository at this point in the history
Enabling compilation of custom theme sass files
  • Loading branch information
felipemontoya authored Dec 14, 2016
2 parents c2ff477 + bad4a10 commit 153082c
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions pavelib/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,28 @@ def get_system_sass_dirs(system):
],
})

edxapp_env = Env()
if edxapp_env.feature_flags.get('USE_CUSTOM_THEME', False):
# themed sass folders
themed_sass_dir = path(system) / "static" / "themed_sass"
themed_css_dir = path(system) / "static" / "css"
# Getting the sass path of the custom theme
theme_name = edxapp_env.env_tokens.get('THEME_NAME', '')
parent_dir = path(edxapp_env.REPO_ROOT).abspath().parent
theme_root = parent_dir / "themes" / theme_name
custom_theme_sass_dir = theme_root / "static" / "sass"

dirs.append({
"sass_source_dir": themed_sass_dir,
"css_destination_dir": themed_css_dir,
"lookup_paths": [
sass_dir / "partials",
sass_dir,
custom_theme_sass_dir,
themed_sass_dir
],
})

return dirs


Expand Down

0 comments on commit 153082c

Please sign in to comment.