Theme Template"

From Documentation
 
Line 10: Line 10:
 
The general steps are:
 
The general steps are:
  
# Fork [https://github.com/zkoss/zkThemeTemplate the repository]
+
# Fork [https://github.com/zkoss/zkThemeTemplate the zkThemeTemplate repository]
 
# initialize the theme project
 
# initialize the theme project
# modify LESS files and preview
+
# modify [https://lesscss.org/ LESS] files and preview
 
# build a jar
 
# build a jar
 
# apply to your project
 
# apply to your project
Line 22: Line 22:
 
https://www.zkoss.org/wiki/Small_Talks/2016/May/New_Approach_for_Building_Custom_ZK_Theme
 
https://www.zkoss.org/wiki/Small_Talks/2016/May/New_Approach_for_Building_Custom_ZK_Theme
 
-->
 
-->
 +
 
= Benefits=
 
= Benefits=
 
This approach has some benefits that previous approaches don't have.
 
This approach has some benefits that previous approaches don't have.

Latest revision as of 04:21, 14 March 2022


Since 8.0.2

We collect all style-related files into ZK theme template project at Github, making it much easier to create a custom theme. The main idea here is to have a ZK template theme as the base theme, which then allows ZK app developers to fork the repository and commit your changes in your repository to create your new custom theme.

Process

The general steps are:

  1. Fork the zkThemeTemplate repository
  2. initialize the theme project
  3. modify LESS files and preview
  4. build a jar
  5. apply to your project


For detailed steps, please see README in zkThemeTemplate


Benefits

This approach has some benefits that previous approaches don't have.

Easy to Maintain

Committing your change into a git repository makes your change easy to track in the future. Therefore, your team can know what's difference between your custom theme and ZK standard theme. It's easy to identify an issue.

Easy to Upgrade

If you isolate your custom change into separate files, you can easily merge changes with git from the original repository when there are fixes committed to the original theme template. Moreover, it's can be done automatically. You don't need to manually compare changed files and apply the changes by yourselves. This reduces human errors.



Last Update : 2022/03/14

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.