Unverified Commit 5fc7f61d by David Ormsbee Committed by GitHub

Merge pull request #4396 from open-craft/adam/hawthorn-simple-theme

Fix location of sass variables for simple-theme role
parents e261e0b5 4aa7f9e1
......@@ -56,8 +56,10 @@ Example script to test this role, to be run from devstack, from "vagrant" user:
- export PYTHONUNBUFFERED=1
- source /edx/app/edx_ansible/venvs/edx_ansible/bin/activate
- cd /edx/app/edx_ansible/edx_ansible/playbooks
- ansible-playbook -i localhost, -c local run_role.yml -e role=simple_theme -e configuration_version=master -e edx_platform_version=master -e EDXAPP_DEFAULT_SITE_THEME=mytheme2 -e '{"SIMPLETHEME_SASS_OVERRIDES": [{"variable": "main-color", "value":"#823456"}, {"variable": "action-primary-bg", "value":"$main-color"}]}' -e EDXAPP_COMPREHENSIVE_THEME_SOURCE_REPO="https://github.com/open-craft/edx-theme/" -e EDXAPP_COMPREHENSIVE_THEME_VERSION="harvard-dcex" -e edxapp_user=vagrant -e common_web_group=www-data -e SIMPLETHEME_ENABLE_DEPLOY=true -e '{"SIMPLETHEME_STATIC_FILES_URLS": [{"url": "http://docs.ansible.com/ansible/latest/_static/images/logo_invert.png", "dest":"lms/static/images/logo.png"}, {"url": "http://docs.ansible.com/favicon.ico", "dest":"lms/static/images/favicon.ico"}]}' -e '{"EDXAPP_COMPREHENSIVE_THEME_DIRS":["/edx/var/edxapp/themes"], "EDXAPP_ENABLE_COMPREHENSIVE_THEMING": true}'
- ansible-playbook -i localhost, -c local run_role.yml -e role=simple_theme -e configuration_version=master -e edx_platform_version=master -e EDXAPP_DEFAULT_SITE_THEME=mytheme2 -e '{"SIMPLETHEME_SASS_OVERRIDES": [{"variable": "link-color", "value":"#00b0f0"}, {"variable": "action-primary-bg", "value":"#ff8000"}, {"variable": "action-secondary-bg", "value":"#ff8000"}, {"variable": "theme-colors", "value":"(\"primary\": #ff8000, \"secondary\": #ff8000)"}, {"variable": "button-color", "value":"#ff8000"}], "SIMPLETHEME_EXTRA_SASS": ".global-header { background: #7ec832 } \n .wrapper-footer { background: #7ec832 }"}' -e EDXAPP_COMPREHENSIVE_THEME_SOURCE_REPO="https://github.com/open-craft/edx-theme/" -e EDXAPP_COMPREHENSIVE_THEME_VERSION="harvard-dcex" -e edxapp_user=vagrant -e common_web_group=www-data -e SIMPLETHEME_ENABLE_DEPLOY=true -e '{"SIMPLETHEME_STATIC_FILES_URLS": [{"url": "http://docs.ansible.com/ansible/latest/_static/images/logo_invert.png", "dest":"lms/static/images/logo.png"}, {"url": "http://docs.ansible.com/favicon.ico", "dest":"lms/static/images/favicon.ico"}]}' -e '{"EDXAPP_COMPREHENSIVE_THEME_DIRS":["/edx/var/edxapp/themes"], "EDXAPP_ENABLE_COMPREHENSIVE_THEMING": true}'
Or, if you want to test the task as part of the deployment, change to role=edxapp,
and add --tags some-custom-tag-that-you-should-add-to-the-task
Note, that header and footer background color need to be overriden using SIMPLETHEME_EXTRA_SASS variable, previously those colors were defined as SASS variables - `$header-bg` and `$footer-bg`. Since Hawthorn they are defined using bootstrap's theming mechanism.
......@@ -80,7 +80,7 @@
group: "{{ common_web_group }}"
with_items:
- "."
- "lms/static/sass/partials/base"
- "lms/static/sass/partials/lms/theme"
- name: Compile the templates
template:
......@@ -90,10 +90,9 @@
group: "{{ common_web_group }}"
with_items:
# List of files from ./templates to be processed
- "lms/static/sass/partials/base/_variables.scss"
- "lms/static/sass/partials/lms/theme/_variables-v1.scss"
- "lms/static/sass/_lms-overrides.scss"
# Copying static files is done in two steps: create directories + copy files
# (while renaming their path to add "static/"). There could be a 1-step solution,
# e.g requesting with_filetree with depth 1 (if this is possible in ansible).
......
@import 'lms/static/sass/partials/base/variables';
/* Variables from simple_theme role start here */
{% for item in SIMPLETHEME_SASS_OVERRIDES %}
${{ item.variable }}: {{ item.value }};
{% endfor %}
/* Variables from simple_theme role end here */
@import 'lms/static/sass/partials/lms/theme/variables-v1';
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