Skip to content
Snippets Groups Projects
Commit 5d64f9a8 authored by Ned Batchelder's avatar Ned Batchelder Committed by David Baumgold
Browse files

Minor changes, responding to pull request comments

parent a8dd9ca9
No related merge requests found
......@@ -2,6 +2,7 @@
// ====================
// Table of Contents
// * +Paths
// * +Grid
// * +Fonts
// * +Colors - Utility
......@@ -11,11 +12,14 @@
// * +Timing
// * +Archetype UI
// * +Specific UI
// * +Paths
// * +Deprecated
$baseline: 20px;
// +Paths
// ====================
$static-path: '..' !default;
// +Grid
// ====================
$gw-column: ($baseline*3);
......@@ -214,10 +218,6 @@ $ui-link-color-focus: $blue-s1;
$ui-notification-height: ($baseline*10);
$ui-update-color: $blue-l4;
// +Paths
// ====================
$static-path: '..' !default;
// +Deprecated
// ====================
// do not use, future clean up will use updated styles
......
......@@ -37,9 +37,9 @@ class Command(BaseCommand):
def process_one_file(self, source_file, dest_dir, theme_name):
"""Pre-process a .scss file to replace our markers with real code."""
with open(source_file) as fsource:
original_content = content = fsource.read()
original_content = fsource.read()
content = content.replace(
content = original_content.replace(
"//<THEME-OVERRIDE>",
"@import '{}';".format(theme_name),
)
......
......@@ -6,6 +6,8 @@
@import 'base/font_face';
@import 'base/mixins';
// This comment is used by preprocess_assets.py to include resources from a
// theme, for old-style deprecated theming.
//<THEME-OVERRIDE>
@import 'build-course'; // shared app style assets/rendering
......@@ -6,6 +6,8 @@
@import 'base/font_face';
@import 'base/mixins';
// This comment is used by preprocess_assets.py to include resources from a
// theme, for old-style deprecated theming.
//<THEME-OVERRIDE>
@import 'build-course'; // shared app style assets/rendering
......@@ -9,6 +9,8 @@
@import 'base/variables';
@import 'base/mixins';
// This comment is used by preprocess_assets.py to include resources from a
// theme, for old-style deprecated theming.
//<THEME-OVERRIDE>
footer#footer-openedx {
......
......@@ -9,6 +9,8 @@
@import 'base/variables';
@import 'base/mixins';
// This comment is used by preprocess_assets.py to include resources from a
// theme, for old-style deprecated theming.
//<THEME-OVERRIDE>
footer#footer-openedx {
......
......@@ -14,6 +14,8 @@
@import 'base/variables';
@import 'base/mixins';
// This comment is used by preprocess_assets.py to include resources from a
// theme, for old-style deprecated theming.
//<THEME-OVERRIDE>
@import 'build-lms'; // shared app style assets/rendering
......@@ -13,6 +13,8 @@
@import 'base/variables';
@import 'base/mixins';
// This comment is used by preprocess_assets.py to include resources from a
// theme, for old-style deprecated theming.
//<THEME-OVERRIDE>
@import 'build-lms'; // shared app style assets/rendering
......@@ -2,6 +2,7 @@
Startup code for Comprehensive Theming
"""
from path import Path as path
from django.conf import settings
from .core import enable_comprehensive_theme
......@@ -10,4 +11,4 @@ from .core import enable_comprehensive_theme
def run():
"""Enable comprehensive theming, if we should."""
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::
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
``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
......@@ -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
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
the rest of the definitions from the original file::
......@@ -94,18 +94,28 @@ copied template in your theme also.
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
value::
#. If you usually edit server-vars.yml:
edxapp_comp_theme_dir: '/full/path/to/my-theme'
#. As the vagrant user, edit (or create)
/edx/app/edx_ansible/server-vars.yml to add the
``edxapp_comp_theme_dir`` value::
#. Re-run the provisioning script::
edxapp_comp_theme_dir: '/full/path/to/my-theme'
$ sudo /edx/bin/update edx-platform HEAD
#. Run the update script::
Your changes should now be visible on your site.
$ sudo /edx/bin/update configuration master
$ sudo /edx/bin/update edx-platform HEAD
#. 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment