Recommend this page to a friend! |
Download .zip |
Info | Example | Demos | View files (9) | Download .zip | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not enough user ratings | Total: 162 | All time: 8,864 This week: 269 |
Version | License | PHP version | Categories | |||
themeroller 1.1 | MIT/X Consortium ... | 5 | HTML, PHP 5 |
Description | Author | ||||||||
This class can generate CSS style sheets with color palette themes. |
|
Version 1.0.1 23 May 2016
Theme Roller creates CSS style sheets on the fly. Palettes for the chosen theme are created, as well as "all-color" palettes.
Components to make Theme Roller work: * themeRoller.class.php - the class file * sample.php - sample script to test functionality * sample2.php - sample script to test functionality * theme.php - the generated CSS style sheet (output as a CSS string) * themeStrings.php - like theme.php, but this file exposes certain variables that may come in handy in debugging * themeContent.php - the CSS directives go here; used by theme.php and themeStrings.php * readme.md - instructions
There are 2 static functions for use: * selectTheme() - checks $_SESSION['theme']['choice'] to get the desired theme code; if not found, the designated default code is returned. * themeOptionSelect() - returns a list of theme options to select from
Instantiate the Theme Roller object like this:
> $roller = new ThemeRoller($theme, 'Colour theme: {{theme-title}}');
where $theme is the theme code (can be obtained from selectTheme() or set specifically) and the second parameter is the title that will go in the CSS file.
This file contains the rules to generate the CSS styles.
Comprehensive debug functionality is built in. This is also useful for learning how the class works internally. Make sure the debug directory is writeable. Currently set to /data/debug/, you may change that to suit your needs.
The MIT License (MIT)
Copyright (c) 2016 Gerry Danen
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Files |
File | Role | Description |
---|---|---|
buildUrl.inc.php | Appl. | Helper script |
generalFunctions.inc.php | Aux. | Helper script |
readme.md | Doc. | documentation |
sample.php | Example | Sample usage |
sample2.php | Example | Example file |
theme.php | Appl. | Generated CSS |
themeContent.php | Appl. | CSS rules |
themeRoller.class.php | Class | Class file |
themeStrings.php | Aux. | Helper script |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
0% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.