Commit 5d64f9a8 by Ned Batchelder Committed by David Baumgold

Minor changes, responding to pull request comments

parent a8dd9ca9
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
// ==================== // ====================
// Table of Contents // Table of Contents
// * +Paths
// * +Grid // * +Grid
// * +Fonts // * +Fonts
// * +Colors - Utility // * +Colors - Utility
...@@ -11,11 +12,14 @@ ...@@ -11,11 +12,14 @@
// * +Timing // * +Timing
// * +Archetype UI // * +Archetype UI
// * +Specific UI // * +Specific UI
// * +Paths
// * +Deprecated // * +Deprecated
$baseline: 20px; $baseline: 20px;
// +Paths
// ====================
$static-path: '..' !default;
// +Grid // +Grid
// ==================== // ====================
$gw-column: ($baseline*3); $gw-column: ($baseline*3);
...@@ -214,10 +218,6 @@ $ui-link-color-focus: $blue-s1; ...@@ -214,10 +218,6 @@ $ui-link-color-focus: $blue-s1;
$ui-notification-height: ($baseline*10); $ui-notification-height: ($baseline*10);
$ui-update-color: $blue-l4; $ui-update-color: $blue-l4;
// +Paths
// ====================
$static-path: '..' !default;
// +Deprecated // +Deprecated
// ==================== // ====================
// do not use, future clean up will use updated styles // do not use, future clean up will use updated styles
......
...@@ -37,9 +37,9 @@ class Command(BaseCommand): ...@@ -37,9 +37,9 @@ class Command(BaseCommand):
def process_one_file(self, source_file, dest_dir, theme_name): def process_one_file(self, source_file, dest_dir, theme_name):
"""Pre-process a .scss file to replace our markers with real code.""" """Pre-process a .scss file to replace our markers with real code."""
with open(source_file) as fsource: with open(source_file) as fsource:
original_content = content = fsource.read() original_content = fsource.read()
content = content.replace( content = original_content.replace(
"//<THEME-OVERRIDE>", "//<THEME-OVERRIDE>",
"@import '{}';".format(theme_name), "@import '{}';".format(theme_name),
) )
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
@import 'base/font_face'; @import 'base/font_face';
@import 'base/mixins'; @import 'base/mixins';
// This comment is used by preprocess_assets.py to include resources from a
// theme, for old-style deprecated theming.
//<THEME-OVERRIDE> //<THEME-OVERRIDE>
@import 'build-course'; // shared app style assets/rendering @import 'build-course'; // shared app style assets/rendering
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
@import 'base/font_face'; @import 'base/font_face';
@import 'base/mixins'; @import 'base/mixins';
// This comment is used by preprocess_assets.py to include resources from a
// theme, for old-style deprecated theming.
//<THEME-OVERRIDE> //<THEME-OVERRIDE>
@import 'build-course'; // shared app style assets/rendering @import 'build-course'; // shared app style assets/rendering
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
@import 'base/variables'; @import 'base/variables';
@import 'base/mixins'; @import 'base/mixins';
// This comment is used by preprocess_assets.py to include resources from a
// theme, for old-style deprecated theming.
//<THEME-OVERRIDE> //<THEME-OVERRIDE>
footer#footer-openedx { footer#footer-openedx {
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
@import 'base/variables'; @import 'base/variables';
@import 'base/mixins'; @import 'base/mixins';
// This comment is used by preprocess_assets.py to include resources from a
// theme, for old-style deprecated theming.
//<THEME-OVERRIDE> //<THEME-OVERRIDE>
footer#footer-openedx { footer#footer-openedx {
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
@import 'base/variables'; @import 'base/variables';
@import 'base/mixins'; @import 'base/mixins';
// This comment is used by preprocess_assets.py to include resources from a
// theme, for old-style deprecated theming.
//<THEME-OVERRIDE> //<THEME-OVERRIDE>
@import 'build-lms'; // shared app style assets/rendering @import 'build-lms'; // shared app style assets/rendering
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
@import 'base/variables'; @import 'base/variables';
@import 'base/mixins'; @import 'base/mixins';
// This comment is used by preprocess_assets.py to include resources from a
// theme, for old-style deprecated theming.
//<THEME-OVERRIDE> //<THEME-OVERRIDE>
@import 'build-lms'; // shared app style assets/rendering @import 'build-lms'; // shared app style assets/rendering
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
Startup code for Comprehensive Theming Startup code for Comprehensive Theming
""" """
from path import Path as path
from django.conf import settings from django.conf import settings
from .core import enable_comprehensive_theme from .core import enable_comprehensive_theme
...@@ -10,4 +11,4 @@ from .core import enable_comprehensive_theme ...@@ -10,4 +11,4 @@ from .core import enable_comprehensive_theme
def run(): def run():
"""Enable comprehensive theming, if we should.""" """Enable comprehensive theming, if we should."""
if settings.COMP_THEME_DIR: if settings.COMP_THEME_DIR:
enable_comprehensive_theme(theme_dir=settings.COMP_THEME_DIR) enable_comprehensive_theme(theme_dir=path(settings.COMP_THEME_DIR))
...@@ -38,7 +38,7 @@ edx-platform. Here's a sample:: ...@@ -38,7 +38,7 @@ edx-platform. Here's a sample::
The top directory is named whatever you like. This example uses "my-theme". The top directory is named whatever you like. This example uses "my-theme".
The files provided here override the files in edx-platform. In this case, the The files provided here override the files in edx-platform. In this case, the
``my-theme/lms/static/sass/lms-main.scss`` file is used in place of the ``my-theme/lms/static/sass/lms-main.scss`` file is used in place of the
``edx-platform/lms/static/lms-main.scss`` file. ``edx-platform/lms/static/sass/lms-main.scss`` file.
Images Images
...@@ -66,9 +66,9 @@ The variables that can currently be overridden are defined in ...@@ -66,9 +66,9 @@ The variables that can currently be overridden are defined in
**Note:** We are currently in the middle of a re-engineering of the Sass **Note:** We are currently in the middle of a re-engineering of the Sass
variables. They will change in the future. If you are interested, you can see variables. They will change in the future. If you are interested, you can see
the new development in the `edX Pattern Library`__. the new development in the `edX Pattern Library`_.
.. __: http://ux.edx.org/ .. _edX Pattern Library: http://ux.edx.org/
Then create ``lms/static/sass/lms-main.scss`` to use those overrides, and also Then create ``lms/static/sass/lms-main.scss`` to use those overrides, and also
the rest of the definitions from the original file:: the rest of the definitions from the original file::
...@@ -94,18 +94,28 @@ copied template in your theme also. ...@@ -94,18 +94,28 @@ copied template in your theme also.
Installing your theme Installing your theme
--------------------- ---------------------
To use your theme, follow these steps: To use your theme, you need to add a configuration value pointing to your theme
directory. There are two ways to do this.
#. Edit /edx/app/edx_ansible/server-vars.yml to add the edxapp_comp_theme_dir #. If you usually edit server-vars.yml:
value::
#. As the vagrant user, edit (or create)
/edx/app/edx_ansible/server-vars.yml to add the
``edxapp_comp_theme_dir`` value::
edxapp_comp_theme_dir: '/full/path/to/my-theme' edxapp_comp_theme_dir: '/full/path/to/my-theme'
#. Re-run the provisioning script:: #. Run the update script::
$ sudo /edx/bin/update configuration master
$ sudo /edx/bin/update edx-platform HEAD $ sudo /edx/bin/update edx-platform HEAD
Your changes should now be visible on your site. #. Otherwise, edit the /edx/app/edxapp/lms.env.json file to add the
``COMP_THEME_DIR`` value::
"COMP_THEME_DIR": "/full/path/to/my-theme",
Restart your site. Your changes should now be visible.
"Stanford" theming "Stanford" theming
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment