Difference between revisions of "SUNScholar/XMLUI Theme/M2/Customisation/Multiple Themes"
| Line 16: | Line 16: | ||
Now we have the style folders, the next step is to create the style file in styles folder. | Now we have the style folders, the next step is to create the style file in styles folder. | ||
| − | + | First, we create styles template file; | |
| + | cd tmp | ||
| + | |||
| + | nano _styles.scss | ||
| + | |||
| + | Copy and paster the following into the file | ||
| + | <pre> | ||
| + | |||
| + | |||
| + | </pre> | ||
| + | Now we copy the template to the styles folders. | ||
cd themes | cd themes | ||
| + | |||
| + | for x in 01 02 03 04 05 06 07 08 09 10; do cp /tmp/_styles.scss $x/styles; done | ||
This means that if I create two folders called 'Red' and 'Green' in that directory, and create the file '''styles/_style.scss''' in both folders with the contents respectively and run mvn package -Dmirage2.on=true, two themes will be created called 'Red' and 'Green', with the only difference being the background color of <body> | This means that if I create two folders called 'Red' and 'Green' in that directory, and create the file '''styles/_style.scss''' in both folders with the contents respectively and run mvn package -Dmirage2.on=true, two themes will be created called 'Red' and 'Green', with the only difference being the background color of <body> | ||
<pre> | <pre> | ||
Revision as of 15:55, 27 June 2015
Back to Mirage 2 Customisation
Introduction
Any folder you create in the following folder will be interpreted as a Mirage2 based theme:
$HOME/source/dspace/modules/xmlui-mirage2/src/main/webapp/themes
Step 1 - Create folders
We have ten top level communities as faculties, therefore we need to create ten distinct themes, one per faculty.
Type the following;
cd $HOME/source/dspace/modules/xmlui-mirage2/src/main/webapp
mkdir -p themes/{01/styles,02/styles,03/styles,04/styles,05/styles,06/styles,07/styles,08/styles,09/styles,10/styles}
Step 2 - Create files
Now we have the style folders, the next step is to create the style file in styles folder.
First, we create styles template file;
cd tmp
nano _styles.scss
Copy and paster the following into the file
Now we copy the template to the styles folders.
cd themes
for x in 01 02 03 04 05 06 07 08 09 10; do cp /tmp/_styles.scss $x/styles; done
This means that if I create two folders called 'Red' and 'Green' in that directory, and create the file styles/_style.scss in both folders with the contents respectively and run mvn package -Dmirage2.on=true, two themes will be created called 'Red' and 'Green', with the only difference being the background color of <body>
$brand-primary: #76273c; $brand-warning: #ff7f00;