- Twig 59.9%
- JavaScript 15.8%
- PHP 13.3%
- CSS 3.9%
- Shell 3.6%
- Other 3.5%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
- 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> |
||
| css | ||
| files | ||
| options | ||
| sass | ||
| scripts | ||
| views | ||
| .gitattributes | ||
| config.xml | ||
| README.md | ||
Respondage Vanilla — LimeSurvey theme (version 6/7 compatible), extension of the core Vanilla theme.
This is the MOTHER theme. Client-specific variants (e.g. <client>_vanilla)
extend this theme via <extends>respondage_vanilla</extends> and contain only
a generated config.xml plus their own files/ (logos). LimeSurvey inherits
all files (views, css, js, images, options page) from the mother theme, so any
change to a file in this theme automatically applies to all variants — no
copying of files needed.
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).sass/→css/plain.css— theme styles (keep both in sync; plain.css is the compiled output of sass/plain.sass).css/custom.css,scripts/custom.js— loaded last, safe for project tweaks.options/— options page assets.variants/— build/export tooling only. Client variant definitions (variants/*.json) hold confidential house-style values, are gitignored (see.gitignore) and live in the private variants repo, not here.
Header logos (left / center / right)
Three independent logo options in the Images category: brandlogo(+brandlogofile)
left, centerlogo(+centerlogofile) center, rightlogo(+rightlogofile)
right. The center logo is absolutely centered in the navbar (see
sass/plain.sass). Logo files are looked up in the theme's own files/
folder first, then in the mother theme's files/ folder.
Menu item color in the top bar
Option navbarfontcolor (Colors category) sets the text color of the menu
items in the navbar; it is applied in views/subviews/header/custom_header.twig
and should contrast with headerbackgroundcolor.
Distance from the logo to the top of the screen
Option logotopmargin (Images category, e.g. 15px or 0px) sets the top
padding of the header logos, applied in custom_header.twig. Use 0px to
align a logo exactly with the top of the screen.
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:
- Put the font files in the variant's
files/fonts/(e.g.my-custom-font.woff2). - Create
css/variant.cssin the variant with the@font-faceand the body class rule (the selected font is applied asfont-<value>on<body>):
(@font-face { font-family: 'My Custom Font'; src: url('../files/fonts/my-custom-font.woff2') format('woff2'); font-weight: 400; font-style: normal; } body.font-my_custom_font { font-family: 'My Custom Font', Arial, sans-serif; }../files/...works because the asset manager copies the whole theme dir.) - In
variants/<client>.jsondeclare the css file and the dropdown entry:{ "files_add": { "css": ["css/variant.css"], "js": [] }, "fontOptions": [ { "value": "my_custom_font", "label": "My Custom Font" } ] }build.phpappends the css to the<files>list and the font to the "Custom (this theme)" optgroup of the font dropdown (data-font-packagestayswebsafe, so no nonexistent package is requested — the real font is loaded by the variant's own css). - Run
php variants/build.php <client>and upload/reset as usual.