diff --git a/README.md b/README.md index 76b22ae..bc5b41d 100644 --- a/README.md +++ b/README.md @@ -1 +1,31 @@ -This is a LimeSurvey version 6 theme as an extension of the Vanilla base theme. +Respondage Vanilla — LimeSurvey theme (version 6/7 compatible), extension of the core Vanilla theme. + +This is the MOTHER theme. Client-specific variants (e.g. `_vanilla`) +extend this theme via `respondage_vanilla` 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/*.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. + diff --git a/config.xml b/config.xml index b3f0096..4b0e7a0 100644 --- a/config.xml +++ b/config.xml @@ -67,10 +67,12 @@ enable - on - ./files/logo.png - on - ./files/logo.png + on + ./files/logo.png + off + ./files/logo.png + off + ./files/logo2.png on scroll tile diff --git a/options/options.twig b/options/options.twig index 98f4592..6f453d2 100644 --- a/options/options.twig +++ b/options/options.twig @@ -26,7 +26,6 @@ {% set fontOptions = '' %} {% set brandlogofileOptions , brandlogofileInheritFilename, brandlogofileInheritPreview = '', '', '' %} -{% set secondlogofileOptions , secondlogofileInheritFilename, secondlogofileInheritPreview = '', '', '' %} {# For surveyspecific settings add an inherit option #} {% if templateConfiguration.sid is not empty or templateConfiguration.gsid is not empty %} diff --git a/sass/plain.sass b/sass/plain.sass index 43423f2..8b4cfe0 100644 --- a/sass/plain.sass +++ b/sass/plain.sass @@ -1,4 +1,19 @@ @use 'base' @use 'surveys-list' @use 'progress' -@use 'extras' \ No newline at end of file +@use 'extras' + +/* Header: left, center and right logo in the navbar */ +#survey-nav .container-fluid, +#survey-nav .container + position: relative + +#survey-nav .logo-center + position: absolute + left: 50% + top: 50% + transform: translate(-50%, -50%) + float: none + +#survey-nav .logo-right + margin-left: 15px \ No newline at end of file diff --git a/views/subviews/header/nav_bar.twig b/views/subviews/header/nav_bar.twig index 73e007d..11d7b0d 100644 --- a/views/subviews/header/nav_bar.twig +++ b/views/subviews/header/nav_bar.twig @@ -28,8 +28,9 @@ For the survey navigator ("Next", "Back", etc.), see: navigation/navigator.twig or (aSurveyInfo.aQuestionIndex.bShow == true and aSurveyInfo.format != 'A') or (aSurveyInfo.alanguageChanger.show) %} + {% set showRightLogo = (aSurveyInfo.options.rightlogo == "on" and imageSrc(aSurveyInfo.options.rightlogofile)) %}