2026-11-26 21:13:59 +01:00
Vanilla Respondage — LimeSurvey theme (version 6/7 compatible), extension of the core Vanilla theme by Respondage.
2026-11-16 19:51:19 +01:00
2026-11-26 21:13:59 +01:00
This is a very elaborate starter theme. You can use this as your own or your organisation's theme by adapting the theme settings. You can also make your own variant. See the instructions for this developer's work. Client-specific variants (e.g. `respondage_<client>` )
2026-11-24 22:04:11 +01:00
extend this theme via `<extends>vanilla_respondage</extends>` and contain only
2026-11-16 19:51:19 +01:00
a generated `config.xml` plus their own `files/` (logos). LimeSurvey inherits
2026-11-24 22:04:11 +01:00
all files (views, css, js, images, options page) from the starter theme, so any
2026-11-16 19:51:19 +01:00
change to a file in this theme automatically applies to all variants — no
copying of files needed.
2026-11-24 22:04:11 +01:00
## Features
- **Neatly formatted options list**: the theme ships its own custom options
page (`<optionspage>custom</optionspage>` + `options/options.twig` ). All
options from `config.xml` are rendered generically, grouped per category in
tabs, with consistent Bootstrap form markup, conditional visibility of
child options (a field with `parent="..."` is hidden unless the parent is
`on` ), image previews (lightbox) and image upload — see
`options/options.twig` and the sections below.
fix(header): exact logo-top margin (0px touches top); menu texts on their own header row
- nav_bar.twig: header split into two rows — row 1 .survey-nav-logo-row holds
all logos (left far left, center absolutely centered in the row, right
ms-auto far right) so they align; row 2 #navbar holds the menu texts
(language changer, save/clear all, question index) full-width, right-aligned
- sass/plain.sass (leading): #survey-nav align-items:flex-start, container
stretch, .survey-nav-logo-row relative/w-100, .logo-container and its img
padding-top:0, .logo-center top:0 translateX(-50%); dropped .logo-right
margin-left:0 (ms-auto now on the element)
- css/plain.css: compiled from sass with dart-sass (export guard green)
- custom_header.twig: <pos>logotopmargin now emitted as margin-top on the
.logo-*.logo-container, so the value is the EXACT distance from the top of
the header to the logo (0px = logo touches the top of the page)
- README.md: header layout + logo-top-distance sections updated
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-27 19:56:11 +01:00
- Header with left / center / right logos in a single top row: the left logo
always sticks to the far left, the center logo is always exactly centered
(absolutely positioned, independent of the other logos), the right logo
always sticks to the far right — so all logos align nicely. The right-side
menu texts (language changer, save/clear all, question index) sit on their
own row in the header, below the logos, right-aligned.
docs(readme): refresh stale sections (logos model, navbar color, sticky header, variants/ tracking, public release)
- 'What's in here': variants/ is no longer 'fully gitignored' — the generic
tooling (build.php, build_all.sh, export_public.sh) and variants/example/
are tracked; only *.json, leak-patterns.txt and tests/ stay local.
- Header logos section rewritten for the current model: <pos>logofile imagefile
options ('off' = no logo) + per-device <pos>showoncomputer/tablet/mobile
checkboxes (the old <pos>logo on/off + <pos>logohideonsmall keys are gone).
- Menu item color: navbarfontcolor is now a 6-way color-chooser dropdown in the
Header category (+ navbarfontcolorcustom), not a plain Colors colorpicker.
- Sticky header: the legacy headersticky master switch no longer gates the
three per-device checkboxes.
- Public release section: corrected the gitignored list (dropped nonexistent
README.internal.md, added limesurvey.md/OPEN_PROMPTS.md/SECURITY_REVIEW*,
files/logos.svg; noted preview.svg is public on purpose).
export_public.sh exit 0.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 12:40:15 +01:00
Each logo can be shown/hidden per device (computer / tablet / mobile), and
each logo has a top margin option that is the exact distance from the top of
the header to the logo (`0` = the logo touches the top of the page).
2026-11-24 22:04:11 +01:00
- House-style colors, fonts and logos per client variant, without code
duplication (thin variants extending this starter theme).
## Why use this theme
Arguments for choosing Respondage Vanilla:
- **Local fonts — and you can add your own.** Every selectable font is served
from your own LimeSurvey server: the bundled open source fonts in
`files/fonts/` (woff2 + `@font-face` in `css/fonts.css` ) and the
browser/system fonts (the local `font-websafe` package, pure CSS stacks).
Adding your own font is documented step by step in `files/fonts/README.md`
(license file + font file + `@font-face` + dropdown entry in `config.xml` ),
and per client variant via `fontOptions` in `variants/<client>.json` +
`variants/build.php` . On top of the base (default) font there are
per-element font overrides — header, progress bar, question titles,
answers/help, group titles/descriptions, buttons — see
"Per-element font overrides (fontselect)" below.
- **No calls to Google — or any other external host — while surveys are being
taken** (privacy by design). Enforced at three levels: (1) all fonts are
self-hosted or system fonts, no external `@font-face` /css/js/twig anywhere in
the theme; (2) a runtime whitelist in `options/options.js`
(`ALLOWED_FONT_PACKAGES = ['websafe']` ) that only ever lets the * local *
`font-websafe` package into `packages_to_load` — package-based external fonts
(e.g. Google-hosted `font-roboto` /`font-noto` ) are skipped with a warning, so
adding Google Fonts via the theme options is no longer possible; (3) a
build-time check in `variants/export_public.sh` that aborts the public release
when any text file references an external host. Caveat: if you * deliberately *
hardcode an external URL yourself (e.g. a Google Fonts `<link>` in your own
css file), no theme can stop a developer from doing that on purpose — but the
theme as shipped never does, and such a release would fail the export check.
- **Big Tech free, as befits Open Source Software.** The theme is licensed
GPL v2 or later (see `LICENSE` ), has no proprietary dependencies, no telemetry
and no external services: everything a respondent's browser loads during a
survey comes from your own server.
2026-11-16 19:51:19 +01:00
## What's in here
- `config.xml` — theme manifest incl. all theme options (colors, fonts, font
sizes/weights/colors, header logos, ...).
- `views/` — twig overrides (header with left/center/right logos and navbar
menu color, survey list, question, group description).
2026-11-30 09:11:39 +01:00
- `css/*.css` — theme styles (listed in config.xml `<files>` and served
2026-11-24 22:04:11 +01:00
as-is by LimeSurvey). The asset manager hashes the file mtime into the
published URL, so a changed css is picked up automatically (no cache clear
2026-11-30 09:11:39 +01:00
needed). These are BUILD ARTIFACTS: the leading sources are the
developer-local `sass/*.sass` files (gitignored) — edit the .sass, compile
with `sass --watch sass:css` (or `sass sass/<name>.sass css/<name>.css` ),
commit the recompiled css. `variants/export_public.sh` aborts the public
export if any css/*.css is stale or has no sass source.
- `scripts/custom.js` — loaded last, safe for project tweaks.
2026-11-24 22:04:11 +01:00
- `options/` — the CUSTOM options page: config.xml sets
`<optionspage>custom</optionspage>` , so LimeSurvey renders
`options/options.twig` (and auto-registers `options/options.js` ) instead of
the core `options_core.php` . The twig renders all options generically from
the `<options>` in config.xml (via `aOptionAttributes` ), grouped by category,
so adding an option to config.xml is enough — it appears in the UI
automatically. `options/options.js` is a copy of the core package
`assets/packages/themeoptions-core/themeoptions-core.js` (patched to also
hide `.action_hide_on_inherit` rows on "Inherit everything"; re-apply that
patch when updating the copy).
docs(readme): refresh stale sections (logos model, navbar color, sticky header, variants/ tracking, public release)
- 'What's in here': variants/ is no longer 'fully gitignored' — the generic
tooling (build.php, build_all.sh, export_public.sh) and variants/example/
are tracked; only *.json, leak-patterns.txt and tests/ stay local.
- Header logos section rewritten for the current model: <pos>logofile imagefile
options ('off' = no logo) + per-device <pos>showoncomputer/tablet/mobile
checkboxes (the old <pos>logo on/off + <pos>logohideonsmall keys are gone).
- Menu item color: navbarfontcolor is now a 6-way color-chooser dropdown in the
Header category (+ navbarfontcolorcustom), not a plain Colors colorpicker.
- Sticky header: the legacy headersticky master switch no longer gates the
three per-device checkboxes.
- Public release section: corrected the gitignored list (dropped nonexistent
README.internal.md, added limesurvey.md/OPEN_PROMPTS.md/SECURITY_REVIEW*,
files/logos.svg; noted preview.svg is public on purpose).
export_public.sh exit 0.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 12:40:15 +01:00
- `variants/` — the GENERIC tooling is tracked and public: `build.php` ,
`build_all.sh` , `export_public.sh` and `example/` (the public example output
of a variant build). Only the confidential parts are gitignored (see
`.gitignore` ): `variants/*.json` (client definitions with house-style
values), `variants/leak-patterns.txt` and `variants/tests/` — those live in
the private variants repo, not here.
2026-11-24 22:04:11 +01:00
## Multiple languages in the theme options (i18n)
All labels on the custom options page (`options/options.twig` ) go through
`gT()` : option `title` s, category names, `optionlabels` , the Yes/No/Inherit
buttons, and the dropdown labels (via
`TemplateManifest::translateDropdownOptions()` ; in our twig via `gT()` on the
options). The options page therefore automatically shows the logged-in
admin's UI language — for every string that exists in the translation catalog.
LimeSurvey merges two translation sources (`LSMessageSource::loadMessages()` ):
1. the gettext catalogs `locale/<lang>/<lang>.mo` — these contain all core
strings in ~60 languages (Yes, No, Inherit, ...);
2. the database tables `lime_source_message` + `lime_message`
(`source_message(id, category, message)` , `message(id, language,
translation)`; merged at DBVersion >= 480).
**Translating your own theme strings** is done per installation via the
message tables (pure data in your own DB, no core change). The source string
must exactly match the `title=` in config.xml (English is the source language):
```sql
INSERT INTO lime_source_message (category, message)
VALUES ('', 'Display logo on the left of the header');
INSERT INTO lime_message (id, language, translation)
VALUES (LAST_INSERT_ID(), 'nl', 'Toon logo links in de header');
```
Repeat per language/label. The admin sees the translation as soon as their UI
language matches. Note: the sandboxed twig has no accessor for the current
language code, so an in-theme translation dictionary cannot reliably pick the
language — the message tables are the right mechanism for that (a feature
request to expose the current language to twig has been prepared for the
LimeSurvey developers).
2026-11-16 19:51:19 +01:00
## Header logos (left / center / right)
docs(readme): refresh stale sections (logos model, navbar color, sticky header, variants/ tracking, public release)
- 'What's in here': variants/ is no longer 'fully gitignored' — the generic
tooling (build.php, build_all.sh, export_public.sh) and variants/example/
are tracked; only *.json, leak-patterns.txt and tests/ stay local.
- Header logos section rewritten for the current model: <pos>logofile imagefile
options ('off' = no logo) + per-device <pos>showoncomputer/tablet/mobile
checkboxes (the old <pos>logo on/off + <pos>logohideonsmall keys are gone).
- Menu item color: navbarfontcolor is now a 6-way color-chooser dropdown in the
Header category (+ navbarfontcolorcustom), not a plain Colors colorpicker.
- Sticky header: the legacy headersticky master switch no longer gates the
three per-device checkboxes.
- Public release section: corrected the gitignored list (dropped nonexistent
README.internal.md, added limesurvey.md/OPEN_PROMPTS.md/SECURITY_REVIEW*,
files/logos.svg; noted preview.svg is public on purpose).
export_public.sh exit 0.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 12:40:15 +01:00
Three independent logo file options in the Header category: `brandlogofile`
(left), `centerlogofile` (center), `rightlogofile` (right) — each is an
`imagefile` option where `off` means "no logo". All three logos share one
top-aligned row (`.survey-nav-logo-row` in `nav_bar.twig` ); the center logo is
absolutely positioned at `left: 50%` of that row (see `css/plain.css` ), so it
sits in the true center of the header no matter how wide the left or right
logo is. Logo files are looked up in the theme's own `files/` folder first,
then in the starter theme's `files/` folder (and validated by core:
only `gif,ico,jpg,jpeg,png` — SVG is rejected).
2026-11-24 22:04:11 +01:00
docs(readme): refresh stale sections (logos model, navbar color, sticky header, variants/ tracking, public release)
- 'What's in here': variants/ is no longer 'fully gitignored' — the generic
tooling (build.php, build_all.sh, export_public.sh) and variants/example/
are tracked; only *.json, leak-patterns.txt and tests/ stay local.
- Header logos section rewritten for the current model: <pos>logofile imagefile
options ('off' = no logo) + per-device <pos>showoncomputer/tablet/mobile
checkboxes (the old <pos>logo on/off + <pos>logohideonsmall keys are gone).
- Menu item color: navbarfontcolor is now a 6-way color-chooser dropdown in the
Header category (+ navbarfontcolorcustom), not a plain Colors colorpicker.
- Sticky header: the legacy headersticky master switch no longer gates the
three per-device checkboxes.
- Public release section: corrected the gitignored list (dropped nonexistent
README.internal.md, added limesurvey.md/OPEN_PROMPTS.md/SECURITY_REVIEW*,
files/logos.svg; noted preview.svg is public on purpose).
export_public.sh exit 0.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 12:40:15 +01:00
Per logo there are also three visibility checkboxes — `brandshowoncomputer` ,
`brandshowontablet` , `brandshowonmobile` (and the `center…` /`right…`
equivalents), Header category, default computer/tablet on, mobile off —
mapped to Bootstrap display classes in `nav_bar.twig`
(`logoVisibilityClasses()` ). All logo options appear automatically in the
custom options page (see `options/options.twig` ).
2026-11-16 19:51:19 +01:00
2026-11-16 19:51:19 +01:00
## Menu item color in the top bar
docs(readme): refresh stale sections (logos model, navbar color, sticky header, variants/ tracking, public release)
- 'What's in here': variants/ is no longer 'fully gitignored' — the generic
tooling (build.php, build_all.sh, export_public.sh) and variants/example/
are tracked; only *.json, leak-patterns.txt and tests/ stay local.
- Header logos section rewritten for the current model: <pos>logofile imagefile
options ('off' = no logo) + per-device <pos>showoncomputer/tablet/mobile
checkboxes (the old <pos>logo on/off + <pos>logohideonsmall keys are gone).
- Menu item color: navbarfontcolor is now a 6-way color-chooser dropdown in the
Header category (+ navbarfontcolorcustom), not a plain Colors colorpicker.
- Sticky header: the legacy headersticky master switch no longer gates the
three per-device checkboxes.
- Public release section: corrected the gitignored list (dropped nonexistent
README.internal.md, added limesurvey.md/OPEN_PROMPTS.md/SECURITY_REVIEW*,
files/logos.svg; noted preview.svg is public on purpose).
export_public.sh exit 0.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 12:40:15 +01:00
Option `navbarfontcolor` (Header category) is a color-chooser dropdown
(`default | defaultbackgroundcolor | color1 | color2 | color3 | other` , plus
the `navbarfontcolorcustom` picker for "Other ..."): `default` = the default
font color, `color1/2/3` = primary/secondary/tertiary color, a legacy stored
hex passes through directly. It is resolved and applied in
`views/subviews/header/custom_header.twig` and should contrast with
`headerbackgroundcolor` (same chooser scheme).
2026-11-16 19:51:19 +01:00
2026-11-16 19:51:19 +01:00
## Distance from the logo to the top of the screen
fix(header): exact logo-top margin (0px touches top); menu texts on their own header row
- nav_bar.twig: header split into two rows — row 1 .survey-nav-logo-row holds
all logos (left far left, center absolutely centered in the row, right
ms-auto far right) so they align; row 2 #navbar holds the menu texts
(language changer, save/clear all, question index) full-width, right-aligned
- sass/plain.sass (leading): #survey-nav align-items:flex-start, container
stretch, .survey-nav-logo-row relative/w-100, .logo-container and its img
padding-top:0, .logo-center top:0 translateX(-50%); dropped .logo-right
margin-left:0 (ms-auto now on the element)
- css/plain.css: compiled from sass with dart-sass (export guard green)
- custom_header.twig: <pos>logotopmargin now emitted as margin-top on the
.logo-*.logo-container, so the value is the EXACT distance from the top of
the header to the logo (0px = logo touches the top of the page)
- README.md: header layout + logo-top-distance sections updated
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-27 19:56:11 +01:00
Per logo, options `brandlogotopmargin` / `centerlogotopmargin` /
`rightlogotopmargin` (Header category, plain px number 0-100, e.g. `30` or
`0` ) set the distance from the top of the header to the top of that logo,
applied as `margin-top` on the logo container in `custom_header.twig` . The
header content is top-aligned and the logo containers/images have no top
padding (see `css/plain.css` ), so the value is the EXACT distance: use `0`
to make a logo touch the top of the page.
2026-11-16 19:51:19 +01:00
2026-11-24 22:04:11 +01:00
## Sticky header per screen size (computer / tablet / mobile)
docs(readme): refresh stale sections (logos model, navbar color, sticky header, variants/ tracking, public release)
- 'What's in here': variants/ is no longer 'fully gitignored' — the generic
tooling (build.php, build_all.sh, export_public.sh) and variants/example/
are tracked; only *.json, leak-patterns.txt and tests/ stay local.
- Header logos section rewritten for the current model: <pos>logofile imagefile
options ('off' = no logo) + per-device <pos>showoncomputer/tablet/mobile
checkboxes (the old <pos>logo on/off + <pos>logohideonsmall keys are gone).
- Menu item color: navbarfontcolor is now a 6-way color-chooser dropdown in the
Header category (+ navbarfontcolorcustom), not a plain Colors colorpicker.
- Sticky header: the legacy headersticky master switch no longer gates the
three per-device checkboxes.
- Public release section: corrected the gitignored list (dropped nonexistent
README.internal.md, added limesurvey.md/OPEN_PROMPTS.md/SECURITY_REVIEW*,
files/logos.svg; noted preview.svg is public on purpose).
export_public.sh exit 0.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 12:40:15 +01:00
In the **Header ** tab: `headerstickycomputer` ("Computer screen"),
`headerstickytablet` ("Tablet"), `headerstickymobile` ("Mobile phone")
checkboxes, independent of each other (the legacy `headersticky` Yes/No master
switch still exists but no longer gates them). Defaults: sticky on computer
and tablet, **not ** on mobile.
2026-11-24 22:04:11 +01:00
The breakpoints are Bootstrap's default ones: phone < `md` (768px), tablet
`md` – `lg` (768– 991px), computer ≥ `lg` (992px). `custom_header.twig` emits the
`.fixed-top` rules inside the selected range(s) as media queries on
`#survey-nav` ; `nav_bar.twig` no longer hardcodes `fixed-top` (before a theme
reset, when the options don't exist in the DB yet, the old always-sticky
`fixed-top` behaviour is kept as fallback). `scripts/custom.js` corrects the
body `padding-top` per viewport: when the header is not fixed at the current
width, the extra padding is removed.
## Bundled open source fonts (self-hosted custom fonts)
To show that self-hosted fonts work just as well as browser fonts, the starter theme
feat(fonts): row 228 — Inter as default font, 4-font bundle incl. Atkinson Hyperlegible
Purged: EB Garamond, Liberation Sans 400/700, Open Sans, Source Serif 4
(rationale in README.md 'Default font'). Kept: Inter (now the default of the
font option, best screen readability at survey sizes, with Noto Sans stacked
behind it as multilingual fallback), Noto Sans, Noto Serif (the one serif,
non-Latin coverage). Added: Atkinson Hyperlegible 400/700 (OFL 1.1, from
googlefonts/atkinson-hyperlegible) as the accessibility variant for
respondents with reading impairments. sass/fonts.sass is the leading source;
css/fonts.css recompiled. README.md + files/fonts/README.md document the
choice and the alternatives. Variant propagation parked per row 222.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 10:31:07 +01:00
bundles four OFL-licensed fonts (woff2) in `files/fonts/` :
2026-11-24 22:04:11 +01:00
feat(fonts): row 228 — Inter as default font, 4-font bundle incl. Atkinson Hyperlegible
Purged: EB Garamond, Liberation Sans 400/700, Open Sans, Source Serif 4
(rationale in README.md 'Default font'). Kept: Inter (now the default of the
font option, best screen readability at survey sizes, with Noto Sans stacked
behind it as multilingual fallback), Noto Sans, Noto Serif (the one serif,
non-Latin coverage). Added: Atkinson Hyperlegible 400/700 (OFL 1.1, from
googlefonts/atkinson-hyperlegible) as the accessibility variant for
respondents with reading impairments. sass/fonts.sass is the leading source;
css/fonts.css recompiled. README.md + files/fonts/README.md document the
choice and the alternatives. Variant propagation parked per row 222.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 10:31:07 +01:00
- **Inter** (sans-serif, variable 100– 900) — **the default of the `font` option ** , see "Default font" below
- **Noto Sans** (sans-serif, variable 100– 900) — multilingual fallback, stacked directly behind Inter in the `.font-inter` rule
- **Noto Serif** (serif, variable 100– 900) — the one bundled serif; also covers non-Latin scripts
- **Atkinson Hyperlegible** (sans-serif, static 400 + 700) — https://github.com/googlefonts/atkinson-hyperlegible — the accessibility variant, see below
2026-11-24 22:04:11 +01:00
They are wired up like any custom font: `@font-face` + generic `.font-<value>`
feat(fonts): row 228 — Inter as default font, 4-font bundle incl. Atkinson Hyperlegible
Purged: EB Garamond, Liberation Sans 400/700, Open Sans, Source Serif 4
(rationale in README.md 'Default font'). Kept: Inter (now the default of the
font option, best screen readability at survey sizes, with Noto Sans stacked
behind it as multilingual fallback), Noto Sans, Noto Serif (the one serif,
non-Latin coverage). Added: Atkinson Hyperlegible 400/700 (OFL 1.1, from
googlefonts/atkinson-hyperlegible) as the accessibility variant for
respondents with reading impairments. sass/fonts.sass is the leading source;
css/fonts.css recompiled. README.md + files/fonts/README.md document the
choice and the alternatives. Variant propagation parked per row 222.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 10:31:07 +01:00
rules in `css/fonts.css` (compiled from `sass/fonts.sass` ; registered in
`config.xml` `<files><css>` ), and dropdown entries in the optgroup
**"Bundled open source fonts"** of the `font` option (`data-font-package` stays
`websafe` ; the real font is loaded by the theme's own css, not by a core
package). The selected base font is applied as class `font-<value>` on `<body>` .
### Default font: why Inter
The default of the `font` option in this mother theme is **Inter ** . At survey
sizes (14– 20 px body text) Inter has the best screen readability of the bundled
set: a tall x-height, open apertures and generous letterspacing survive
low-resolution screens and projectors, where print-first serifs (thin
hairlines, small x-height) degrade badly. **Noto Sans ** is stacked directly
behind Inter in the `.font-inter` font stack, so the huge script coverage of
Noto (non-Latin scripts in multilingual surveys) is still served from the same
self-hosted file — no extra download, no external request. **Noto Serif ** is
kept as the single bundled serif for the same reason (non-Latin support), and
for users who genuinely want a serif for body text.
**Accessibility alternative: Atkinson Hyperlegible.** If the target population
has reading impairments (lower vision, dyslexia, older respondent panels), pick
**Atkinson Hyperlegible** as the base font instead: it was designed by the
Braille Institute with evidence-based, highly distinct letterforms (e.g. an
unambiguous "l/1/I") that measurably improve reading without looking "special".
It is bundled and selectable like any other font; it is * not * the default
because Inter reads slightly better for the general population at small sizes.
Purged from the bundle (row 228) on purpose: **EB Garamond ** (print-first:
thin hairlines and a small x-height degrade at 16 px on low-quality screens),
**Liberation Sans** 400/700 (metric-compatible Arial substitute; on the web it
is redundant next to Inter/Noto Sans, and for an Arial look the browser's own
Arial needs no download), **Open Sans ** (duplicated Inter's role as a neutral
humanist sans at survey sizes — two fonts doing the same job invites
inconsistent template choices), and **Source Serif 4 ** (superfluous next to
Noto Serif; only one serif is bundled).
2026-11-24 22:04:11 +01:00
2026-11-30 10:32:05 +01:00
### Font variants (weights and styles) — what is real and what is synthesized
The per-element font options offer `normal | bold | italic | bolditalic` . What
you actually get depends on the faces the font ships:
- **Inter, Noto Sans, Noto Serif** (variable fonts): every `font-weight` in the
declared range (100– 900) is a **real ** weight from the variable axis. Only
`font-style: normal` faces are declared, so **italic and bold-italic are
synthesized by the browser** (faux italic / faux bold on top of the real
weight) — there are no true italic faces in the bundle.
- **Atkinson Hyperlegible** (static): only the **400 and 700 ** faces are
shipped. Weights 400/700 are real; any other weight is synthesized by the
browser. Like the variable fonts, no italic faces: italic/bold-italic are
faux.
- **Browser fonts (websafe) and core server packages**: variants depend on what
the respondent's OS / the LimeSurvey server actually has installed (e.g.
Arial has real bold/italic on most systems); the theme cannot control that.
Rule of thumb for template choices: use `bold` freely (real or safely
synthesized everywhere), and treat `italic` on the bundled fonts as a
synthesized slant — fine for emphasis, not a true italic design.
2026-11-24 22:04:11 +01:00
### Font dropdown order and defaults
The optgroups of every font dropdown (base `font` + all per-element `fontselect`
overrides) are ordered as:
1. **Custom (this theme) ** — only shown when the theme/variant ships its own
font(s); an empty category is removed from the dropdown
2. **Bundled open source fonts ** — the self-hosted fonts above
3. **User browser ** — websafe system fonts
4. **Local server - Core / User ** — the font packages installed on the LimeSurvey
server itself, always last because they differ per installation
Core prepends the "Local server" groups **server-side ** (`TemplateManifest::
getOptionAttributes()` inserts them before the config.xml optgroups), so this
order can only be applied client-side. It is done by an **inline script in
`options/options.twig` ** (`registerScript(..., 'POS_END')` — an explicit position
is required, the default resolves to a position Yii never renders), rendered into
the page HTML itself so it always runs on a fresh page load. The same logic is
in `options/options.js` (`reorderFontDropdowns()` ) as a fallback; running twice is
idempotent. Server packages are detected structurally: their first option has
`data-font-package === value` . The inline script also removes **empty optgroups **
and sets the base font select's value from the stored options (and patches it
into the serialized JSON on submit), so the default font displays and saves
correctly even if `options/options.js` itself was served stale from the browser
cache.
Because core registers `options/options.js` **without a cache-busting hash **
(`LSETwigViewRenderer::renderOptionPage()` ), browsers may heuristically cache it
(the file is served with only `Last-Modified` /`ETag` ). `options/options.twig`
therefore re-registers it as `options.js?v=<OPTIONS_JS_TOKEN>` — **bump
`OPTIONS_JS_TOKEN` in `options/options.twig` whenever `options/options.js`
changes**, so every browser fetches the new file once.
feat(fonts): row 228 — Inter as default font, 4-font bundle incl. Atkinson Hyperlegible
Purged: EB Garamond, Liberation Sans 400/700, Open Sans, Source Serif 4
(rationale in README.md 'Default font'). Kept: Inter (now the default of the
font option, best screen readability at survey sizes, with Noto Sans stacked
behind it as multilingual fallback), Noto Sans, Noto Serif (the one serif,
non-Latin coverage). Added: Atkinson Hyperlegible 400/700 (OFL 1.1, from
googlefonts/atkinson-hyperlegible) as the accessibility variant for
respondents with reading impairments. sass/fonts.sass is the leading source;
css/fonts.css recompiled. README.md + files/fonts/README.md document the
choice and the alternatives. Variant propagation parked per row 222.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 10:31:07 +01:00
Default of the `font` option in this mother theme is **Inter ** (a bundled
2026-11-24 22:04:11 +01:00
font, so the showcase looks identical on every installation — never a core
feat(fonts): row 228 — Inter as default font, 4-font bundle incl. Atkinson Hyperlegible
Purged: EB Garamond, Liberation Sans 400/700, Open Sans, Source Serif 4
(rationale in README.md 'Default font'). Kept: Inter (now the default of the
font option, best screen readability at survey sizes, with Noto Sans stacked
behind it as multilingual fallback), Noto Sans, Noto Serif (the one serif,
non-Latin coverage). Added: Atkinson Hyperlegible 400/700 (OFL 1.1, from
googlefonts/atkinson-hyperlegible) as the accessibility variant for
respondents with reading impairments. sass/fonts.sass is the leading source;
css/fonts.css recompiled. README.md + files/fonts/README.md document the
choice and the alternatives. Variant propagation parked per row 222.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 10:31:07 +01:00
package font, which varies per server; see "Default font: why Inter" above).
`variants/build.php` automatically
2026-11-24 22:04:11 +01:00
sets the default of a variant to its first `fontOptions` entry (the client's
own font) when the variant json does not set `options.font` explicitly.
## Per-element font overrides (fontselect)
Next to the base `font` (the default, used everywhere), the **Fonts ** tab offers
one dropdown per page element: header/top menu (`headerfont` ), progress bar
(`progressbarfont` ), question titles (`questiontitlefont` ), answers + help texts
(`answersfont` ), group titles (`grouptitlefont` ), group descriptions
(`groupdescriptionfont` ) and the navigator buttons (`buttonsfont` ). Each dropdown
offers the same choices as the base font dropdown (bundled + variant-custom +
browser fonts) plus * * "Same as base font"** (value `base` , the default: no extra
class is emitted, the element inherits the body font). A chosen value is applied
as class `font-<value>` on that element in the views — which is why the class
rules in `css/fonts.css` (and in a variant's own css) must be generic
(`.font-x` , not `body.font-x` ). `options/options.js` makes sure the packages of
all selected fonts are loaded (`packages_to_load` ).
**Adding your own font?** See `files/fonts/README.md` (English walkthrough:
license file + font file in `files/fonts/` , `@font-face` rule in
`css/fonts.css` , `<option>` in the optgroup, then upload + reset the theme).
2026-11-16 19:51:19 +01:00
## Custom fonts per variant
LimeSurvey only knows its core font packages (`application/config/fonts.php` ),
so a theme cannot register a `font-*` package itself. Instead a variant ships
its own font files and css:
2026-11-16 21:09:02 +01:00
1. Put the font files in the client folder of the PRIVATE variants repo:
2026-11-24 22:04:11 +01:00
`respondage_<client>/files/fonts/` (e.g. `my-custom-font.woff2` ). This folder
2026-11-16 21:09:02 +01:00
is standard per client and is copied into the generated theme automatically
by `build.php` (together with e.g. `files/*.png` logos and `css/variant.css` ).
2. Create `css/variant.css` in that same client folder with the `@font-face`
2026-11-24 22:04:11 +01:00
and the GENERIC class rule `.font-<value>` (not `body.font-<value>` ): the
class is applied on `<body>` for the base font, and on individual elements
for the per-element font overrides (fontselect options):
2026-11-16 19:51:19 +01:00
```css
@font -face {
font-family: 'My Custom Font';
src: url('../files/fonts/my-custom-font.woff2') format('woff2');
font-weight: 400; font-style: normal;
}
2026-11-24 22:04:11 +01:00
.font-my_custom_font {
2026-11-16 19:51:19 +01:00
font-family: 'My Custom Font', Arial, sans-serif;
}
```
(`../files/...` works because the asset manager copies the whole theme dir.)
3. In `variants/<client>.json` declare the css file and the dropdown entry:
```json
{
"files_add": { "css": ["css/variant.css"], "js": [] },
"fontOptions": [ { "value": "my_custom_font", "label": "My Custom Font" } ]
}
```
`build.php` appends the css to the `<files>` list and the font to the
"Custom (this theme)" optgroup of the font dropdown (`data-font-package`
stays `websafe` , so no nonexistent package is requested — the real font is
loaded by the variant's own css).
2026-11-16 21:09:02 +01:00
4. Run `php variants/build.php <client> <definitions-dir>` (or set
RESPONDAGE_VARIANTS_DIR) and upload/reset as usual. The `<client>/` assets
folder from the definitions dir is copied into `../<client>/` automatically.
2026-11-16 19:51:19 +01:00
2026-11-16 19:51:19 +01:00
## Client variants (house styles) without code duplication
House-style-specific values are ONLY: colors, fonts, and font
sizes/colors/weights (plus logo files). Everything else lives once, here.
docs(variants): define the build process (new variant) and rebuild process (build_all.sh)
- New variants/build_all.sh: rebuilds ALL variants from their json definitions
in one go (loops over <definitions-dir>/*.json, calls build.php per variant,
aggregates failures, exits non-zero on any failure) and prints the owner
follow-up actions (reset each variant theme in the LS admin, flushassets,
Ctrl+F5). Generic tooling — no client names — so it ships in the public repo.
- README.md: the variants workflow is now split into a 'Build process' (defining
a NEW variant: json + assets in the private definitions repo, build.php,
deploy + theme reset + flushassets) and a 'Rebuild process' (build_all.sh after
a mother config.xml change or a definitions change). The preview section now
documents the standing rules: variant preview must differ from the mother's,
preview.svg is committed + synced publicly, added only at first creation and
never overwritten.
- AGENTS.md propagation rule now points at build_all.sh.
Verified: bash -n clean; PHP_BIN=/usr/bin/php bash variants/build_all.sh variants
-> '2 built, 0 failed', rc=0, both variants' preview.svg untouched (md5 before =
after); export_public.sh exit 0 with build_all.sh in the zip.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 12:29:27 +01:00
### Theme preview image per variant (`files/preview.png` + `files/preview.svg`)
2026-11-24 22:04:11 +01:00
The theme list shows `files/preview.png` of each theme (hard-coded in core,
docs(variants): define the build process (new variant) and rebuild process (build_all.sh)
- New variants/build_all.sh: rebuilds ALL variants from their json definitions
in one go (loops over <definitions-dir>/*.json, calls build.php per variant,
aggregates failures, exits non-zero on any failure) and prints the owner
follow-up actions (reset each variant theme in the LS admin, flushassets,
Ctrl+F5). Generic tooling — no client names — so it ships in the public repo.
- README.md: the variants workflow is now split into a 'Build process' (defining
a NEW variant: json + assets in the private definitions repo, build.php,
deploy + theme reset + flushassets) and a 'Rebuild process' (build_all.sh after
a mother config.xml change or a definitions change). The preview section now
documents the standing rules: variant preview must differ from the mother's,
preview.svg is committed + synced publicly, added only at first creation and
never overwritten.
- AGENTS.md propagation rule now points at build_all.sh.
Verified: bash -n clean; PHP_BIN=/usr/bin/php bash variants/build_all.sh variants
-> '2 built, 0 failed', rc=0, both variants' preview.svg untouched (md5 before =
after); export_public.sh exit 0 with build_all.sh in the zip.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 12:29:27 +01:00
`TemplateConfiguration::getPreview()` — `preview.svg` is NOT picked up by core;
a feature request for SVG support has been prepared for the LimeSurvey
developers). The preview is read from the theme's OWN files folder — there is no
starter-theme fallback — so every variant must ship its own
`files/preview.png` . Standing rule: **a variant's preview must differ from the
mother theme's** — when defining a variant, create a variant-specific
`files/preview.svg` (the editable source, committed and synced publicly) and
export `files/preview.png` from it (Inkscape → PNG export). `build.php` adds
`files/preview.svg` to a variant only ONCE, at first creation (seeded from the
mother if the definitions dir has none), and NEVER overwrites it afterwards —
after that you edit it in the variant folder. `build.php` prints a WARNING when
the variant's `preview.png` is identical to the mother's.
2026-11-24 22:04:11 +01:00
docs(variants): define the build process (new variant) and rebuild process (build_all.sh)
- New variants/build_all.sh: rebuilds ALL variants from their json definitions
in one go (loops over <definitions-dir>/*.json, calls build.php per variant,
aggregates failures, exits non-zero on any failure) and prints the owner
follow-up actions (reset each variant theme in the LS admin, flushassets,
Ctrl+F5). Generic tooling — no client names — so it ships in the public repo.
- README.md: the variants workflow is now split into a 'Build process' (defining
a NEW variant: json + assets in the private definitions repo, build.php,
deploy + theme reset + flushassets) and a 'Rebuild process' (build_all.sh after
a mother config.xml change or a definitions change). The preview section now
documents the standing rules: variant preview must differ from the mother's,
preview.svg is committed + synced publicly, added only at first creation and
never overwritten.
- AGENTS.md propagation rule now points at build_all.sh.
Verified: bash -n clean; PHP_BIN=/usr/bin/php bash variants/build_all.sh variants
-> '2 built, 0 failed', rc=0, both variants' preview.svg untouched (md5 before =
after); export_public.sh exit 0 with build_all.sh in the zip.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 12:29:27 +01:00
### Build process (defining a NEW variant)
2026-11-16 19:51:19 +01:00
1. In `config.xml` , the house-style options are marked with `HOUSE-STYLE`
comments (colors, fonts, font sizes/weights, logo files, logo top margin,
background image/color). Only those values belong in a variant json —
2026-11-24 22:04:11 +01:00
never hardcode house-style values in shared files (`views/` , `css/` ,
`scripts/` ), because those are inherited by all variants.
docs(variants): define the build process (new variant) and rebuild process (build_all.sh)
- New variants/build_all.sh: rebuilds ALL variants from their json definitions
in one go (loops over <definitions-dir>/*.json, calls build.php per variant,
aggregates failures, exits non-zero on any failure) and prints the owner
follow-up actions (reset each variant theme in the LS admin, flushassets,
Ctrl+F5). Generic tooling — no client names — so it ships in the public repo.
- README.md: the variants workflow is now split into a 'Build process' (defining
a NEW variant: json + assets in the private definitions repo, build.php,
deploy + theme reset + flushassets) and a 'Rebuild process' (build_all.sh after
a mother config.xml change or a definitions change). The preview section now
documents the standing rules: variant preview must differ from the mother's,
preview.svg is committed + synced publicly, added only at first creation and
never overwritten.
- AGENTS.md propagation rule now points at build_all.sh.
Verified: bash -n clean; PHP_BIN=/usr/bin/php bash variants/build_all.sh variants
-> '2 built, 0 failed', rc=0, both variants' preview.svg untouched (md5 before =
after); export_public.sh exit 0 with build_all.sh in the zip.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 12:29:27 +01:00
2. In the private variants repo, create `variants/<client>.json` with the
2026-11-30 12:47:35 +01:00
variant name/title/description and the option values, plus a `<client>/`
asset folder (logos, `files/fonts/` , `css/variant.css` ,
`files/preview.svg` /`preview.png` ). The json may list **ALL option keys **
of the mother `config.xml` (109 at the time of writing) so it is visible what
CAN be set per variant: an **empty value (`""` ) means "inherit the default
from vanilla_respondage"** — `build.php` skips empty values, so only the
filled-in keys are written into the variant config. Fill in the house-style
values you know (keys marked `HOUSE-STYLE` in `config.xml` : colors, fonts,
font sizes/colors/weights, logo files/margins, background image/color);
leave the rest empty. Legacy keys (e.g. `logotopmargin` , `<pos>logo` ,
hex values in chooser options) are still accepted and migrated by
`build.php` , but writing the new-model keys directly is recommended.
2026-11-30 12:32:46 +01:00
Naming convention: folder/json `respondage_<client>` , metadata `name`
`respondage_<client>` (must equal the file name), `title`
`"<Client> LimeSurvey theme"` (e.g. `respondage_acme` →
"Acme LimeSurvey theme"). Easiest start: copy an existing client json
(`cp respondage_acme.json respondage_<client>.json` ), set `name` , and
adjust title/description/options/assets afterwards.
2026-11-16 19:51:19 +01:00
```json
{
2026-11-24 22:04:11 +01:00
"name": "respondage_client",
2026-11-30 12:32:46 +01:00
"title": "Client LimeSurvey theme",
2026-11-16 19:51:19 +01:00
"options": { "primarycolor": "#123456 ", "fontsize": "18px" }
}
```
feat(variants): build_all.sh modes — build only new variants, --rebuild only existing ones
- Default (build) mode picks up only *.json files for which NO variant folder
(../<name>/) exists yet, so an existing variant is never clobbered by a
build run (e.g. by a just-copied, not-yet-adjusted json). At the end it lists
the jsons that were NOT picked up and advises that they possibly need to be
re-built via 'build_all.sh --rebuild'.
- '--rebuild' mode picks up only *.json files whose variant folder already
exists, and advises about the jsons without a variant yet (build them with
the default mode).
- Both modes print a 'N built, M failed, K not picked up' summary, exit non-zero
on any build failure, and keep the owner follow-up actions (reset themes in
the LS admin, flushassets, Ctrl+F5).
- README build/rebuild sections and AGENTS.md updated to the two modes.
Verified in a /tmp sandbox: build mode built only the json without a variant
folder and listed the existing ones with the --rebuild advice; --rebuild built
only existing variants and listed the new json with the build advice; on the
real definitions dir the default mode built 0 and skipped all 3 (variants
exist) without touching ../respondage_respondage/config.xml (md5 unchanged).
export_public.sh exit 0.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 12:38:05 +01:00
3. Run `php variants/build.php <client> <definitions-dir>` — or, to build ALL
new variants in one go, `bash variants/build_all.sh <definitions-dir>` :
the default (build) mode picks up ONLY the `*.json` files for which NO
variant exists yet (no `../<client>/` folder), so an existing variant is
never clobbered by a build run — even by a just-copied, not-yet-adjusted
json. The json files that were NOT picked up are listed at the end with the
advice that they possibly need to be re-built (see the rebuild process).
This generates
2026-11-16 19:51:19 +01:00
`../<client>/config.xml` : a copy of this theme's config.xml with only those
option values replaced, `<extends>` set to this theme, and the `<engine>`
section emptied except `<optionspage>` (same as LimeSurvey's own "extend
theme" action), so engine settings are inherited. The `<files>` list is
kept: LimeSurvey resolves each listed file in the variant first and then in
2026-11-24 22:04:11 +01:00
the starter theme, so the starter theme's css/js keep loading until a
variant ships its own file with the same name. Unknown option keys make the build fail
docs(variants): define the build process (new variant) and rebuild process (build_all.sh)
- New variants/build_all.sh: rebuilds ALL variants from their json definitions
in one go (loops over <definitions-dir>/*.json, calls build.php per variant,
aggregates failures, exits non-zero on any failure) and prints the owner
follow-up actions (reset each variant theme in the LS admin, flushassets,
Ctrl+F5). Generic tooling — no client names — so it ships in the public repo.
- README.md: the variants workflow is now split into a 'Build process' (defining
a NEW variant: json + assets in the private definitions repo, build.php,
deploy + theme reset + flushassets) and a 'Rebuild process' (build_all.sh after
a mother config.xml change or a definitions change). The preview section now
documents the standing rules: variant preview must differ from the mother's,
preview.svg is committed + synced publicly, added only at first creation and
never overwritten.
- AGENTS.md propagation rule now points at build_all.sh.
Verified: bash -n clean; PHP_BIN=/usr/bin/php bash variants/build_all.sh variants
-> '2 built, 0 failed', rc=0, both variants' preview.svg untouched (md5 before =
after); export_public.sh exit 0 with build_all.sh in the zip.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 12:29:27 +01:00
loudly, so drift is caught at build time. The whole `<client>/` asset folder
is copied into `../<client>/` automatically.
4. Deploy and activate: upload `../<client>/` to `upload/themes/survey/` (the
mother theme `vanilla_respondage` must be present there too — the variant
extends it; the core theme `vanilla` ships with LimeSurvey itself), then
install/reset the variant theme in the LimeSurvey admin (Theme options →
`<client>` → Reset, which imports the new config.xml into the DB), FLUSH the
asset cache (`php application/commands/console.php flushassets` ) and
hard-refresh the browser (Ctrl+F5) — a stale cached css is exactly how an
old placeholder font keeps showing.
### Rebuild process (after a change in THIS mother theme or in a definitions file)
- Views/css/js changes in this theme apply to all variants immediately via
`<extends>` — no rebuild needed (but do flush assets + Ctrl+F5 on the server).
- After a `config.xml` change (new/renamed options) or a change to a
feat(variants): build_all.sh modes — build only new variants, --rebuild only existing ones
- Default (build) mode picks up only *.json files for which NO variant folder
(../<name>/) exists yet, so an existing variant is never clobbered by a
build run (e.g. by a just-copied, not-yet-adjusted json). At the end it lists
the jsons that were NOT picked up and advises that they possibly need to be
re-built via 'build_all.sh --rebuild'.
- '--rebuild' mode picks up only *.json files whose variant folder already
exists, and advises about the jsons without a variant yet (build them with
the default mode).
- Both modes print a 'N built, M failed, K not picked up' summary, exit non-zero
on any build failure, and keep the owner follow-up actions (reset themes in
the LS admin, flushassets, Ctrl+F5).
- README build/rebuild sections and AGENTS.md updated to the two modes.
Verified in a /tmp sandbox: build mode built only the json without a variant
folder and listed the existing ones with the --rebuild advice; --rebuild built
only existing variants and listed the new json with the build advice; on the
real definitions dir the default mode built 0 and skipped all 3 (variants
exist) without touching ../respondage_respondage/config.xml (md5 unchanged).
export_public.sh exit 0.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 12:38:05 +01:00
`<client>.json` / `<client>/` in the definitions repo, rebuild ALL existing
variants in one go:
docs(variants): define the build process (new variant) and rebuild process (build_all.sh)
- New variants/build_all.sh: rebuilds ALL variants from their json definitions
in one go (loops over <definitions-dir>/*.json, calls build.php per variant,
aggregates failures, exits non-zero on any failure) and prints the owner
follow-up actions (reset each variant theme in the LS admin, flushassets,
Ctrl+F5). Generic tooling — no client names — so it ships in the public repo.
- README.md: the variants workflow is now split into a 'Build process' (defining
a NEW variant: json + assets in the private definitions repo, build.php,
deploy + theme reset + flushassets) and a 'Rebuild process' (build_all.sh after
a mother config.xml change or a definitions change). The preview section now
documents the standing rules: variant preview must differ from the mother's,
preview.svg is committed + synced publicly, added only at first creation and
never overwritten.
- AGENTS.md propagation rule now points at build_all.sh.
Verified: bash -n clean; PHP_BIN=/usr/bin/php bash variants/build_all.sh variants
-> '2 built, 0 failed', rc=0, both variants' preview.svg untouched (md5 before =
after); export_public.sh exit 0 with build_all.sh in the zip.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 12:29:27 +01:00
```
feat(variants): build_all.sh modes — build only new variants, --rebuild only existing ones
- Default (build) mode picks up only *.json files for which NO variant folder
(../<name>/) exists yet, so an existing variant is never clobbered by a
build run (e.g. by a just-copied, not-yet-adjusted json). At the end it lists
the jsons that were NOT picked up and advises that they possibly need to be
re-built via 'build_all.sh --rebuild'.
- '--rebuild' mode picks up only *.json files whose variant folder already
exists, and advises about the jsons without a variant yet (build them with
the default mode).
- Both modes print a 'N built, M failed, K not picked up' summary, exit non-zero
on any build failure, and keep the owner follow-up actions (reset themes in
the LS admin, flushassets, Ctrl+F5).
- README build/rebuild sections and AGENTS.md updated to the two modes.
Verified in a /tmp sandbox: build mode built only the json without a variant
folder and listed the existing ones with the --rebuild advice; --rebuild built
only existing variants and listed the new json with the build advice; on the
real definitions dir the default mode built 0 and skipped all 3 (variants
exist) without touching ../respondage_respondage/config.xml (md5 unchanged).
export_public.sh exit 0.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 12:38:05 +01:00
bash variants/build_all.sh --rebuild <definitions-dir>
docs(variants): define the build process (new variant) and rebuild process (build_all.sh)
- New variants/build_all.sh: rebuilds ALL variants from their json definitions
in one go (loops over <definitions-dir>/*.json, calls build.php per variant,
aggregates failures, exits non-zero on any failure) and prints the owner
follow-up actions (reset each variant theme in the LS admin, flushassets,
Ctrl+F5). Generic tooling — no client names — so it ships in the public repo.
- README.md: the variants workflow is now split into a 'Build process' (defining
a NEW variant: json + assets in the private definitions repo, build.php,
deploy + theme reset + flushassets) and a 'Rebuild process' (build_all.sh after
a mother config.xml change or a definitions change). The preview section now
documents the standing rules: variant preview must differ from the mother's,
preview.svg is committed + synced publicly, added only at first creation and
never overwritten.
- AGENTS.md propagation rule now points at build_all.sh.
Verified: bash -n clean; PHP_BIN=/usr/bin/php bash variants/build_all.sh variants
-> '2 built, 0 failed', rc=0, both variants' preview.svg untouched (md5 before =
after); export_public.sh exit 0 with build_all.sh in the zip.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 12:29:27 +01:00
```
feat(variants): build_all.sh modes — build only new variants, --rebuild only existing ones
- Default (build) mode picks up only *.json files for which NO variant folder
(../<name>/) exists yet, so an existing variant is never clobbered by a
build run (e.g. by a just-copied, not-yet-adjusted json). At the end it lists
the jsons that were NOT picked up and advises that they possibly need to be
re-built via 'build_all.sh --rebuild'.
- '--rebuild' mode picks up only *.json files whose variant folder already
exists, and advises about the jsons without a variant yet (build them with
the default mode).
- Both modes print a 'N built, M failed, K not picked up' summary, exit non-zero
on any build failure, and keep the owner follow-up actions (reset themes in
the LS admin, flushassets, Ctrl+F5).
- README build/rebuild sections and AGENTS.md updated to the two modes.
Verified in a /tmp sandbox: build mode built only the json without a variant
folder and listed the existing ones with the --rebuild advice; --rebuild built
only existing variants and listed the new json with the build advice; on the
real definitions dir the default mode built 0 and skipped all 3 (variants
exist) without touching ../respondage_respondage/config.xml (md5 unchanged).
export_public.sh exit 0.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 12:38:05 +01:00
The `--rebuild` mode picks up ONLY the `*.json` files for which a variant
folder ALREADY exists (`../<client>/` ); the json files that were NOT picked
up (no variant yet) are listed at the end with the advice to build them with
the default mode (`bash variants/build_all.sh <definitions-dir>` ).
docs(variants): define the build process (new variant) and rebuild process (build_all.sh)
- New variants/build_all.sh: rebuilds ALL variants from their json definitions
in one go (loops over <definitions-dir>/*.json, calls build.php per variant,
aggregates failures, exits non-zero on any failure) and prints the owner
follow-up actions (reset each variant theme in the LS admin, flushassets,
Ctrl+F5). Generic tooling — no client names — so it ships in the public repo.
- README.md: the variants workflow is now split into a 'Build process' (defining
a NEW variant: json + assets in the private definitions repo, build.php,
deploy + theme reset + flushassets) and a 'Rebuild process' (build_all.sh after
a mother config.xml change or a definitions change). The preview section now
documents the standing rules: variant preview must differ from the mother's,
preview.svg is committed + synced publicly, added only at first creation and
never overwritten.
- AGENTS.md propagation rule now points at build_all.sh.
Verified: bash -n clean; PHP_BIN=/usr/bin/php bash variants/build_all.sh variants
-> '2 built, 0 failed', rc=0, both variants' preview.svg untouched (md5 before =
after); export_public.sh exit 0 with build_all.sh in the zip.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 12:29:27 +01:00
(`<definitions-dir>` defaults to `variants/` or `$RESPONDAGE_VARIANTS_DIR` ;
feat(variants): build_all.sh modes — build only new variants, --rebuild only existing ones
- Default (build) mode picks up only *.json files for which NO variant folder
(../<name>/) exists yet, so an existing variant is never clobbered by a
build run (e.g. by a just-copied, not-yet-adjusted json). At the end it lists
the jsons that were NOT picked up and advises that they possibly need to be
re-built via 'build_all.sh --rebuild'.
- '--rebuild' mode picks up only *.json files whose variant folder already
exists, and advises about the jsons without a variant yet (build them with
the default mode).
- Both modes print a 'N built, M failed, K not picked up' summary, exit non-zero
on any build failure, and keep the owner follow-up actions (reset themes in
the LS admin, flushassets, Ctrl+F5).
- README build/rebuild sections and AGENTS.md updated to the two modes.
Verified in a /tmp sandbox: build mode built only the json without a variant
folder and listed the existing ones with the --rebuild advice; --rebuild built
only existing variants and listed the new json with the build advice; on the
real definitions dir the default mode built 0 and skipped all 3 (variants
exist) without touching ../respondage_respondage/config.xml (md5 unchanged).
export_public.sh exit 0.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 12:38:05 +01:00
set `PHP_BIN=/path/to/php` if `php` is not on PATH.) Both modes call
`build.php` per picked-up variant, print a summary
(`N built, M failed, K not picked up` ) and exit non-zero if any variant
2026-11-30 12:49:58 +01:00
fails (unknown option keys fail loudly — the drift check). NEW option keys in
the mother `config.xml` are automatically added to each variant json as `""`
(inherit) and reported with a `NOTE: N NEW option key(s) ...` line, so every
new settable key is surfaced to you — review those keys in the json.
Then, per (re)built variant: reset the theme in the LimeSurvey admin
(Theme options → Reset), flush assets, Ctrl+F5. `build.php` enforces the per-variant rules itself:
2026-11-30 12:32:46 +01:00
`files/preview.svg` is only added at first creation and never overwritten,
and it warns when a variant's `preview.png` is identical to the mother's.
docs(variants): define the build process (new variant) and rebuild process (build_all.sh)
- New variants/build_all.sh: rebuilds ALL variants from their json definitions
in one go (loops over <definitions-dir>/*.json, calls build.php per variant,
aggregates failures, exits non-zero on any failure) and prints the owner
follow-up actions (reset each variant theme in the LS admin, flushassets,
Ctrl+F5). Generic tooling — no client names — so it ships in the public repo.
- README.md: the variants workflow is now split into a 'Build process' (defining
a NEW variant: json + assets in the private definitions repo, build.php,
deploy + theme reset + flushassets) and a 'Rebuild process' (build_all.sh after
a mother config.xml change or a definitions change). The preview section now
documents the standing rules: variant preview must differ from the mother's,
preview.svg is committed + synced publicly, added only at first creation and
never overwritten.
- AGENTS.md propagation rule now points at build_all.sh.
Verified: bash -n clean; PHP_BIN=/usr/bin/php bash variants/build_all.sh variants
-> '2 built, 0 failed', rc=0, both variants' preview.svg untouched (md5 before =
after); export_public.sh exit 0 with build_all.sh in the zip.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 12:29:27 +01:00
Never edit the generated `../<client>/` folder by hand — every build
OVERWRITES its files from the definitions dir, EXCEPT `files/preview.svg`
(first-creation-only, see above). A variant folder that is not rebuilt after
a definitions change is stale (fonts/logo/css then don't match).
2026-11-16 19:51:19 +01:00
Because of the native `<extends>` mechanism:
2026-11-24 22:04:11 +01:00
- changes to any file (twig/css/js) in this starter theme apply to all
2026-11-16 19:51:19 +01:00
variants immediately — edit them only here;
- changes to non-house-style option defaults in `config.xml` apply to a
variant after re-running the build script and resetting that variant theme;
- house-style values live only in `variants/<client>.json` and the variant's
2026-11-24 22:04:11 +01:00
`files/` , so they are never overwritten by changes in this starter theme.
## Security
Security measures of this theme are documented in this section — for transparency
and to support review and acceptance of the theme. The theme never modifies the
LimeSurvey core; core-side improvement wishes are filed as well-substantiated
English feature requests.
Measures currently in place:
- **Public-release leak check** — `variants/export_public.sh` scans the staged
release for client-identifying strings (client names, terms, house-style hex
colors; patterns derived from sibling variant folders + `variants/leak-patterns.txt` )
and ABORTS when any are found. Client variant definitions, internal notes,
prompt logs and feature-request drafts are excluded from the export, so nothing
client-specific can be published by accident.
- **Theme-relative asset resolution** — images referenced by options are resolved
through LimeSurvey's `imageSrc()` /`image()` (theme-relative paths only, with the
starter theme as fallback), never from arbitrary URLs. `imageSrc()` also validates
the file with `LSYii_ImageValidator` against `allowedthemeimageformats` (default
`gif,ico,jpg,jpeg,png` ): **SVG logo files are rejected ** , so ship logos referenced
by options as PNG (keep the SVG as source in the private variants repo and export a
PNG next to it).
- **Sandboxed rendering** — all theme templates render through LimeSurvey's sandboxed
twig environment; the theme adds no template engine of its own.
- **No secrets in the repo** — house-style values (colors, fonts, logos) live only
in the private variants repo / gitignored `variants/*.json` .
- **No external calls during survey-taking (privacy)** — while a survey is being
taken, this theme never requests anything from Google or any other external
host. Guaranteed at three levels:
1. * Self-hosted fonts * — all selectable fonts are either bundled in
`files/fonts/` (served from the LimeSurvey server's own assets via
`css/fonts.css` ) or browser/system fonts (the local `font-websafe` package,
pure CSS stacks). No `@font-face` /css/js/twig in the theme references an
external font host.
2. * Runtime package whitelist * — `options/options.js` only ever adds
`font-websafe` to `packages_to_load` ; any other font package is skipped with
a console warning. The engine `<packages>` in `config.xml` lists only local
packages (`pjax` , `moment` ). The Google-hosted core packages
(font-roboto, font-noto, …) are deliberately not registered in
`options/options.twig` .
3. * Build-time check * — `variants/export_public.sh` scans the staged release
for `http(s)://host` references in all text files and ABORTS on any host
outside a small allowlist of comment/doc links (so googleapis.com,
gstatic.com, fonts.google.com, cdnfonts.com, jsdelivr.net, … can never ship).
fix(security): sanitize theme option values at emission (S1) and escape imagefile option HTML (S2)
S1 (HIGH, SECURITY_REVIEW_20261129.md): LimeSurvey renders theme twig with
autoescape OFF, so stored option values are untrusted on the public survey
pages. New views/subviews/security_macros.twig provides validators (color,
length, keyword, fontslug, pxnum, iconcode) applied at every emission point:
the <style> block in custom_header.twig (incl. the resolved values of the
cm()/cmbg() chooser macros), the inline style="color:..." and font-<slug>
class attributes in all survey subviews, and the <body> font class +
data-thememode in the newly overridden layout_global.twig and
layout_survey_list.twig. Crafted values fall back to the configured
defaults; legitimate picker/enum/slug values pass unchanged.
S2 (MEDIUM): options/options.twig escapes group/preview/filepath/filename
with |e('html_attr')/|e('html') when building the imagefile <option> HTML.
Verified: twig compile of all changed templates, malicious-value renders
neutralized + legit renders unchanged, live surveys 216664/282267 render
correct colors with no twig errors, jsdom custom_js tests pass (options_*
tests still need /tmp fixtures, pre-existing), export_public.sh exit 0.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 11:27:38 +01:00
- **Option-value sanitization at emission (S1)** — LimeSurvey renders theme twig
with **autoescape OFF ** , so theme option values (stored JSON, settable via
API/DB/import by anyone with theme-options edit rights) are untrusted input on
the **public ** survey pages. `views/subviews/security_macros.twig` provides
validators — `color()` (hex or plain keyword), `length()` (`16px` /`1.2rem` /`90%` ),
`keyword()` (enum words), `fontslug()` (`font-<slug>` class tokens),
`pxnum()` (unitless px), `iconcode()` (check-icon codepoint) — applied at every
emission point: the `<style>` block in `custom_header.twig` (including the
* resolved * values of the color-chooser macros `cm()` /`cmbg()` , which can come
from other raw options), the inline `style="color: …"` and `font-<slug>` class
attributes in the survey subviews (answers, question help, valid message, question
title, group name/description, navigator, progress bar, nav bar), and the `<body>`
font class + `data-thememode` in the theme's `layout_global.twig` /
`layout_survey_list.twig` . A crafted value such as
`red}</style><script>…</script>` or `x" onload="…` is neutralized and falls back
to the configured default; legitimate picker/enum/slug values pass through
unchanged. **Usability impact: none for legitimate values. **
- **Escaped imagefile options (S2)** — `options/options.twig` builds the imagefile
`<optgroup>` /`<option>` HTML with `|e('html_attr')` / `|e('html')` on every part
(group label, preview URL, filepath, filename), so image files that arrive in the
theme `files/` dir via FTP/deploy/git — where names are * not * sanitized like
uploader names — cannot inject markup into the admin theme-options page.
**Usability impact: none for normal filenames. **
2026-11-24 22:04:11 +01:00
The theme is under continuous security audit (twig output/XSS, path handling, upload
handling, build/export scripts). Every approved security measure — together with its
usability impact — is added to this list as it lands.
Report a vulnerability privately to tammo.terhark@respondage .nl — please do not open
a public issue with exploit details.
2026-11-30 12:57:16 +01:00
For issues and wishes, please contact us via vanilla_respondage@respondage .nl.
2026-11-24 22:04:11 +01:00
## License
This theme is free software: you can use, copy, modify and distribute it under the
terms of the **GNU General Public License version 2 or later ** (GPL-2.0-or-later) —
the same license family as LimeSurvey core itself. The full license text ships with
the theme in the `LICENSE` file.
The GPL is copyleft: **copies and derivatives of this theme cannot become
proprietary** when distributed — they must stay under the GPL.
Client variants you build yourself with `variants/build.php` may be kept **private ** : GPL
obligations apply only when you * distribute * a variant, not to internal use. Client
logos and other client assets inside a variant are separate copyrighted material and
are not covered by this theme's license.
2026-11-16 19:51:19 +01:00
2026-11-16 19:51:19 +01:00
## Public release
2026-11-24 22:04:11 +01:00
The public version of this theme is ONLY the starter theme, and this public
repository (Forgejo) already IS that version: it contains only the files
needed to run the theme (`config.xml` , `views/` , `options/` , `css/` ,
`scripts/` , `files/` , `README.md` , `LICENSE` ). All helper files stay local and
are gitignored (see `.gitignore` ), so they are never pushed:
docs(readme): refresh stale sections (logos model, navbar color, sticky header, variants/ tracking, public release)
- 'What's in here': variants/ is no longer 'fully gitignored' — the generic
tooling (build.php, build_all.sh, export_public.sh) and variants/example/
are tracked; only *.json, leak-patterns.txt and tests/ stay local.
- Header logos section rewritten for the current model: <pos>logofile imagefile
options ('off' = no logo) + per-device <pos>showoncomputer/tablet/mobile
checkboxes (the old <pos>logo on/off + <pos>logohideonsmall keys are gone).
- Menu item color: navbarfontcolor is now a 6-way color-chooser dropdown in the
Header category (+ navbarfontcolorcustom), not a plain Colors colorpicker.
- Sticky header: the legacy headersticky master switch no longer gates the
three per-device checkboxes.
- Public release section: corrected the gitignored list (dropped nonexistent
README.internal.md, added limesurvey.md/OPEN_PROMPTS.md/SECURITY_REVIEW*,
files/logos.svg; noted preview.svg is public on purpose).
export_public.sh exit 0.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 12:40:15 +01:00
- `variants/*.json` , `variants/leak-patterns.txt` , `variants/tests/` — the
confidential client definitions and dev tests (the generic tooling
`variants/build.php` , `variants/build_all.sh` , `variants/export_public.sh`
and `variants/example/` ARE tracked and public);
2026-11-30 09:11:39 +01:00
- `sass/` — developer-only LEADING sources of all `css/*.css` (compiled locally with `sass --watch sass:css` );
2026-11-24 22:04:11 +01:00
- `css/*.map` — source maps from the local sass compile;
docs(readme): refresh stale sections (logos model, navbar color, sticky header, variants/ tracking, public release)
- 'What's in here': variants/ is no longer 'fully gitignored' — the generic
tooling (build.php, build_all.sh, export_public.sh) and variants/example/
are tracked; only *.json, leak-patterns.txt and tests/ stay local.
- Header logos section rewritten for the current model: <pos>logofile imagefile
options ('off' = no logo) + per-device <pos>showoncomputer/tablet/mobile
checkboxes (the old <pos>logo on/off + <pos>logohideonsmall keys are gone).
- Menu item color: navbarfontcolor is now a 6-way color-chooser dropdown in the
Header category (+ navbarfontcolorcustom), not a plain Colors colorpicker.
- Sticky header: the legacy headersticky master switch no longer gates the
three per-device checkboxes.
- Public release section: corrected the gitignored list (dropped nonexistent
README.internal.md, added limesurvey.md/OPEN_PROMPTS.md/SECURITY_REVIEW*,
files/logos.svg; noted preview.svg is public on purpose).
export_public.sh exit 0.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 12:40:15 +01:00
- `AGENTS.md` , `prompts.md` , `limesurvey.md` , `OPEN_PROMPTS.md` , `SECURITY_REVIEW*.md` , `FEATURE_REQUEST*.md` , `BUG_REPORT*.md` — internal notes and drafts;
- `/dist/` — old export zips;
- `files/logos.svg` — work-in-progress logo artwork (`files/preview.svg` is
public on purpose, see the variants section).
2026-11-24 22:04:11 +01:00
docs(readme): refresh stale sections (logos model, navbar color, sticky header, variants/ tracking, public release)
- 'What's in here': variants/ is no longer 'fully gitignored' — the generic
tooling (build.php, build_all.sh, export_public.sh) and variants/example/
are tracked; only *.json, leak-patterns.txt and tests/ stay local.
- Header logos section rewritten for the current model: <pos>logofile imagefile
options ('off' = no logo) + per-device <pos>showoncomputer/tablet/mobile
checkboxes (the old <pos>logo on/off + <pos>logohideonsmall keys are gone).
- Menu item color: navbarfontcolor is now a 6-way color-chooser dropdown in the
Header category (+ navbarfontcolorcustom), not a plain Colors colorpicker.
- Sticky header: the legacy headersticky master switch no longer gates the
three per-device checkboxes.
- Public release section: corrected the gitignored list (dropped nonexistent
README.internal.md, added limesurvey.md/OPEN_PROMPTS.md/SECURITY_REVIEW*,
files/logos.svg; noted preview.svg is public on purpose).
export_public.sh exit 0.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 12:40:15 +01:00
Optionally, a checked zip of the public release can additionally be built with:
2026-11-16 19:51:19 +01:00
bash variants/export_public.sh [output-dir]
docs(readme): refresh stale sections (logos model, navbar color, sticky header, variants/ tracking, public release)
- 'What's in here': variants/ is no longer 'fully gitignored' — the generic
tooling (build.php, build_all.sh, export_public.sh) and variants/example/
are tracked; only *.json, leak-patterns.txt and tests/ stay local.
- Header logos section rewritten for the current model: <pos>logofile imagefile
options ('off' = no logo) + per-device <pos>showoncomputer/tablet/mobile
checkboxes (the old <pos>logo on/off + <pos>logohideonsmall keys are gone).
- Menu item color: navbarfontcolor is now a 6-way color-chooser dropdown in the
Header category (+ navbarfontcolorcustom), not a plain Colors colorpicker.
- Sticky header: the legacy headersticky master switch no longer gates the
three per-device checkboxes.
- Public release section: corrected the gitignored list (dropped nonexistent
README.internal.md, added limesurvey.md/OPEN_PROMPTS.md/SECURITY_REVIEW*,
files/logos.svg; noted preview.svg is public on purpose).
export_public.sh exit 0.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 12:40:15 +01:00
(default output: `<limesurvey-root>/dist/` ). Publish only the public repo /
2026-11-24 22:04:11 +01:00
its `main` branch or that checked artifact.
2026-11-16 19:51:19 +01:00
NEVER publish: `variants/*.json` , generated client theme folders, or any git
branch containing a client theme (client names, colors and logos are
confidential). Client variant definitions stay in a PRIVATE repository (or
2026-11-24 22:04:11 +01:00
locally); `build.php` reads the definitions from that private folder via its
second argument or RESPONDAGE_VARIANTS_DIR.