diff options
author | Thomas ZILLIOX <thomas@zilliox.me> | 2013-08-12 03:27:27 +0400 |
---|---|---|
committer | Thomas ZILLIOX <thomas@zilliox.me> | 2013-08-12 03:27:27 +0400 |
commit | 0c7f766e9f2eb0ea65c3f2013c85e8d10e4db3e4 (patch) | |
tree | 4a8544203031f54a9ed865e1cc67fd4248244e62 /plugins/PleineLune | |
parent | e1d48995c3b89f0298d10b0c3e3e2cfbea29d6d6 (diff) |
Initiate theme documentation
Diffstat (limited to 'plugins/PleineLune')
-rw-r--r-- | plugins/PleineLune/README.md | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/plugins/PleineLune/README.md b/plugins/PleineLune/README.md new file mode 100644 index 0000000000..ad5c5596e9 --- /dev/null +++ b/plugins/PleineLune/README.md @@ -0,0 +1,100 @@ +Create a Theme for Piwik +============== + +Quick start +------------ + +1. Create a file to describe your plugin with the following path: "plugins/<yourPluginName>/plugin.piwik.json" + +```json +{ + "theme": true, + "stylesheet": "stylesheets/theme.less" +} +``` + +2. Create your stylesheet file with the following path: "plugins/<yourPluginName>/stylesheets/theme.less" + +3. Activate your theme on the Piwik instance: Settings > Platform > Themes + + +About the plugin.piwik.json file +------------ + +You can complete your plugin.piwik.json file with the following entries: + +* "description" +* "homepage" +* "author" +* "author_homepage" +* "license" +* "license_homepage" +* "version" + + +Activate the development mode +------------- +If you change your theme.less file, you will not see the difference on your Piwik instance. +The stylesheets have a cache mode to prevent from compiling them on every page call. +To disable it, you have to modify the "config/config.ini.php" file: + +```ini + [Debug] + disable_merged_assets = 1 +``` + + +Limitations +------------ +You just can not theme: + +* Installation plugin pages +* CoreUpdater plugin pages + + +How to theme +=============== + +Images +---------- +You can stock your images in the folder "plugins/<yourPluginName>/images". +To use images in CSS, you have to use a relative path that start at the root folder. + +Example: + +```css + background-image: url(plugins/<yourPluginName>/images/dropDown.jpg); +``` + +Multiple stylesheets files +---------- +You can submit only one stylesheets file for theme. +But you can import other Less files from the main theme file: + +Example: + +```css + @import "../../plugins/<yourPluginName>/stylesheets/_<yourSubStylesheetName>.less" +``` + +It's important to use this complex path to prevent compilation bugs. +It is better to prefix your sub stylesheet file name with an '_'. + + +Graphs +---------- +You can style some graph elements. +You should see "plugins/CoreHome/stylesheets/jqplotColors.less" for more informations. + + +Sparklines +---------- +You can style some sparklines elements. +You should see "plugins/CoreHome/stylesheets/sparklineColors.less" for more informations. + + +Transitions +---------- +You can style some transitions elements. +You should see "plugins/Transition/stylesheets/_transitionColors.less" for more informations. + |