Last active
August 29, 2015 14:03
-
-
Save brh55/382da8ba1cb2106a00df to your computer and use it in GitHub Desktop.
Optimized methods for Color Theming in MODx | PMACS TEAM | #modx #optimize
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Key: colortheme | |
Label: Color Theme | |
Description: Choose your desired color theme. | |
Group: Publishers (drop down) | |
Field Type: Selectbox (drop down) | |
Value: blank | |
Field Options: Make sure to set your default value to your default CSS file. Then set your color themes equal to the name of your cssfile. To do this, seperate the themes by a pipe. Also, it is case sensitive to your css file, so keep that in mind. | |
Example: Default==override||Light==light-theme||Galaxy==galaxy-theme | |
Setting is required: Check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="stylesheet" href="assets/design/css/[[++colortheme]].css">' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Default Theme --> | |
[[If? | |
&subject=`[[++colortheme]]` | |
&operator=`EQ` | |
&operand=`Default` | |
&then=`<link rel="stylesheet" href="assets/design/css/override.css">` | |
]] | |
<!-- Light Theme --> | |
[[If? | |
&subject=`[[++colortheme]]` | |
&operator=`EQ` | |
&operand=`Light` | |
&then=`<link rel="stylesheet" href="assets/design/css/light-theme.css">` | |
]] | |
<!-- Dark Theme --> | |
[[If? | |
&subject=`[[++colortheme]]` | |
&operator=`EQ` | |
&operand=`Dark` | |
&then=`<link rel="stylesheet" href="assets/design/css/dark-theme.css">` | |
]] | |
<!-- Additional Themes --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment