Commit graph vanilla_respondage/README.md
Author SHA1 Message Date
da51a3dd36 docs(readme): contact issues and wishes via vanilla_respondage@respondage.nl
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 12:57:16 +01:00
1e6b1ffcf8 feat(variants): auto-sync NEW mother option keys into variant jsons and report them (row 246)
Standing rule: when the mother config.xml gains option keys that a variant json
does not list yet, build.php adds them to the json as "" (inherit the mother
default, skipped at apply time) and prints 'NOTE: N NEW option key(s) ... review
them: ...'. Existing keys/values and legacy keys are never touched; options are
rewritten in mother-config order. Runs on every build (single and build_all), so
new settable keys are always surfaced to the user.

README rebuild section and AGENTS.md document the rule.

Verified in a /tmp sandbox: added a fake option to the mother config, built a
json missing it -> key added as "" with the NOTE, existing values (#123456)
and legacy key (logotopmargin) preserved; second run reports 0 new keys.
php -l clean; export_public.sh exit 0.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 12:49:58 +01:00
28f6b0f9c1 feat(variants): json definitions may list ALL option keys — empty value means inherit the mother default
- build.php: an option value of "" or null in the variant json is skipped, so
  it inherits the default from vanilla_respondage's config.xml (previously an
  empty value would have been written as-is). The legacy logotopmargin
  migration now also ignores an empty value, and the fontOptions default-font
  rule treats "font": "" as unset. Header comment documents the convention.
- Regenerated the three local variant definitions (variants/respondage_defensie,
  respondage_erasmus, respondage_respondage — gitignored) with all 109 option
  keys: known values filled in (legacy keys modernized: logotopmargin ->
  per-logo keys, brandlogo off -> brandlogofile off, hex chooser values ->
  mode "other" + *custom), everything else "". respondage_respondage's known
  values were derived from the tracked example output config.xml.
- README build process documents the all-keys/empty-inherits convention.

Verified in a /tmp sandbox: all three jsons build cleanly (4 built, 0 failed);
defensie/erasmus/respondage configs carry the known values and inherit the
mother defaults for empty keys (e.g. erasmus centerlogofile stays
./files/logo.png, centerlogotopmargin 30); php -l clean; export exit 0.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 12:47:35 +01:00
98cf23e999 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
92cc6443ac 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
73ee0e887f docs(readme): align variants build/rebuild docs with the current process (rows 239-240)
- Build process: document the naming convention (folder/json respondage_<client>,
  metadata name must equal the file name, title '<Client> LimeSurvey theme',
  e.g. respondage_defensie -> 'Defensie LimeSurvey theme') and the shortcut of
  starting a new variant by copying an existing client json — plus the caution
  that build_all.sh builds EVERY *.json in the definitions dir, so don't run it
  while a copied json is still unadjusted.
- Rebuild process: note that build_all.sh prints a 'N built, M failed' summary,
  exits non-zero on any failure, and that build.php enforces the per-variant
  rules itself (preview.svg first-creation-only + never overwritten,
  identical-preview.png warning).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 12:33:38 +01:00
9cb0eb0723 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
d8ee93a1c0 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
2b19f350f4 docs(readme): row 229 — document font variant availability (real weights vs synthesized italic)
The bundled fonts declare font-style: normal only: Inter/Noto variable fonts
give real weights 100-900 but faux italic; Atkinson Hyperlegible ships static
400/700 only. Per-element normal|bold|italic|bolditalic options therefore map
to real weights where shipped and browser-synthesized styles otherwise; browser
fonts depend on the respondent's OS. Documented under the fonts section.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 10:32:05 +01:00
a1d58c7c79 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
756c0ec2d1 refactor(css): row 216 — sass is leading for ALL css files, not just plain.css
Previously only css/plain.css was compiled from sass/plain.sass; css/custom.css
and css/fonts.css were hand-written. Now every theme stylesheet has a leading
sass source: sass/plain.sass, sass/custom.sass, sass/fonts.sass (partials _*),
compiled with 'sass --watch sass:css' (dart-sass 1.83.4 added as local
devDependency; node_modules/package.json stay gitignored). css/*.css are build
artifacts and remain the committed runtime files; sass/ stays developer-local.
Recompiled output is semantically identical to the previous hand-written files
(dart-sass normalization only: 2-space indent, double quotes, @charset).
variants/export_public.sh step 0 now checks BOTH directions for every pair:
stale css/<name>.css vs sass/<name>.sass aborts, and a css file without a sass
source aborts; compiler resolved from PATH or node_modules/.bin/sass.
.gitignore/README document the workflow.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 09:11:39 +01:00
3e370322e7 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
d6889067c0 chore: commit owner's README title/description tweak and placeholder logos
README.md: theme title line "Vanilla Respondage — LimeSurvey theme (version 6/7
compatible), extension of the core Vanilla theme by Respondage" and intro wording;
plus the placeholder files/logo-left.png and files/logo-right.png (default left
and right header logos).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 21:13:59 +01:00
cffd3cefa6 feat!: rename theme respondage_vanilla -> vanilla_respondage, variants -> respondage_<client>
Prompt V (prompts.md rows 51-54). Mother theme folder + <name> renamed to
vanilla_respondage (version 3.3.0); client variants renamed to
respondage_defensie / respondage_erasmus (<extends>vanilla_respondage</extends>,
auto-derived by build.php). export_public.sh now derives the release name from
the theme dir and the leak-check glob matches ../respondage_* siblings, so the
public-release leak check keeps working after the rename (sabotage-tested).
All doc/tooling references updated; local-only files stay gitignored.

Also includes the pending uncommitted theme work from this testing week
(custom options page, header logos, sticky-header options, bundled OFL fonts,
per-element font overrides, font-dropdown reordering, jsdom tests) that was
verified locally but not yet pushed.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-24 22:04:11 +01:00
d9d2d902c6 Docs: variant requires the mother theme respondage_vanilla in upload/themes/survey/
A <client>_vanilla theme extends respondage_vanilla via <extends>, so both
folders must be deployed; core vanilla ships with LimeSurvey itself.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-16 21:33:09 +01:00
c6b659c90e feat(variants): copy per-client assets (fonts/css/images) automatically in build.php
The definitions dir (private variants repo) now has a standard layout per
client: <client>.json + <client>/files/... + <client>/css/variant.css.
build.php copies <client>/ into the generated theme folder, so a
client-specific font or css is part of the variant by default.
README updated accordingly.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-16 21:09:02 +01:00
0f034e7a63 feat: public release export of the mother theme only
- variants/export_public.sh builds a public folder + zip of ONLY this mother
  theme: excludes .git and variants/*.json (client house-style definitions),
  scans the result for client-identifying strings and aborts on any hit.
  Default output: <limesurvey-root>/dist (not inside upload/themes/survey,
  which is scanned for themes).
- README.md: "Public release" section; client-identifying examples scrubbed
  (generic <client> placeholders, no client names/colors); note that client
  definitions live in a private repo (gitignored here).
- .gitignore keeps variants/*.json (and the internal variants README) out of
  this public repository.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-16 19:51:19 +01:00
cbf7041243 feat(variants): thin client themes on one shared code base
Architecture: a client theme extends this mother theme via <extends> and
contains only a generated config.xml + its own files/ (logos). LimeSurvey
inherits all views/css/js/images from the mother, so changes here apply to
every variant immediately.

- variants/<client>.json holds ONLY the house-style values (colors, fonts,
  font sizes/weights/colors, logo files, logotopmargin, custom fonts).
- variants/build.php generates ../<client>/config.xml from the mother
  config.xml + the json: only those values are replaced, <extends> is set,
  <engine> is emptied except <optionspage>. Unknown option keys fail the
  build loudly, so drift is caught at build time.
- Client definitions (variants/<client>.json) are gitignored (see .gitignore)
  and live in a PRIVATE variants repo or locally; build.php reads them from
  there via its 2nd argument or RESPONDAGE_VARIANTS_DIR.
- README.md: "Client variants" workflow.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-16 19:51:19 +01:00
07ffe2255d feat(variants): custom fonts per client variant
- config.xml: "Custom (this theme)" optgroup in the font dropdown plus an
  instruction comment on how to place a custom font (@font-face + body class
  in the variant's own css).
- variants/build.php: supports "fontOptions" (dropdown entries) and "files_add"
  (extra css/js of the variant) in the variant json.
- README.md: "Custom fonts per variant" section.

data-font-package stays "websafe" because LimeSurvey only knows core font
packages; the real font is loaded via the variant's css.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-16 19:51:19 +01:00
0f462a38be feat(options): logo top margin (logotopmargin)
- config.xml: new duration option "logotopmargin" in the Images category (default 15px).
- custom_header.twig: sets padding-top of the header logos, so 0px aligns a logo
  exactly with the top of the screen.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-16 19:51:19 +01:00
8b200ce47b feat(options): menu item text color in the top bar (navbarfontcolor)
- config.xml: new colorpicker "navbarfontcolor" in the Colors category.
- custom_header.twig: applies it to #survey-nav menu links (normal + hover/focus,
  hover at 0.75 opacity), replacing the old bootstrap3 .navbar-default hover rule.
  Pick a color that contrasts with headerbackgroundcolor.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-16 19:51:19 +01:00
4799ddf5a5 feat(header): left, center and right logos in the header navbar
- config.xml: brandlogo/brandlogofile = left logo; new centerlogo/centerlogofile
  and rightlogo/rightlogofile options; old secondlogo/secondlogofile removed.
- nav_bar.twig renders the three positions: left in flow, center absolutely
  centered, right flush right (ms-auto on the logo, menu keeps ms-auto when no
  right logo). Logos render only when the file resolves (imageSrc guard).
- sass/plain.sass: flex/relative container + absolute centering for .logo-center.
- options/options.twig: removed dead secondlogo variables.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-16 19:51:19 +01:00
fd7ecba1a3 chore: normalize all line endings to LF and enforce via .gitattributes
All text files in the theme (config.xml, sass, css, js, twig, md) used mixed
CRLF/LF. Normalize everything to LF (Unix), matching the LimeSurvey core
themes. .gitattributes (* text=auto eol=lf, binary images/fonts) keeps it
that way; config.xml documents the convention in its header comment.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-16 19:36:04 +01:00
a023555acf First commit after long time, too much to describe (sorry) 2026-07-07 16:05:43 +02:00
185832730b Add description for LimeSurvey version 6 theme 2026-06-17 10:12:27 +02:00