forked from zkoss/zkThemeTemplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreadme.txt
executable file
·48 lines (30 loc) · 1.21 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Building prerequisites:
1. Required Node.js >= 10.16
Build Steps:
clone the zkThemeTemplate project
(initially)
init.sh
npm install
(build jar file)
mvn clean package
-> target/___THEME_NAME___.jar
Development:
(compile run preview app)
mvn test exec:java@preview-app
(open a simple preview page in the browser, add your own pages containing the components to preview)
http://localhost:8080
(continuous compile/watch less files - in a separate console)
npm run zklessc-dev
(update less-files with text editor, save file -> auto zkless compile -> browser will reload style sheet zk.wcs)
How to use ___THEME_NAME___.jar:
1. Put ___THEME_NAME___.jar in WEB-INF/lib, then ___THEME_NAME___ will become your default theme if there is no others theme.
2. Now you can also dynamically switch between different themes by cookie or library property
* Use library-property
<!-- in WEB-INF/zk.xml -->
<library-property>
<name>org.zkoss.theme.preferred</name>
<value>___THEME_NAME___</value>
</library-property>
* Use cookie to switch theme, add a cookie
zktheme=___THEME_NAME___
It does not require a server restart, but user has to refresh the browser.