This repository contains the themes customized by Edunext for Openedx's edx-platform.
Bragi works with eox-theming, you need to install the Django plugin to enable the theme.
The easiest way to install Bragi in your instance is using tutor-contrib-picasso as follows:
PICASSO_THEMES:
- name: ednx-saas-themes
repo: [email protected]:eduNEXT/ednx-saas-themes.git
version: edunext/redwood.master
PICASSO_THEMES_NAME:
- bragi
- css-runtime
PICASSO_THEME_DIRS:
- /openedx/themes/ednx-saas-themes/edx-platform
- /openedx/themes/ednx-test-themes/edx-platform/bragi-children
If you want to use css-runtime you need to add the following configuration to the instance or tenant config:
{
"THEME_OPTIONS": {
"theme": {
"name": "css-runtime",
"parent": "bragi"
}
},
}Otherwise, to add the Bragi theme in a instance follow these steps:
- Be sure you have eox-tenant and eox-theming in your environment.
- Clone the repo in
env/build/openedx/themesand use the branch to work with. - Add this line in
env/build/openedx/settings/lms/assets.pyandenv/build/openedx/settings/cms/assets.py
COMPREHENSIVE_THEME_DIRS.extend(['/openedx/themes/ednx-saas-themes/edx-platform', '/openedx/themes/ednx-saas-themes/edx-platform/bragi-children'])In the lms.env.yml and cms.env.yml be sure to add:
USE_EOX_TENANT: True
DEFAULT_SITE_THEME: "bragi"
COMPREHENSIVE_THEME_DIRS: ['/openedx/themes/ednx-saas-themes/edx-platform', '/openedx/themes/ednx-saas-themes/edx-platform/bragi-children']- Open bash and compile bragi theme, context
source .tvm/bin/activate
tutor dev run lms bash
# Inside the lms bash
npm run compile-sass -- --theme-dir /openedx/themes/ednx-saas-themes/edx-platform --theme-dir /openedx/themes/ednx-saas-themes/edx-platform/bragi-children --theme bragi --theme css-runtimeOpen edX releases a new version of the platform every 6 months, in that process the templates or styles could be updated, our task here is to make those updates in Bragi if applicable.
Let's review different scenarios and the action to take in each one:
| Scenario | Action |
|---|---|
| There is an update in the style and does not compromise the look and feel of Bragi. | N/A. |
| There is a change in the style and Bragi does not look as before in some parts of the website. | Update the styles to match the default look and feel. |
| A template is updated in areas that Bragi overwrite | N/A |
| A template is updated and Bragi does not apply custom changes over that area. | Copy the changes in the Bragi template to update it. |
Imagine the current version of Bragi is Alpha and we need to migrate to Beta. The step by step is:
-
Create a new branch based on master. The name of your branch should follow the structure
<name_initials>/<description>, e,g.jd/beta-migration. -
We have a document for the migration tracking. You should create a new page, duplicate the table, and fill the status and description columns with your findings and changes. The name of the page is the releases involved in the migration, e.g. Alpha to Beta.
-
The columns Bragi path and Open edX path help you to identify all the templates that you need to migrate and their current location. If you add a new template to Bragi you need to add a new row with those values.
-
If during the migration you can not find a file in the Open edX path, you should update it with the new one.
-
Diff the changes between templates in Alpha (upstream) and Beta. You can use Diffchecker to compare them. This helps you as a filter to identify which templates you need to modify.
-
Diff the templates in Bragi Alpha with upstream Alpha from those with changes (step 5), this helps you to identify the Bragi customizations overwritten.
-
For the template Beta identified in step 5 add the Bragi customizations (step 6).
-
Verify the styles are correct, if not, make the corresponding changes.
-
Create a tenant to verify the custom variables are being applied.
-
Create a Pull Request to master with the migrated templates and styles updated.
-
Once the changes are approved and merged, create a branch for the new release, following the repository standard
edunext/<release-name>.master, e.g.edunext/beta.master.
Tip
You can follow steps 3 to 6 for each template so you can update the tracking documentation at the same time.
For a detailed explanation of Bragi, the migration process, and how it works with eox-theming, please review the following video: Onboarding Bragi
- We no longer use
bragi-generatorandbragi-childrensthemes since Nutmeg. With the introduction of CSS Variables in the Open edX ecosystem we are currently maintainingcss-runtimeandbragithemes.
Copyright (c) eduNEXT.
All rights reserved.