0

Dark+Light theme

asked 2022-01-10 16:01:46 +0800

ivtu gravatar image ivtu
11 2

Hello, we are preparing to migrate to ZK 9.6, and we need new theme. I have 'light' custom theme created. I cloned https://github.com/zkoss/zkThemeTemplate and created custom theme based on iceblue ZK theme. Now I want to create one additional 'dark' theme. Can I do that in the same project somehow or I have to have separate project for 'dark' theme?

delete flag offensive retag edit

3 Answers

Sort by ยป oldest newest most voted
0

answered 2022-01-11 09:55:38 +0800

MDuchemin gravatar image MDuchemin
2560 1 6
ZK Team

updated 2022-01-12 17:55:05 +0800

Hey there,

I'd say it depends on the amount of customization that you are doing. When you run init.sh on the project, it will set the theme name and info into a number of places (version files, build file, etc).

That theme id is used internally by ZK to generate unique URLs which will force the client to load the content set for your theme. Due to that, it's really a good idea to keep these names (and URI) exclusive for each of your themes.

This said, if you are planning to have multiple themes using the same structure but slightly different colors, and you have access to the premium download for the ZK theme pack, there is a utility in the theme pack source that lets you build variations on the same themes but with different color palettes.

The src jar contains the buildable project, and instructions on how to build in the readme.md file located at root.

You can find it in the theme back src jar, on maven or in the premium downloads section.

link publish delete flag offensive edit
0

answered 2022-01-11 16:35:45 +0800

ivtu gravatar image ivtu
11 2

updated 2022-01-11 16:45:53 +0800

Hi, thanks for support. Yes, I have access to theme pack. Where can I find documentation how to use that ThemePack utility to build variations of the same them based on different color palette? Or should I create ZK support ticket for this?

In other words, I have color pallete variables bellow [ROOT]/src/archive/web/zul/less/colors but I do not know how to build two jars or how to change to dark palette in runtime.

link publish delete flag offensive edit
0

answered 2022-01-12 17:29:40 +0800

MDuchemin gravatar image MDuchemin
2560 1 6
ZK Team

updated 2022-01-12 17:54:53 +0800

You can find it in the theme back src jar, on maven or in the premium downloads section.

Make sure you download the src jar (not the binaries).

The source jar is just the runnable project which can be used to generate the projects based on swappable palettes. I recommend that you follow the readme included in that project.

The short version is:

  • create as many color palettes (one for each resulting theme) in the theme-pack\palettes folder
  • edit the build.palettes.yml config file to set which palettes you want to build
  • add your version of the theme template project under theme-pack\template (if you have made modifications other than changing colors)

you can then either build all themes at once (will generate one theme per palette you created), or build one of the palette. (see readme file for the relevant commands)

-edit- formatting

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2022-01-10 16:01:46 +0800

Seen: 14 times

Last updated: Jan 12 '22

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More