Themes without code
A theme without code is only HTML, CSS and files. A person makes it, or an AI app from a mockup. The engine draws it itself, from engine 1.163.0. Nothing in it ever runs, on the server or in the browser.
That is why such a theme may also run on the shared frontend. A theme with PHP needs a frontend of your own.
Without code or with code
Most designs no longer need code. Movement and simple interaction can be pure CSS, and the engine draws the rest: menus, forms, search, the cookie notice and the language switch.
| Without code | Still needs a theme with code |
|---|---|
| Your own layout, sections, colours and fonts | A slider that plays by itself, with a pause button |
| Fading in or moving while you scroll | Filters or sorting that you design yourself |
| A slider you swipe or scroll, with dots and arrows | Your own search, or a calculator |
| Open and close, such as a list of questions | A map or another embed from another site |
| A sticky header, smooth scrolling | Your own PHP, such as data from another system |
Forms, search and the menu for small screens come from the engine, so they work in both kinds of theme.
Movement and interaction in CSS
- Scroll effects:
animation-timeline: view()orscroll(), with@keyframes. Use it for fading in, a progress bar or a slow parallax. - A slider: a row with
overflow-x: autoandscroll-snap-type. Newer browsers also draw dots and arrows with::scroll-markerand::scroll-button(). - Open and close:
<details>with<summary>, styled in theme.css. - Hover and focus:
:hover,:focus-visible,:has()and transitions.
Some things to keep in mind:
- Not every browser has everything yet. Put the effect in
@supports, so the page also reads well without it. A slider that does not move by itself is fine. - Less movement: wrap animations in
@media (prefers-reduced-motion: no-preference). Without that, the check warns. - The content stays in the HTML. Nothing is hidden until a script shows it, so search engines and screen readers see everything.
The package
A package is a zip, as every theme package, of at most 20 MB, with at most 2 MB per file.
| File | What it is |
|---|---|
THEME |
JSON: {"key": "…", "version": "1.0.0", "kind": "html", "format": 1, "parent": "base", "engine": ">=1.163.0"} |
MANIFEST.sha256 |
A hash of every file. |
layout.html |
The inside of <body>, with places. Required. |
theme.css |
The theme's CSS. Optional. |
sections/<type>.html |
A template per section type, from engine 1.164.0. A type without one is drawn by the parent. |
assets/… |
woff2, png, jpg, jpeg, webp, avif, gif, svg and ico. |
README.md, LICENSE |
Optional. |
Nothing else may be in it. So there is no PHP, no JavaScript and no other HTML. An SVG is checked as a page, so it has no scripts, foreignObject or event attributes.
formatis the format the package was made for. A format newer than the engine reads is refused.parentdraws what the design does not, such as blog overviews, records and forms. It isbasewhen left out.engineworks as for every package.
layout.html
The engine draws the rest of the page itself: <html lang>, the <head>, the cookie notice, the skip link to #main, and the scripts. A layout cannot leave these out.
A place is an empty element with data-lb-place. The element stays, with its own classes, around what the engine draws. It is left out when that is nothing.
| Place | What the engine draws | Required |
|---|---|---|
content |
The page's <main>, with the element's classes |
Exactly once, on a <div> |
menu:main |
The main menu, with its submenus and the button for small screens | Once, unless header is used |
menu:<id> |
Another menu, as a list | No |
logo |
The logo, as a link to home. With dark mode, the logo for dark in dark | Unless header, logo:dark or logo:light is used |
logo:dark |
For a header that is dark in both schemes, such as a navy one: always the logo for dark (Logo on dark), else the logo. From engine 1.167.0 | No |
logo:light |
For a header that stays light while the site has dark mode: always the logo. From engine 1.167.0 | No |
language-switch |
The languages | No |
search |
The search form | No |
breadcrumbs |
The breadcrumbs | No |
theme-switch |
Light and dark, when the site has dark mode | No |
copyright |
© year and the site's name | No; may repeat |
cta |
The buttons of Lightbolt's header, from engine 1.166.0 | No; not together with header |
header, footer |
Lightbolt's own header or footer | No; on a <div> |
The layout has exactly one page header: a <header>, or the place header. It has at most one page footer. It has no <main> and no <h1>. Every <nav> has aria-label or aria-labelledby.
Fields: {{site_name}}, {{lang}}, {{year}} and {{home}}. They are text.
Fields in templates
| Syntax | What it does |
|---|---|
{{field}} |
Text, always escaped. |
{{{field}}} |
Only a field of type html. Never in an attribute. |
{{#field}}…{{/field}} |
A list once per item. Another value once, when it is not empty. |
{{^field}}…{{/field}} |
Once, when the field is empty. |
Anything else between {{ }} is an error. A field may stand in text, and in class, id, href, src, alt, title, aria-label, datetime, lang and data-*. In href and src, a value that is no address becomes #.
Section templates
From engine 1.164.0, a design can draw its own sections: text, hero, banner, feature, media, items and gallery. Other types, such as list, posts and search-results, are always drawn by the parent.
- The engine draws the
<section>around a template, with its classes and anchor. So a template has no<section>. - A heading is
<lb-heading>. The engine makes it<h1>,<h2>or<h3>, by where the section stands. So a template has no<h1>–<h6>. - The place
imageis written<span data-lb-place="image" data-sizes="(min-width: 48rem) 50vw, 100vw"></span>.{{{image}}}also works, with sizes by type. - The place
viewer(engine 1.169.0) belongs only insections/slides.html, exactly once:<div data-lb-place="viewer"></div>. The engine draws the presentation in it. A design styles.lb-slides,.lb-slide-frame,.lb-slides-prev,.lb-slides-next,.lb-slides-full,.lb-slides-countand.lb-slide-text.
Fields on every type: icon, label, title, title_html, content and buttons. A button has href, text, style, external and icon.
| Type | Its own fields | layout |
|---|---|---|
text |
illustration |
|
hero |
image, illustration |
centered, split |
banner |
image |
|
feature |
image, illustration |
"", left, right |
media |
items: title, content, image, alt, href, external, icon, buttons |
left, right, zigzag, grid |
items |
items: title, description, image, alt, href, external, icon, stars, date |
|
gallery |
items: image, alt, href |
{{layout}}is text, for a class. Each value also has a flag, such as{{#layout_split}}…{{/layout_split}}.- From engine 1.166.0 every item also has its place in the list:
number(1, 2 …),number_padded(01, 02 …),firstandlast. Never inside an attribute. A template that uses them needs>=1.166.0. - Every list has a flag beside it, such as
{{#has_items}}, for a wrapper drawn once. - Every field is always there, empty when the site has none. Inside
{{#items}}, a name never falls through to the section.
A package with section templates needs >=1.164.0. The engine's docs/html-sections.json holds the same, with since per field.
What is refused
- Elements:
script,noscript,iframe,object,embed,base,meta,link,style,html,head,body,title,main,formand its fields,button,template,slot,dialog, and a few more. - Attributes:
on…,data-lbanddata-lb-…other thandata-lb-place,is,srcdoc,actionandformaction. - Addresses:
javascript:,vbscript:anddata:, except an image inimg srcthat is not SVG. Files from other sites insrc,srcsetorposter: put them inassets/or Media. - ids: the same id twice,
main, or one that starts withlb-.
Comments are left out of the page. assets/… becomes the address where the engine publishes the files.
theme.css
It loads after the engine's CSS, so it can restyle everything. Colours and fonts go through the site's variables, such as var(--c-primary), var(--c-text), var(--c-bg), var(--font-body) and var(--font-headings). The palette, fonts and dark mode of Lightbolt then apply.
| Refused | Warned |
|---|---|
@import |
!important on .lb-… classes |
url() other than assets/ or a data: image |
Animations without prefers-reduced-motion |
expression(), javascript:, vbscript:, the property behavior, -moz-binding, also written with escapes |
@font-face without font-display |
outline: none on :focus without another visible mark |
|
Hiding .lb-skip, .lb-consent, .lb-sr or [role=status] |
|
| Fonts other than woff2 |
The site's font library comes first. A font in the package is only for a family the library does not have.
scroll-behavior and overscroll-behavior are fine from engine 1.168.0; a package with them needs that engine. A sticky page header sets its height on :root, such as :root { --lb-sticky-top: 4.5rem; } (engine 1.168.0). The side bars of Help, Docs and lists then stick below it, and a link to #… lands below it too. A header that is not sticky leaves it out.
How it is checked
Lightbolt checks a package with the same rules as the engine, before it keeps it. The rules come from the engine itself: docs/html-sections.json in the engine zip. Every reason is shown, in the engine's words, such as layout.html: unknown place: weather.
- Under Organisation → Themes: an upload with
"kind": "html"is refused with all its reasons. - Keys: a theme key is unique across Lightbolt. An upload with a key another organisation has is refused.
- Through MCP:
publish_designmakes the package from the files an AI app sends. See MCP server.- The key is
ai-<site id>, and each call makes a new version. engineis the highest engine version of what the design uses:>=1.163.0for a layout,>=1.164.0with section templates.- Staging's engine then looks at it at once. A refusal comes back with its reasons, and staging keeps its theme.
- The key is
- By the engine: it checks again before it draws a package. A refused version is never fetched again under that number.
Also called: html theme, design from a mockup, AI design, no-code theme.
Last changed