All articles

How to install Website Kit and choose a theme

Published:

Website Kit gives a site a ready look and standard pages. This article is a how-to: get the app on the site, open the settings page, pick one of the five ready-made themes, adjust it with tokens and variants or build a custom one, and see what else the first visit needs (Custom CSS, the contact form, the shop, the language).

This article describes Website Kit 0.3.3, an early version.

In short: 1) install Website Kit from the "Apps" tab of your site; 2) open the "Website Kit Settings" page of your site; 3) click one of the five theme cards and save; 4) look at the Home page in both languages (/ and /en); 5) fill in the brand name and contacts; 6) switch on "Allow search engines" when the site is ready.

Installation

Open your site in the dashboard, go to the "Apps" tab, press "Install App" and choose Website Kit. The list appears there once your site is on the platform version that includes Website Kit. The page editor Builder, which the pages need, is added the same way, from the same list. Installing sets the "clear" theme, puts the header and the footer of the kit on the site (only where the standard ones are in place; the site keeps its standard theme) and closes the site to search engines until you allow them. Installing again does not change what you set. Updates reach the site with the platform's site updates; an update leaves the pages you edited alone (the Wiki page on installation says how). The pages need the page editor Builder on the site, and the contact form needs the spam protection; the pages appear once Builder is there.

A site that existed before the kit can be personalised by hand: the settings page has the button "Personalize this site". It copies the company name and the contact data into the kit settings; nothing changes unless you press it.

Which theme to pick

The home page of the demo site with the clear theme

Start from the purpose of the site; every theme can be changed later and the choice is not final.

  • a service or general business site: "clear";
  • a shop or a food business: "market";
  • strict accessibility needs or a large-print audience: "contrast";
  • a technology company or an agency: "night";
  • B2B, accounting or consulting: "ledger".

The settings page

Open the "Website Kit Settings" page of your site. The Website Manager or System Manager role is required.

The Website Kit Settings page: five theme cards, the Custom card and the brand name

Five ready-made themes

The themes are shown as cards with a live preview. The preview is built by the same code that a save runs.

ThemeForMain traits
"clear" (default)services and general businesswhite background, one blue accent, Inter, outlined cards
"market"retail, shops and foodwarm off-white, one warm accent, Lora headings with Source Sans 3, raised cards, pill buttons
"contrast"sites with strict accessibility needstext and interface contrast of at least 7:1, 18 px text, strong borders, square buttons, Roboto
"night"technology and agenciesdark surfaces, light text, one bright accent, Manrope, dark header
"ledger"B2B, accounting and consultingneutral greys, one dark accent, Source Sans 3, flat cards, dense tables

CI checks the contrast of every ready-made theme: 4.5:1 for text and 3:1 for interface parts; "night" is checked on its dark surfaces.

The home page with the market theme: warm colours, round buttons, raised cards

The home page with the contrast theme: black borders, square buttons, large text

The home page with the night theme: dark background and light text

The home page with the ledger theme: neutral greys, flat cards

Saving and applying

Click a theme card and save the page: saving publishes the look to the site. To see a change on the real pages first, use "Save as draft" (in the "Theme" button group): a logged-in Website Manager opens the draft at the address with ?wk_preview=1. If you set your own colours or sizes earlier, the page asks you to confirm before switching to a ready-made theme: your own values are dropped.

The custom theme

The "Custom" card copies the current theme once: every value is written out into the settings, so a later change of a ready-made theme never moves yours. The editor opens:

  • colours: primary (buttons), text on primary, accent, page background, cards and bands, text, secondary text, borders, links, errors, dark band and text on the dark band; each colour is written as #rrggbb;
  • fonts: one for body text and one for headings;
  • base text size;
  • corner radius: none, small, medium, large;
  • density: compact, comfortable, spacious;
  • page parts: header (light, dark, tinted), footer (light, dark), cards (flat, outlined, raised), buttons (solid, pill, square);
  • "Start again from": a copy of another ready-made theme.

When a pair of colours has low contrast, the editor lists it with the ratio and the required minimum. This is a warning, not a block. CI does not check the colours of a custom theme.

The custom theme editor: colours, fonts, text size, corners and the look of the page parts

Tokens and variants

Under the editor every look is a set of CSS custom properties with the prefix --wk-: colours (--wk-color-primary, --wk-color-bg, --wk-color-text and others), type (--wk-font-body, --wk-font-size-base), shape (--wk-radius-md, --wk-border-width) and space (--wk-space-unit, --wk-container-width). The four variants (header, footer, card, button) are set the same way and can be applied to one element of your own with an attribute such as data-wk-card="raised". A change of a ready-made theme never needs a new stylesheet: the app compiles the settings into one small file, wk-theme.css.

Custom CSS in short

Custom CSS is for what the editor cannot do. It is linked after the theme, only on public pages, and checked on every save by a parser; the limits are 32 KB, 1500 rules and nesting depth 3, and rules outside the allowed list are rejected with a reason. The details are in the article "Custom CSS: what is allowed and safe mode".

The contact form and the shop in short

The contact form appears only when the spam protection of the contact form is switched on in the strict mode and usable reCAPTCHA keys and one plain recipient address exist; otherwise the Contact page shows the e-mail and phone. The shop section needs the apps ERPNext and Webshop: "Enable shop" switches Webshop on and adds the "Shop" link, "Load sample products" adds ten examples, and both can be undone ("Remove sample products"; a link you removed is not added again). Details are in the articles on the contact form and on the shop.

Language

The home page on a phone screen

The pages are Ukrainian at the site root and English under /en. The header has a language button: it shows the code of the other language (EN or UK), the language name is its tooltip, and it opens the same page in the other language. On the shop, cart and login pages it opens the same address with ?_lang= and the app keeps the choice in the preferred_language cookie. The menu labels follow the language of the page. Look at the Home page in both languages after choosing a theme: the fonts of a theme have to cover Cyrillic, and all six fonts of the kit do.

Fonts

Six families and the system font are available; file sizes:

FontLatinCyrillic
Inter48 KB19 KB
Source Sans 329 KB18 KB
Manrope25 KB15 KB
Lora38 KB21 KB
Playfair Display38 KB21 KB
Roboto43 KB24 KB

These are variable woff2 fonts with Latin and Cyrillic. They are part of the app; the pages do not call third-party font servers. @font-face rules are written only for the chosen families, and the browser downloads a file when a page uses one of its characters. A page loads at most two families; for a Ukrainian page the Latin and Cyrillic files add up (from the table above) to "night" 40 KB, "ledger" 47 KB, "clear" and "contrast" 67 KB each, "market" 106 KB. All six fonts are under the SIL OFL 1.1 licence; the system font (system) downloads nothing.

Safe mode and reset

  • The address with ?wk_safe=1 shows the public pages to a Website Manager with the theme layer only and no Custom CSS; ?wk_safe=0 leaves the mode. It is a view, not a fix.
  • The page keeps the last 20 saved looks. "Restore a version", "Reset Custom CSS" and "Reset to preset" are saved as new versions too, so the last version before a restore or a reset stays in the list (the last 20 are kept).

More about Custom CSS is in the article on its rules and safe mode.

More in the documentation and the articles: Installing Website Kit, Website Kit: first steps, Custom CSS: what is allowed and safe mode.

© FOSS-ON-LINE LLC, EDRPOU 30291001. Office: 20 Darwin Street, building 3, 3rd floor, Kharkiv 61002, Ukraine. All rights reserved.