From 7fdf23d196ed4de6d09eadfe4200e918a731684d Mon Sep 17 00:00:00 2001
From: Tammo ter Hark
Date: Mon, 16 Nov 2026 19:36:04 +0100
Subject: [PATCH 1/9] 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
---
.gitattributes | 17 +
README.md | 2 +-
config.xml | 854 ++++++++++++++++++++--------------------
css/custom.css | 22 +-
css/plain.css | 408 +++++++++----------
options/options.js | 656 +++++++++++++++---------------
sass/_base.sass | 226 +++++------
sass/_extras.sass | 62 +--
sass/_progress.sass | 12 +-
sass/_surveys-list.sass | 4 +-
sass/plain.sass | 6 +-
scripts/custom.js | 80 ++--
12 files changed, 1183 insertions(+), 1166 deletions(-)
create mode 100644 .gitattributes
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..d080b5e
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,17 @@
+# One consistent line-ending approach for this theme: LF (Unix) everywhere.
+# See the comment at the top of config.xml. Text files are normalized to LF
+# in the repository and checked out with LF; binary files are stored as-is.
+* text=auto eol=lf
+*.png binary
+*.jpg binary
+*.jpeg binary
+*.gif binary
+*.svg binary
+*.ico binary
+*.zip binary
+*.woff binary
+*.woff2 binary
+*.ttf binary
+*.otf binary
+*.eot binary
+*.map -text
diff --git a/README.md b/README.md
index 01de6d9..76b22ae 100644
--- a/README.md
+++ b/README.md
@@ -1 +1 @@
-This is a LimeSurvey version 6 theme as an extension of the Vanilla base theme.
+This is a LimeSurvey version 6 theme as an extension of the Vanilla base theme.
diff --git a/config.xml b/config.xml
index 69af99c..b3f0096 100644
--- a/config.xml
+++ b/config.xml
@@ -1,427 +1,427 @@
-
-
-
-
-
- respondage_vanilla
- Respondage Vanilla
- theme
- 2024-04-19 12:03
- admin
- tammo.terhark@respondage.nl
- http://www.respondage.nl
- Copyright (C) 2026 Respondage. All rights reserved.
- GNU General Public License version 2 or later
- 3.0.1
- 3
- Respondage Theme based on core theme Vanilla A clean and simple base that was used by a certain theme developer to create a really clean theme.]]>
- 2026-06-10 12:00:00
- vanilla
-
-
-
- 6.0
-
-
-
-
-
- css/base.css
- css/theme.css
- css/noTablesOnMobile.css
- css/plain.css
- css/custom.css
-
-
- scripts/theme.js
- scripts/custom.js
-
-
- css/print_theme.css
-
-
-
-
-
- off
- on
- 1
- off
- enable
-
-
- on
- ./files/logo.png
- on
- ./files/logo.png
- on
- scroll
- tile
- ./files/tiledtexture.png
- #dddddd
-
-
- #5e1c64
- #ffffff
- #ffffff
- #fff3cd
- box
- solid
- #cccccc
- 5px
- 5px
- 5px
- 5px
- hover
- top
- #ff005f
-
-
- under
-
-
- #eeeeee
- #5e1c64
- #444444
- #5e1c64
- #eeeeee
- #5e1c64
- #ffffff
- lightyellow
-
-
- opensans
-
-
- Arial
- Arial Black
- Comic Sans
- Courier New
- Georgia
- Impact
- Lucida Console
- Lucida Sans
- Palatino Linotype
- Times New Roman
- Trebuchet
-
-
-
- 16px
- 1.2rem
- 700
- 2.0rem
- 700
- 1.2rem
- 400
-
-
-
-
-
- core
-
-
-
- bootstrap
-
-
-
- views
-
-
- files
-
-
-
-
- pjax
- moment
- font-noto
-
-
-
-
-
-
-
- layout_global.twig
- ./subviews/footer/footer.twig
- ./subviews/content/main.twig
- ./subviews/messages/justsaved.twig
- ./subviews/survey/group.twig
- ./subviews/survey/group_subviews/group_container.twig
- ./subviews/survey/group_subviews/group_desc.twig
- ./subviews/survey/group_subviews/group_name.twig
- ./subviews/survey/question.twig
- ./subviews/survey/question_container.twig
- ./subviews/survey/question_subviews/question_text_container.twig
- ./subviews/survey/question_subviews/question_text_content.twig
- ./subviews/survey/question_subviews/answers.twig
- ./subviews/survey/question_subviews/survey_question_help.twig
- ./subviews/survey/question_subviews/valid_message_and_help.twig
- ./css/theme.css
- ./scripts/theme.js
- ./css/custom.css
- ./scripts/custom.js
-
-
-
-
- layout_survey_list.twig
- ./subviews/footer/footer.twig
- ./subviews/content/mainrow.twig
- ./subviews/content/outerframe.twig
- ./subviews/navigation/language_changer_form.twig
- ./css/theme.css
- ./scripts/theme.js
- ./css/custom.css
- ./scripts/custom.js
-
-
-
-
- layout_global.twig
- ./subviews/footer/footer.twig
- ./subviews/content/mainrow.twig
- ./subviews/content/outerframe.twig
- ./subviews/content/firstpage.twig
- ./subviews/header/head.twig
- ./subviews/header/custom_header.twig
- ./subviews/header/nav_bar.twig
- ./subviews/header/progress_bar.twig
- ./subviews/messages/welcome.twig
- ./subviews/messages/warnings.twig
- ./subviews/messages/no_js_alert.twig
- ./subviews/privacy/privacy.twig
- ./subviews/navigation/language_changer.twig
- ./subviews/logincomponents/captcha.twig
- ./subviews/logincomponents/token.twig
- ./css/theme.css
- ./scripts/theme.js
- ./css/custom.css
- ./scripts/custom.js
-
-
-
-
- layout_global.twig
- ./subviews/footer/footer.twig
- ./subviews/content/mainrow.twig
- ./subviews/content/outerframe.twig
- ./subviews/content/submit.twig
- ./css/theme.css
- ./scripts/theme.js
- ./css/custom.css
- ./scripts/custom.js
-
-
-
-
- layout_global.twig
- ./subviews/footer/footer.twig
- ./subviews/content/mainrow.twig
- ./subviews/content/outerframe.twig
- ./subviews/content/submit.twig
- ./subviews/messages/assessments.twig
- ./css/theme.css
- ./scripts/theme.js
- ./css/custom.css
- ./scripts/custom.js
-
-
-
-
- layout_errors.twig
- ./subviews/footer/footer.twig
-
-
-
-
- layout_global.twig
- ./subviews/footer/footer.twig
- ./subviews/content/mainrow.twig
- ./subviews/content/outerframe.twig
- ./subviews/content/clearall.twig
- ./css/theme.css
- ./scripts/theme.js
- ./css/custom.css
- ./scripts/custom.js
-
-
-
-
- layout_global.twig
- ./subviews/footer/footer.twig
- ./subviews/content/mainrow.twig
- ./subviews/content/outerframe.twig
- ./subviews/content/load.twig
- ./css/theme.css
- ./scripts/theme.js
- ./css/custom.css
- ./scripts/custom.js
-
-
-
-
- layout_global.twig
- ./subviews/footer/footer.twig
- ./subviews/content/mainrow.twig
- ./subviews/content/outerframe.twig
- ./subviews/content/save.twig
- ./css/theme.css
- ./scripts/theme.js
- ./css/custom.css
- ./scripts/custom.js
-
-
-
-
- layout_global.twig
- ./subviews/footer/footer.twig
- ./subviews/content/register.twig
- ./subviews/registration/register_error.twig
- ./subviews/registration/register_head.twig
- ./subviews/registration/register_message.twig
- ./subviews/registration/register_success.twig
- ./subviews/registration/register_form.twig
- ./subviews/registration/required.twig
-
-
-
-
- layout_printanswers.twig
- ./subviews/content/outerframe.twig
- ./subviews/content/printanswers.twig
- ./subviews/printanswers/printanswers_head.twig
- ./subviews/printanswers/printanswers_table.twig
- ./subviews/printanswers/printanswers_question.twig
- ./subviews/printanswers/printanswers_foot.twig
-
-
-
-
- layout_statistics_user.twig
- ./subviews/content/outerframe.twig
- ./subviews/content/statistics_user.twig
- ./subviews/statistics_user/statistics_user_head.twig
- ./subviews/statistics_user/statistics_user_content.twig
- ./subviews/statistics_user/statistics_user_foot.twig
-
-
-
-
- layout_print.twig
-
-
-
-
- layout_global.twig
- ./subviews/content/quotas.twig
- ./subviews/header/start_form.twig
-
-
-
-
- layout_global.twig
- ./subviews/footer/footer.twig
- ./subviews/content/main.twig
- ./subviews/navigation/ajax_indicator.twig
- ./subviews/navigation/clearall_links.twig
- ./subviews/navigation/save_links.twig
- ./subviews/navigation/language_changer_top_menu.twig
- ./subviews/navigation/language_changer.twig
- ./subviews/navigation/question_index_menu.twig
- ./subviews/navigation/navigator.twig
- ./subviews/navigation/navigator_complement.twig
- ./subviews/navigation/clearall_buttons.twig
- ./subviews/navigation/save_buttons.twig
- ./subviews/navigation/question_index_buttons.twig
- ./subviews/navigation/question_index_questions_buttons.twig
- ./subviews/navigation/question_index_groups_buttons.twig
-
-
-
-
- layout_user_forms.twig
- ./subviews/content/userforms.twig
- ./subviews/logincomponents/token.twig
- ./subviews/logincomponents/captcha.twig
-
-
-
-
-
-
-
-
-
- {{ gT('This is a sample survey description. It could be quite long.') }}
{{ gT("But this one isn't.") }}
]]>
- {{ gT('Welcome to this sample survey')}}
{{ gT('You should have a great time doing this') }}
]]>
-
- "https://www.limesurvey.org/"
-
- 2
- {{ gT('Show privacy policy') }} ]]>
-
-
-
-
-
-
-
- 'Q1 '
-
- {{ gT("Choose one of the following answers") }} ]]>
-
-
- 'Q2 '
-
- {{ gT("Hint when response is not valid") }} ]]>
-
-
-
-
-
-
-
-
-
-
-
- http://limesurvey.org
-
- false
-
-
-
- token
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ respondage_vanilla
+ Respondage Vanilla
+ theme
+ 2024-04-19 12:03
+ admin
+ tammo.terhark@respondage.nl
+ http://www.respondage.nl
+ Copyright (C) 2026 Respondage. All rights reserved.
+ GNU General Public License version 2 or later
+ 3.0.1
+ 3
+ Respondage Theme based on core theme Vanilla A clean and simple base that was used by a certain theme developer to create a really clean theme.]]>
+ 2026-06-10 12:00:00
+ vanilla
+
+
+
+ 6.0
+
+
+
+
+
+ css/base.css
+ css/theme.css
+ css/noTablesOnMobile.css
+ css/plain.css
+ css/custom.css
+
+
+ scripts/theme.js
+ scripts/custom.js
+
+
+ css/print_theme.css
+
+
+
+
+
+ off
+ on
+ 1
+ off
+ enable
+
+
+ on
+ ./files/logo.png
+ on
+ ./files/logo.png
+ on
+ scroll
+ tile
+ ./files/tiledtexture.png
+ #dddddd
+
+
+ #5e1c64
+ #ffffff
+ #ffffff
+ #fff3cd
+ box
+ solid
+ #cccccc
+ 5px
+ 5px
+ 5px
+ 5px
+ hover
+ top
+ #ff005f
+
+
+ under
+
+
+ #eeeeee
+ #5e1c64
+ #444444
+ #5e1c64
+ #eeeeee
+ #5e1c64
+ #ffffff
+ lightyellow
+
+
+ opensans
+
+
+ Arial
+ Arial Black
+ Comic Sans
+ Courier New
+ Georgia
+ Impact
+ Lucida Console
+ Lucida Sans
+ Palatino Linotype
+ Times New Roman
+ Trebuchet
+
+
+
+ 16px
+ 1.2rem
+ 700
+ 2.0rem
+ 700
+ 1.2rem
+ 400
+
+
+
+
+
+ core
+
+
+
+ bootstrap
+
+
+
+ views
+
+
+ files
+
+
+
+
+ pjax
+ moment
+ font-noto
+
+
+
+
+
+
+
+ layout_global.twig
+ ./subviews/footer/footer.twig
+ ./subviews/content/main.twig
+ ./subviews/messages/justsaved.twig
+ ./subviews/survey/group.twig
+ ./subviews/survey/group_subviews/group_container.twig
+ ./subviews/survey/group_subviews/group_desc.twig
+ ./subviews/survey/group_subviews/group_name.twig
+ ./subviews/survey/question.twig
+ ./subviews/survey/question_container.twig
+ ./subviews/survey/question_subviews/question_text_container.twig
+ ./subviews/survey/question_subviews/question_text_content.twig
+ ./subviews/survey/question_subviews/answers.twig
+ ./subviews/survey/question_subviews/survey_question_help.twig
+ ./subviews/survey/question_subviews/valid_message_and_help.twig
+ ./css/theme.css
+ ./scripts/theme.js
+ ./css/custom.css
+ ./scripts/custom.js
+
+
+
+
+ layout_survey_list.twig
+ ./subviews/footer/footer.twig
+ ./subviews/content/mainrow.twig
+ ./subviews/content/outerframe.twig
+ ./subviews/navigation/language_changer_form.twig
+ ./css/theme.css
+ ./scripts/theme.js
+ ./css/custom.css
+ ./scripts/custom.js
+
+
+
+
+ layout_global.twig
+ ./subviews/footer/footer.twig
+ ./subviews/content/mainrow.twig
+ ./subviews/content/outerframe.twig
+ ./subviews/content/firstpage.twig
+ ./subviews/header/head.twig
+ ./subviews/header/custom_header.twig
+ ./subviews/header/nav_bar.twig
+ ./subviews/header/progress_bar.twig
+ ./subviews/messages/welcome.twig
+ ./subviews/messages/warnings.twig
+ ./subviews/messages/no_js_alert.twig
+ ./subviews/privacy/privacy.twig
+ ./subviews/navigation/language_changer.twig
+ ./subviews/logincomponents/captcha.twig
+ ./subviews/logincomponents/token.twig
+ ./css/theme.css
+ ./scripts/theme.js
+ ./css/custom.css
+ ./scripts/custom.js
+
+
+
+
+ layout_global.twig
+ ./subviews/footer/footer.twig
+ ./subviews/content/mainrow.twig
+ ./subviews/content/outerframe.twig
+ ./subviews/content/submit.twig
+ ./css/theme.css
+ ./scripts/theme.js
+ ./css/custom.css
+ ./scripts/custom.js
+
+
+
+
+ layout_global.twig
+ ./subviews/footer/footer.twig
+ ./subviews/content/mainrow.twig
+ ./subviews/content/outerframe.twig
+ ./subviews/content/submit.twig
+ ./subviews/messages/assessments.twig
+ ./css/theme.css
+ ./scripts/theme.js
+ ./css/custom.css
+ ./scripts/custom.js
+
+
+
+
+ layout_errors.twig
+ ./subviews/footer/footer.twig
+
+
+
+
+ layout_global.twig
+ ./subviews/footer/footer.twig
+ ./subviews/content/mainrow.twig
+ ./subviews/content/outerframe.twig
+ ./subviews/content/clearall.twig
+ ./css/theme.css
+ ./scripts/theme.js
+ ./css/custom.css
+ ./scripts/custom.js
+
+
+
+
+ layout_global.twig
+ ./subviews/footer/footer.twig
+ ./subviews/content/mainrow.twig
+ ./subviews/content/outerframe.twig
+ ./subviews/content/load.twig
+ ./css/theme.css
+ ./scripts/theme.js
+ ./css/custom.css
+ ./scripts/custom.js
+
+
+
+
+ layout_global.twig
+ ./subviews/footer/footer.twig
+ ./subviews/content/mainrow.twig
+ ./subviews/content/outerframe.twig
+ ./subviews/content/save.twig
+ ./css/theme.css
+ ./scripts/theme.js
+ ./css/custom.css
+ ./scripts/custom.js
+
+
+
+
+ layout_global.twig
+ ./subviews/footer/footer.twig
+ ./subviews/content/register.twig
+ ./subviews/registration/register_error.twig
+ ./subviews/registration/register_head.twig
+ ./subviews/registration/register_message.twig
+ ./subviews/registration/register_success.twig
+ ./subviews/registration/register_form.twig
+ ./subviews/registration/required.twig
+
+
+
+
+ layout_printanswers.twig
+ ./subviews/content/outerframe.twig
+ ./subviews/content/printanswers.twig
+ ./subviews/printanswers/printanswers_head.twig
+ ./subviews/printanswers/printanswers_table.twig
+ ./subviews/printanswers/printanswers_question.twig
+ ./subviews/printanswers/printanswers_foot.twig
+
+
+
+
+ layout_statistics_user.twig
+ ./subviews/content/outerframe.twig
+ ./subviews/content/statistics_user.twig
+ ./subviews/statistics_user/statistics_user_head.twig
+ ./subviews/statistics_user/statistics_user_content.twig
+ ./subviews/statistics_user/statistics_user_foot.twig
+
+
+
+
+ layout_print.twig
+
+
+
+
+ layout_global.twig
+ ./subviews/content/quotas.twig
+ ./subviews/header/start_form.twig
+
+
+
+
+ layout_global.twig
+ ./subviews/footer/footer.twig
+ ./subviews/content/main.twig
+ ./subviews/navigation/ajax_indicator.twig
+ ./subviews/navigation/clearall_links.twig
+ ./subviews/navigation/save_links.twig
+ ./subviews/navigation/language_changer_top_menu.twig
+ ./subviews/navigation/language_changer.twig
+ ./subviews/navigation/question_index_menu.twig
+ ./subviews/navigation/navigator.twig
+ ./subviews/navigation/navigator_complement.twig
+ ./subviews/navigation/clearall_buttons.twig
+ ./subviews/navigation/save_buttons.twig
+ ./subviews/navigation/question_index_buttons.twig
+ ./subviews/navigation/question_index_questions_buttons.twig
+ ./subviews/navigation/question_index_groups_buttons.twig
+
+
+
+
+ layout_user_forms.twig
+ ./subviews/content/userforms.twig
+ ./subviews/logincomponents/token.twig
+ ./subviews/logincomponents/captcha.twig
+
+
+
+
+
+
+
+
+
+ {{ gT('This is a sample survey description. It could be quite long.') }}
{{ gT("But this one isn't.") }}
]]>
+ {{ gT('Welcome to this sample survey')}}
{{ gT('You should have a great time doing this') }}
]]>
+
+ "https://www.limesurvey.org/"
+
+ 2
+ {{ gT('Show privacy policy') }} ]]>
+
+
+
+
+
+
+
+ 'Q1 '
+
+ {{ gT("Choose one of the following answers") }} ]]>
+
+
+ 'Q2 '
+
+ {{ gT("Hint when response is not valid") }} ]]>
+
+
+
+
+
+
+
+
+
+
+
+ http://limesurvey.org
+
+ false
+
+
+
+ token
+
+
+
+
+
+
+
+
+
diff --git a/css/custom.css b/css/custom.css
index 59c5dbf..e8de012 100644
--- a/css/custom.css
+++ b/css/custom.css
@@ -1,12 +1,12 @@
-/******************
- User custom CSS
- ---------------
-
- In this file you can add your own custom CSS
- It will be loaded last, so you can override any other property.
- Also, it will never be updated. So if you inheritate a core template and just add here some CSS, you'll still benefit of all the updates
-*/
-
-#outerframeContainer{
- hyphens: none;
+/******************
+ User custom CSS
+ ---------------
+
+ In this file you can add your own custom CSS
+ It will be loaded last, so you can override any other property.
+ Also, it will never be updated. So if you inheritate a core template and just add here some CSS, you'll still benefit of all the updates
+*/
+
+#outerframeContainer{
+ hyphens: none;
}
\ No newline at end of file
diff --git a/css/plain.css b/css/plain.css
index b4cf75c..a79ff24 100644
--- a/css/plain.css
+++ b/css/plain.css
@@ -1,205 +1,205 @@
-body.font-arial {
- font-family: Arial, Helvetica, sans-serif;
-}
-
-body.font-arial_black {
- font-family: ArialBlack, Helvetica, sans-serif;
-}
-
-body.font-opensans {
- font-family: "Open Sans", Helvetica, sans-serif;
-}
-
-body.font-georgia {
- font-family: Georgia, "Times New Roman", Times, serif;
-}
-
-body.font-courier {
- font-family: "Courier New", Courier, monospace;
-}
-
-#welcome-container {
- padding: 15px;
- margin-top: 30px;
-}
-
-.top-container .top-content {
- padding-bottom: 0;
- margin-bottom: 0;
-}
-
-.row.question-container {
- margin-left: 0;
- margin-right: 0;
-}
-
-#navigator-container {
- margin-top: 15px;
-}
-
-.privacy .ls-privacy-head, .privacy p.ls-privacy-body {
- background: white;
- padding: 15px;
- margin-bottom: 0;
-}
-
-h1.survey-name {
- margin-top: 0;
- font-weight: bold;
-}
-
-.group-description {
- margin-bottom: 15px;
-}
-
-#surveys-list-container {
- background: white;
- padding: 15px;
-}
-
-.question-container {
- border: inherit;
- margin-bottom: 30px;
-}
-
-.ls-questionhelp {
- margin-bottom: 5px;
- margin-top: 5px;
-}
-.ls-questionhelp p {
- margin-bottom: 0;
-}
-
-table.ls-answers {
- margin-top: 15px;
- margin-bottom: 15px;
-}
-
-.sortable-rank {
- background: white;
-}
-
-.ls-answers .ls-heading th {
- font-weight: inherit;
- vertical-align: top;
-}
-
-.privacy-block {
- padding: 15px;
-}
-
-.privacy .form-check {
- padding: 15px;
- background: lightyellow;
-}
-.privacy .form-check .form-check-input {
- float: none;
- margin-left: 0;
-}
-
-#datasecurity_notice {
- margin-bottom: 15px;
-}
-
-.save-form {
- background: white;
-}
-.save-form .return-to-survey {
- padding-left: 15px;
- padding-bottom: 15px;
-}
-
-.save-message .h2 {
- margin-top: 0;
- font-weight: 700;
-}
-.save-message .text-warning {
- color: inherit !important;
- font-weight: 700;
-}
-
-.save-survey-form {
- background: white;
- padding: 15px;
-}
-
-.checkbox-item input[type=checkbox]:checked + label::after,
-.checkbox-item input[type=radio]:checked + label::after {
- content: "";
-}
-
-.btn-primary {
- border: none;
-}
-.btn-primary:hover {
- filter: grayscale(0.5);
-}
-.btn-primary:focus {
- filter: grayscale(0.5);
-}
-.btn-primary.active {
- filter: grayscale(0.5);
-}
-.btn-primary:active {
- filter: grayscale(0.5);
-}
-
-#surveys-list-container {
- background: white;
- padding: 15px;
-}
-
-.progress {
- border-radius: 0;
- box-shadow: none;
-}
-
-.progress-bar {
- font-size: 80%;
- padding-left: 2px;
-}
-
-.qback_red .question-title-container {
- background: red;
-}
-
-.qback_orange .question-title-container {
- background: darkorange;
-}
-
-.qback_green .question-title-container {
- background: darkgreen;
-}
-
-.qback_transparent .question-title-container {
- background: transparent;
-}
-
-div.qvideo {
- display: flex;
-}
-div.qvideo .video {
- max-width: 100%;
- height: auto;
-}
-div.qvideo .question-title-container, div.qvideo .answer-container {
- flex-grow: 2;
-}
-div.qvideo .question-title-container {
- background: transparent;
- color: #5A1D64;
-}
-div.qvideo .answer-container {
- padding-left: 30px;
-}
-div.qvideo .question-valid-container {
- display: none;
-}
-
-.hide-first-row table.ls-answers tr.answers-list:first-child {
- display: none;
-}
-
-.hidden {
- display: none;
+body.font-arial {
+ font-family: Arial, Helvetica, sans-serif;
+}
+
+body.font-arial_black {
+ font-family: ArialBlack, Helvetica, sans-serif;
+}
+
+body.font-opensans {
+ font-family: "Open Sans", Helvetica, sans-serif;
+}
+
+body.font-georgia {
+ font-family: Georgia, "Times New Roman", Times, serif;
+}
+
+body.font-courier {
+ font-family: "Courier New", Courier, monospace;
+}
+
+#welcome-container {
+ padding: 15px;
+ margin-top: 30px;
+}
+
+.top-container .top-content {
+ padding-bottom: 0;
+ margin-bottom: 0;
+}
+
+.row.question-container {
+ margin-left: 0;
+ margin-right: 0;
+}
+
+#navigator-container {
+ margin-top: 15px;
+}
+
+.privacy .ls-privacy-head, .privacy p.ls-privacy-body {
+ background: white;
+ padding: 15px;
+ margin-bottom: 0;
+}
+
+h1.survey-name {
+ margin-top: 0;
+ font-weight: bold;
+}
+
+.group-description {
+ margin-bottom: 15px;
+}
+
+#surveys-list-container {
+ background: white;
+ padding: 15px;
+}
+
+.question-container {
+ border: inherit;
+ margin-bottom: 30px;
+}
+
+.ls-questionhelp {
+ margin-bottom: 5px;
+ margin-top: 5px;
+}
+.ls-questionhelp p {
+ margin-bottom: 0;
+}
+
+table.ls-answers {
+ margin-top: 15px;
+ margin-bottom: 15px;
+}
+
+.sortable-rank {
+ background: white;
+}
+
+.ls-answers .ls-heading th {
+ font-weight: inherit;
+ vertical-align: top;
+}
+
+.privacy-block {
+ padding: 15px;
+}
+
+.privacy .form-check {
+ padding: 15px;
+ background: lightyellow;
+}
+.privacy .form-check .form-check-input {
+ float: none;
+ margin-left: 0;
+}
+
+#datasecurity_notice {
+ margin-bottom: 15px;
+}
+
+.save-form {
+ background: white;
+}
+.save-form .return-to-survey {
+ padding-left: 15px;
+ padding-bottom: 15px;
+}
+
+.save-message .h2 {
+ margin-top: 0;
+ font-weight: 700;
+}
+.save-message .text-warning {
+ color: inherit !important;
+ font-weight: 700;
+}
+
+.save-survey-form {
+ background: white;
+ padding: 15px;
+}
+
+.checkbox-item input[type=checkbox]:checked + label::after,
+.checkbox-item input[type=radio]:checked + label::after {
+ content: "";
+}
+
+.btn-primary {
+ border: none;
+}
+.btn-primary:hover {
+ filter: grayscale(0.5);
+}
+.btn-primary:focus {
+ filter: grayscale(0.5);
+}
+.btn-primary.active {
+ filter: grayscale(0.5);
+}
+.btn-primary:active {
+ filter: grayscale(0.5);
+}
+
+#surveys-list-container {
+ background: white;
+ padding: 15px;
+}
+
+.progress {
+ border-radius: 0;
+ box-shadow: none;
+}
+
+.progress-bar {
+ font-size: 80%;
+ padding-left: 2px;
+}
+
+.qback_red .question-title-container {
+ background: red;
+}
+
+.qback_orange .question-title-container {
+ background: darkorange;
+}
+
+.qback_green .question-title-container {
+ background: darkgreen;
+}
+
+.qback_transparent .question-title-container {
+ background: transparent;
+}
+
+div.qvideo {
+ display: flex;
+}
+div.qvideo .video {
+ max-width: 100%;
+ height: auto;
+}
+div.qvideo .question-title-container, div.qvideo .answer-container {
+ flex-grow: 2;
+}
+div.qvideo .question-title-container {
+ background: transparent;
+ color: #5A1D64;
+}
+div.qvideo .answer-container {
+ padding-left: 30px;
+}
+div.qvideo .question-valid-container {
+ display: none;
+}
+
+.hide-first-row table.ls-answers tr.answers-list:first-child {
+ display: none;
+}
+
+.hidden {
+ display: none;
}/*# sourceMappingURL=plain.css.map */
\ No newline at end of file
diff --git a/options/options.js b/options/options.js
index 9cea8f9..919f1e4 100644
--- a/options/options.js
+++ b/options/options.js
@@ -1,328 +1,328 @@
-var ThemeOptions = function(){
-var ThemeOptions = function () {
- 'use strict';
- //////////////////
- // Define necessary globals
-
- // general_inherit_active is not present at global level
- // see: https://github.com/LimeSurvey/LimeSurvey/blob/1cbfa11b081f54763b28364472926b155efea5dc/themes/survey/vanilla/options/options.twig#L71
- var inheritPossible = ($('#general_inherit_active').length > 0);
-
- //get option Object from Template configuration options
- var optionObject = {'general_inherit': 1};
-
- //get the global form
- var globalForm = $('.action_update_options_string_form');
-
- /////////////////
- // Define methods run on startup
-
- // #TemplateConfiguration_options is the id of the Options field in advanced option
- // getter for generalInherit
- var generalInherit = function () {
- return $('#TemplateConfiguration_options').val() === 'inherit';
- };
-
- //parse the options as set in the advanced form
- var parseOptionObject = function () {
- // If no general inherit, then pass the value of the "Options" field in advanced option to the object optionObject
- if ($('#TemplateConfiguration_options').length > 0 && !generalInherit()) {
- try {
- optionObject = JSON.parse($('#TemplateConfiguration_options').val());
- } catch (e) {
- console.ls ? console.ls.error('No valid option field!') : console.log('No valid option field!');
- }
- }
- };
-
- // Show/Hide fields on generalInherit
- // To hide a simple option on generalInherit: just add the class "action_hide_on_inherit" to the rows continaing it
- var startupGeneralInherit = function () {
-
- if (!inheritPossible) return false;
-
- if (generalInherit()) {
- $('#general_inherit_on').prop('checked', true).trigger('change').closest('label').addClass('active');
- $('.action_hide_on_inherit').addClass('d-none');
- } else {
- $('#general_inherit_off').prop('checked', true).trigger('change').closest('label').addClass('active');
- }
- };
-
- // So this function find the selectors in the forum, and pass their values to the advanced options
- var updateFieldSettings = function () {
-
- if ($('#general_inherit_on').prop('checked')) {
- $('#TemplateConfiguration_options').val('inherit');
- return;
- }
-
- globalForm.find('.selector_option_value_field').each(function (i, item) {
- //disabled items should be inherit or false
- if ($(item).prop('disabled')) {
- $(item).val((inheritPossible ? 'inherit' : false));
- }
-
- optionObject[$(item).attr('name')] = $(item).val();
- });
-
- globalForm.find('.selector_option_radio_field ').each(function (i, item) {
- //disabled items should be inherit or false
- if ($(item).prop('disabled')) {
- $(item).val((inheritPossible ? 'inherit' : false));
- }
-
- if ($(item).attr('type') == 'radio') {
- if ($(item).prop('checked')) {
- optionObject[$(item).attr('name')] = $(item).val();
- }
-
- }
-
- });
-
- var newOptionObject = $.extend(true, {}, optionObject);
- delete newOptionObject.general_inherit;
-
- $('#TemplateConfiguration_options').val(JSON.stringify(newOptionObject));
- };
-
- ///////////////
- // Utility Methods
- // -- small utilities i.g. for images or similar, or very specialized functions
-
- //Parses the option value for an item
- var parseOptionValue = function (item, fallbackValue) {
- fallbackValue = fallbackValue || false;
- // If general inherit, then the value of the dropdown is inherit, else it's the value defined in advanced options
- var itemValue = generalInherit() ? 'inherit' : optionObject[$(item).attr('name')];
-
- // If anything goes wrong (manual edit or anything else), we make sure it will have a correct value
- if (itemValue == null || itemValue == undefined) {
- itemValue = inheritPossible ? 'inherit' : fallbackValue;
- optionObject[$(item).attr('name')] = itemValue;
- }
- return itemValue;
- };
-
- //Set value and propagate to bootstrapSwitch
- var setAndPropageteToSwitch = function (item) {
- $(item).prop('checked', true).trigger('change');
- $(item).closest('label').addClass('active');
- };
-
-
- ///////////////
- // Parser methods
- // -- These methods will either parse through existing fields, or set existing fields to their correct values
-
- // Update values in the form to the template options
- // selector_option_value_field are the select dropdown (like variations and fonts)
- var prepareSelectField = function () {
- globalForm.find('.selector_option_value_field').each(function (i, item) {
- var itemValue = parseOptionValue(item);
- $(item).val(itemValue);
- });
- };
-
- // Generate the state of switches (On/Off/Inherit)
- var parseParentSwitchFields = function () {
- globalForm.find('.selector_option_radio_field').each(function (i, item) {
-
- var itemValue = parseOptionValue(item, 'off');
-
- //if it is a radio selector, check it and propagate the change to bootstrapSwitch
- if ($(item).val() == itemValue) {
- setAndPropageteToSwitch(item);
- }
- });
- };
-
- var prepareFontField = function () {
- optionObject.font = optionObject.font || (inheritPossible ? 'inherit' : 'roboto');
-
- if (optionObject.font !== 'inherit') {
- $('#simple_edit_options_font').val(optionObject.font);
- }
- updateFieldSettings();
- };
-
- ///////////////
- // HotSwap methods
- // -- These methods connect an input directly to the value in the optionsObject
-
- // Disable dependent inputs when their parents are set to off, or inherit
- var hotSwapParentRadioButtons = function () {
- // hotswapping the select fields to the radiobuttons
- // If an option is set to off, the attached selectors are disabled
- $('.selector_radio_childfield').each(function (i, selectorItem) {
- $('input[name=' + $(selectorItem).data('parent') + ']').on('change', function () {
-
- if ($(this).val() === 'on' && $(this).prop('checked') == true) {
- $(selectorItem).prop('disabled', false);
- } else {
- $(selectorItem).prop('disabled', true);
- }
-
- // disabled this part to always be able to click on "Preview image" button
- /*
- if ($(selectorItem).hasClass('selector_image_selector')) {
- $('button[data-target="#' + $(selectorItem).attr('id') + '"]').prop('disabled', $(selectorItem).val() == 'inherit');
- }
- */
-
- });
- });
- };
-
- // hotswapping the fields
- var hotSwapFields = function () {
-
- globalForm.find('.selector_option_value_field').on('change', function (evt) {
- updateFieldSettings();
- });
-
- globalForm.find('.selector_option_radio_field').on('change', updateFieldSettings);
-
- };
-
- var hotswapGeneralInherit = function () {
- //hotswapping the general inherit
- $('#general_inherit_on').on('change', function (evt) {
- $('#TemplateConfiguration_options').val('inherit');
- $('.action_hide_on_inherit').addClass('d-none');
- });
- $('#general_inherit_off').on('change', function (evt) {
- $('.action_hide_on_inherit').removeClass('d-none');
- updateFieldSettings();
- });
- };
-
- var hotswapFontField = function () {
- $('#simple_edit_options_font').on('change', function (evt) {
- var currentPackageObject = $('#TemplateConfiguration_packages_to_load').val() !== 'inherit'
- ? JSON.parse($('#TemplateConfiguration_packages_to_load').val())
- : $(this).data('inheritvalue');
-
- if ($('#simple_edit_options_font').val() === 'inherit') {
-
- $('#TemplateConfiguration_packages_to_load').val('inherit');
-
- } else {
- var selectedFontPackage = $(this).find('option:selected');
- var packageName = selectedFontPackage.data('font-package');
- var formatedPackageName = 'font-' + packageName;
-
- var filteredAdd = currentPackageObject.add.filter(function (value, index) {
- return !(/^font-.*$/.test(String(value)));
- });
- filteredAdd.push(formatedPackageName);
- currentPackageObject.add = filteredAdd;
- $('#TemplateConfiguration_packages_to_load').val(JSON.stringify(currentPackageObject));
- }
- });
- };
-
- ///////////////
- // Event methods
- // -- These methods are triggered on events. Please see `bind´ method for more information
- var onSaveButtonClickAction = function (evt) {
- evt.preventDefault();
-
- if (generalInherit()) {
- $('#TemplateConfiguration_options').val('inherit');
- $('#template-options-form').trigger('submit'); // submit the form
- } else {
- //Create a copy of the inherent optionObject
- var newOptionObject = $.extend(true, {}, optionObject);
- newOptionObject.generalInherit = null;
-
- // Now write the newly created object to the correspondent field as a json string
- $('#TemplateConfiguration_options').val(JSON.stringify(newOptionObject));
-
- // And submit the form
- // Beware, we are triggering 'submit' directly, which doesn't trigger HTML5 validations.
- // No HTML5 validations needed here, so all good.
- // If not we would need to add a hidden submit button and trigger a 'click' on it. (see fruity theme).
- // Like these: $('#template-options-form').find('button[type=submit]').trigger('click');
- $('#template-options-form').trigger('submit');
- }
- };
-
-
- ///////////////
- // Instance methods
- var bind = function () {
- //if the save button is clicked write everything into the template option field and send the form
- $('.action_update_options_string_button, #theme-options--submit').on('click', onSaveButtonClickAction);
-
- //Bind the hotwaps
- hotSwapParentRadioButtons();
- hotSwapFields();
- hotswapGeneralInherit();
- hotswapFontField();
- };
-
- var run = function () {
- parseOptionObject();
-
- startupGeneralInherit();
-
- prepareSelectField();
- parseParentSwitchFields();
- prepareFontField();
-
- bind();
- };
-
- return run;
-
-};
-
-var prepare = function () {
-
- var deferred = $.Deferred();
-
- //activate the bootstrap switch for checkboxes
- $('.action_activate_bootstrapswitch').bootstrapSwitch();
-
- var themeOptionStarter = new ThemeOptions();
- themeOptionStarter();
-
- setTimeout(function () {
- deferred.resolve();
- }, 650);
- return deferred.promise();
-};
-
-
-$(document).off('pjax:scriptcomplete.templateOptions').on('ready pjax:scriptcomplete.templateOptions', function () {
- $('.simple-template-edit-loading').css('display', 'block');
- prepare().then(function (runsesolve) {
- $('.simple-template-edit-loading').css('display', 'none');
- });
-
- $('.selector__open_lightbox').on('click', function (e) {
- e.preventDefault();
- var imgSrc = $($(this).data('bs-target')).find('option:selected').data('lightbox-src');
- var imgTitle = $($(this).data('bs-target')).val();
- imgTitle = imgTitle.split('/').pop();
- $('#lightbox-modal').find('.selector__title').text(imgTitle);
- $('#lightbox-modal').find('.selector__image').attr({'src': imgSrc, 'alt': imgTitle});
- $('#lightbox-modal').modal('show');
- });
-
- var uploadImageBind = new bindUpload({
- form: '#upload_frontend',
- input: '#upload_image_frontend',
- progress: '#upload_progress_frontend',
- onBeforeSend: function () {
- $('.simple-template-edit-loading').css('display', 'block');
- },
- onSuccess: function () {
- setTimeout(function () {
- $(document).trigger('pjax:load', {url: window.location.href});
- }, 2500);
- }
- });
-});
+var ThemeOptions = function(){
+var ThemeOptions = function () {
+ 'use strict';
+ //////////////////
+ // Define necessary globals
+
+ // general_inherit_active is not present at global level
+ // see: https://github.com/LimeSurvey/LimeSurvey/blob/1cbfa11b081f54763b28364472926b155efea5dc/themes/survey/vanilla/options/options.twig#L71
+ var inheritPossible = ($('#general_inherit_active').length > 0);
+
+ //get option Object from Template configuration options
+ var optionObject = {'general_inherit': 1};
+
+ //get the global form
+ var globalForm = $('.action_update_options_string_form');
+
+ /////////////////
+ // Define methods run on startup
+
+ // #TemplateConfiguration_options is the id of the Options field in advanced option
+ // getter for generalInherit
+ var generalInherit = function () {
+ return $('#TemplateConfiguration_options').val() === 'inherit';
+ };
+
+ //parse the options as set in the advanced form
+ var parseOptionObject = function () {
+ // If no general inherit, then pass the value of the "Options" field in advanced option to the object optionObject
+ if ($('#TemplateConfiguration_options').length > 0 && !generalInherit()) {
+ try {
+ optionObject = JSON.parse($('#TemplateConfiguration_options').val());
+ } catch (e) {
+ console.ls ? console.ls.error('No valid option field!') : console.log('No valid option field!');
+ }
+ }
+ };
+
+ // Show/Hide fields on generalInherit
+ // To hide a simple option on generalInherit: just add the class "action_hide_on_inherit" to the rows continaing it
+ var startupGeneralInherit = function () {
+
+ if (!inheritPossible) return false;
+
+ if (generalInherit()) {
+ $('#general_inherit_on').prop('checked', true).trigger('change').closest('label').addClass('active');
+ $('.action_hide_on_inherit').addClass('d-none');
+ } else {
+ $('#general_inherit_off').prop('checked', true).trigger('change').closest('label').addClass('active');
+ }
+ };
+
+ // So this function find the selectors in the forum, and pass their values to the advanced options
+ var updateFieldSettings = function () {
+
+ if ($('#general_inherit_on').prop('checked')) {
+ $('#TemplateConfiguration_options').val('inherit');
+ return;
+ }
+
+ globalForm.find('.selector_option_value_field').each(function (i, item) {
+ //disabled items should be inherit or false
+ if ($(item).prop('disabled')) {
+ $(item).val((inheritPossible ? 'inherit' : false));
+ }
+
+ optionObject[$(item).attr('name')] = $(item).val();
+ });
+
+ globalForm.find('.selector_option_radio_field ').each(function (i, item) {
+ //disabled items should be inherit or false
+ if ($(item).prop('disabled')) {
+ $(item).val((inheritPossible ? 'inherit' : false));
+ }
+
+ if ($(item).attr('type') == 'radio') {
+ if ($(item).prop('checked')) {
+ optionObject[$(item).attr('name')] = $(item).val();
+ }
+
+ }
+
+ });
+
+ var newOptionObject = $.extend(true, {}, optionObject);
+ delete newOptionObject.general_inherit;
+
+ $('#TemplateConfiguration_options').val(JSON.stringify(newOptionObject));
+ };
+
+ ///////////////
+ // Utility Methods
+ // -- small utilities i.g. for images or similar, or very specialized functions
+
+ //Parses the option value for an item
+ var parseOptionValue = function (item, fallbackValue) {
+ fallbackValue = fallbackValue || false;
+ // If general inherit, then the value of the dropdown is inherit, else it's the value defined in advanced options
+ var itemValue = generalInherit() ? 'inherit' : optionObject[$(item).attr('name')];
+
+ // If anything goes wrong (manual edit or anything else), we make sure it will have a correct value
+ if (itemValue == null || itemValue == undefined) {
+ itemValue = inheritPossible ? 'inherit' : fallbackValue;
+ optionObject[$(item).attr('name')] = itemValue;
+ }
+ return itemValue;
+ };
+
+ //Set value and propagate to bootstrapSwitch
+ var setAndPropageteToSwitch = function (item) {
+ $(item).prop('checked', true).trigger('change');
+ $(item).closest('label').addClass('active');
+ };
+
+
+ ///////////////
+ // Parser methods
+ // -- These methods will either parse through existing fields, or set existing fields to their correct values
+
+ // Update values in the form to the template options
+ // selector_option_value_field are the select dropdown (like variations and fonts)
+ var prepareSelectField = function () {
+ globalForm.find('.selector_option_value_field').each(function (i, item) {
+ var itemValue = parseOptionValue(item);
+ $(item).val(itemValue);
+ });
+ };
+
+ // Generate the state of switches (On/Off/Inherit)
+ var parseParentSwitchFields = function () {
+ globalForm.find('.selector_option_radio_field').each(function (i, item) {
+
+ var itemValue = parseOptionValue(item, 'off');
+
+ //if it is a radio selector, check it and propagate the change to bootstrapSwitch
+ if ($(item).val() == itemValue) {
+ setAndPropageteToSwitch(item);
+ }
+ });
+ };
+
+ var prepareFontField = function () {
+ optionObject.font = optionObject.font || (inheritPossible ? 'inherit' : 'roboto');
+
+ if (optionObject.font !== 'inherit') {
+ $('#simple_edit_options_font').val(optionObject.font);
+ }
+ updateFieldSettings();
+ };
+
+ ///////////////
+ // HotSwap methods
+ // -- These methods connect an input directly to the value in the optionsObject
+
+ // Disable dependent inputs when their parents are set to off, or inherit
+ var hotSwapParentRadioButtons = function () {
+ // hotswapping the select fields to the radiobuttons
+ // If an option is set to off, the attached selectors are disabled
+ $('.selector_radio_childfield').each(function (i, selectorItem) {
+ $('input[name=' + $(selectorItem).data('parent') + ']').on('change', function () {
+
+ if ($(this).val() === 'on' && $(this).prop('checked') == true) {
+ $(selectorItem).prop('disabled', false);
+ } else {
+ $(selectorItem).prop('disabled', true);
+ }
+
+ // disabled this part to always be able to click on "Preview image" button
+ /*
+ if ($(selectorItem).hasClass('selector_image_selector')) {
+ $('button[data-target="#' + $(selectorItem).attr('id') + '"]').prop('disabled', $(selectorItem).val() == 'inherit');
+ }
+ */
+
+ });
+ });
+ };
+
+ // hotswapping the fields
+ var hotSwapFields = function () {
+
+ globalForm.find('.selector_option_value_field').on('change', function (evt) {
+ updateFieldSettings();
+ });
+
+ globalForm.find('.selector_option_radio_field').on('change', updateFieldSettings);
+
+ };
+
+ var hotswapGeneralInherit = function () {
+ //hotswapping the general inherit
+ $('#general_inherit_on').on('change', function (evt) {
+ $('#TemplateConfiguration_options').val('inherit');
+ $('.action_hide_on_inherit').addClass('d-none');
+ });
+ $('#general_inherit_off').on('change', function (evt) {
+ $('.action_hide_on_inherit').removeClass('d-none');
+ updateFieldSettings();
+ });
+ };
+
+ var hotswapFontField = function () {
+ $('#simple_edit_options_font').on('change', function (evt) {
+ var currentPackageObject = $('#TemplateConfiguration_packages_to_load').val() !== 'inherit'
+ ? JSON.parse($('#TemplateConfiguration_packages_to_load').val())
+ : $(this).data('inheritvalue');
+
+ if ($('#simple_edit_options_font').val() === 'inherit') {
+
+ $('#TemplateConfiguration_packages_to_load').val('inherit');
+
+ } else {
+ var selectedFontPackage = $(this).find('option:selected');
+ var packageName = selectedFontPackage.data('font-package');
+ var formatedPackageName = 'font-' + packageName;
+
+ var filteredAdd = currentPackageObject.add.filter(function (value, index) {
+ return !(/^font-.*$/.test(String(value)));
+ });
+ filteredAdd.push(formatedPackageName);
+ currentPackageObject.add = filteredAdd;
+ $('#TemplateConfiguration_packages_to_load').val(JSON.stringify(currentPackageObject));
+ }
+ });
+ };
+
+ ///////////////
+ // Event methods
+ // -- These methods are triggered on events. Please see `bind´ method for more information
+ var onSaveButtonClickAction = function (evt) {
+ evt.preventDefault();
+
+ if (generalInherit()) {
+ $('#TemplateConfiguration_options').val('inherit');
+ $('#template-options-form').trigger('submit'); // submit the form
+ } else {
+ //Create a copy of the inherent optionObject
+ var newOptionObject = $.extend(true, {}, optionObject);
+ newOptionObject.generalInherit = null;
+
+ // Now write the newly created object to the correspondent field as a json string
+ $('#TemplateConfiguration_options').val(JSON.stringify(newOptionObject));
+
+ // And submit the form
+ // Beware, we are triggering 'submit' directly, which doesn't trigger HTML5 validations.
+ // No HTML5 validations needed here, so all good.
+ // If not we would need to add a hidden submit button and trigger a 'click' on it. (see fruity theme).
+ // Like these: $('#template-options-form').find('button[type=submit]').trigger('click');
+ $('#template-options-form').trigger('submit');
+ }
+ };
+
+
+ ///////////////
+ // Instance methods
+ var bind = function () {
+ //if the save button is clicked write everything into the template option field and send the form
+ $('.action_update_options_string_button, #theme-options--submit').on('click', onSaveButtonClickAction);
+
+ //Bind the hotwaps
+ hotSwapParentRadioButtons();
+ hotSwapFields();
+ hotswapGeneralInherit();
+ hotswapFontField();
+ };
+
+ var run = function () {
+ parseOptionObject();
+
+ startupGeneralInherit();
+
+ prepareSelectField();
+ parseParentSwitchFields();
+ prepareFontField();
+
+ bind();
+ };
+
+ return run;
+
+};
+
+var prepare = function () {
+
+ var deferred = $.Deferred();
+
+ //activate the bootstrap switch for checkboxes
+ $('.action_activate_bootstrapswitch').bootstrapSwitch();
+
+ var themeOptionStarter = new ThemeOptions();
+ themeOptionStarter();
+
+ setTimeout(function () {
+ deferred.resolve();
+ }, 650);
+ return deferred.promise();
+};
+
+
+$(document).off('pjax:scriptcomplete.templateOptions').on('ready pjax:scriptcomplete.templateOptions', function () {
+ $('.simple-template-edit-loading').css('display', 'block');
+ prepare().then(function (runsesolve) {
+ $('.simple-template-edit-loading').css('display', 'none');
+ });
+
+ $('.selector__open_lightbox').on('click', function (e) {
+ e.preventDefault();
+ var imgSrc = $($(this).data('bs-target')).find('option:selected').data('lightbox-src');
+ var imgTitle = $($(this).data('bs-target')).val();
+ imgTitle = imgTitle.split('/').pop();
+ $('#lightbox-modal').find('.selector__title').text(imgTitle);
+ $('#lightbox-modal').find('.selector__image').attr({'src': imgSrc, 'alt': imgTitle});
+ $('#lightbox-modal').modal('show');
+ });
+
+ var uploadImageBind = new bindUpload({
+ form: '#upload_frontend',
+ input: '#upload_image_frontend',
+ progress: '#upload_progress_frontend',
+ onBeforeSend: function () {
+ $('.simple-template-edit-loading').css('display', 'block');
+ },
+ onSuccess: function () {
+ setTimeout(function () {
+ $(document).trigger('pjax:load', {url: window.location.href});
+ }, 2500);
+ }
+ });
+});
diff --git a/sass/_base.sass b/sass/_base.sass
index da7a8d1..7a14df0 100644
--- a/sass/_base.sass
+++ b/sass/_base.sass
@@ -1,114 +1,114 @@
-body.font-arial
- font-family: Arial, Helvetica, sans-serif
-
-body.font-arial_black
- font-family: ArialBlack, Helvetica, sans-serif
-
-body.font-opensans
- font-family: "Open Sans", Helvetica, sans-serif
-
-body.font-georgia
- font-family: Georgia, 'Times New Roman', Times, serif
-
-body.font-courier
- font-family: 'Courier New', Courier, monospace
-
-#welcome-container
- padding: 15px
- margin-top: 30px
-
-.top-container
- .top-content
- padding-bottom: 0
- margin-bottom: 0
-
-.row.question-container
- margin-left: 0
- margin-right: 0
-
-#navigator-container
- margin-top: 15px
-
-.privacy
- .ls-privacy-head, p.ls-privacy-body
- background: white
- padding: 15px
- margin-bottom: 0
-
-h1.survey-name
- margin-top: 0
- font-weight: bold
-
-.group-description
- margin-bottom: 15px
-
-#surveys-list-container
- background: white
- padding: 15px
-
-.question-container
- border: inherit
- margin-bottom: 30px
-
-.ls-questionhelp
- margin-bottom: 5px
- margin-top: 5px
- p
- margin-bottom: 0
-
-table.ls-answers
- margin-top: 15px
- margin-bottom: 15px
-
-.sortable-rank
- background: white
-
-.ls-answers .ls-heading th
- font-weight: inherit
- vertical-align: top
-
-.privacy-block
- padding: 15px
-
-.privacy .form-check
- padding: 15px
- background: lightyellow
- .form-check-input
- float: none
- margin-left: 0
-
-#datasecurity_notice
- margin-bottom: 15px
-
-.save-form
- background: white
- .return-to-survey
- padding-left: 15px
- padding-bottom: 15px
-
-.save-message
- .h2
- margin-top: 0
- font-weight: 700
- .text-warning
- color: inherit !important
- font-weight: 700
-
-.save-survey-form
- background: white
- padding: 15px
-
-.checkbox-item input[type=checkbox]:checked + label::after,
-.checkbox-item input[type=radio]:checked + label::after
- content: ""
-
-.btn-primary
- border: none
- &:hover
- filter: grayscale(0.5)
- &:focus
- filter: grayscale(0.5)
- &.active
- filter: grayscale(0.5)
- &:active
+body.font-arial
+ font-family: Arial, Helvetica, sans-serif
+
+body.font-arial_black
+ font-family: ArialBlack, Helvetica, sans-serif
+
+body.font-opensans
+ font-family: "Open Sans", Helvetica, sans-serif
+
+body.font-georgia
+ font-family: Georgia, 'Times New Roman', Times, serif
+
+body.font-courier
+ font-family: 'Courier New', Courier, monospace
+
+#welcome-container
+ padding: 15px
+ margin-top: 30px
+
+.top-container
+ .top-content
+ padding-bottom: 0
+ margin-bottom: 0
+
+.row.question-container
+ margin-left: 0
+ margin-right: 0
+
+#navigator-container
+ margin-top: 15px
+
+.privacy
+ .ls-privacy-head, p.ls-privacy-body
+ background: white
+ padding: 15px
+ margin-bottom: 0
+
+h1.survey-name
+ margin-top: 0
+ font-weight: bold
+
+.group-description
+ margin-bottom: 15px
+
+#surveys-list-container
+ background: white
+ padding: 15px
+
+.question-container
+ border: inherit
+ margin-bottom: 30px
+
+.ls-questionhelp
+ margin-bottom: 5px
+ margin-top: 5px
+ p
+ margin-bottom: 0
+
+table.ls-answers
+ margin-top: 15px
+ margin-bottom: 15px
+
+.sortable-rank
+ background: white
+
+.ls-answers .ls-heading th
+ font-weight: inherit
+ vertical-align: top
+
+.privacy-block
+ padding: 15px
+
+.privacy .form-check
+ padding: 15px
+ background: lightyellow
+ .form-check-input
+ float: none
+ margin-left: 0
+
+#datasecurity_notice
+ margin-bottom: 15px
+
+.save-form
+ background: white
+ .return-to-survey
+ padding-left: 15px
+ padding-bottom: 15px
+
+.save-message
+ .h2
+ margin-top: 0
+ font-weight: 700
+ .text-warning
+ color: inherit !important
+ font-weight: 700
+
+.save-survey-form
+ background: white
+ padding: 15px
+
+.checkbox-item input[type=checkbox]:checked + label::after,
+.checkbox-item input[type=radio]:checked + label::after
+ content: ""
+
+.btn-primary
+ border: none
+ &:hover
+ filter: grayscale(0.5)
+ &:focus
+ filter: grayscale(0.5)
+ &.active
+ filter: grayscale(0.5)
+ &:active
filter: grayscale(0.5)
\ No newline at end of file
diff --git a/sass/_extras.sass b/sass/_extras.sass
index 3da422c..0e35a5e 100644
--- a/sass/_extras.sass
+++ b/sass/_extras.sass
@@ -1,32 +1,32 @@
-.qback_red .question-title-container
- background: red
-
-.qback_orange .question-title-container
- background: darkorange
-
-.qback_green .question-title-container
- background: darkgreen
-
-.qback_transparent .question-title-container
- background: transparent
-
-div.qvideo
- display: flex
- .video
- max-width: 100%
- height: auto
- .question-title-container, .answer-container
- flex-grow: 2
- .question-title-container
- background: transparent
- color: #5A1D64
- .answer-container
- padding-left: 30px
- .question-valid-container
- display: none
-
-.hide-first-row table.ls-answers tr.answers-list:first-child
- display: none
-
-.hidden
+.qback_red .question-title-container
+ background: red
+
+.qback_orange .question-title-container
+ background: darkorange
+
+.qback_green .question-title-container
+ background: darkgreen
+
+.qback_transparent .question-title-container
+ background: transparent
+
+div.qvideo
+ display: flex
+ .video
+ max-width: 100%
+ height: auto
+ .question-title-container, .answer-container
+ flex-grow: 2
+ .question-title-container
+ background: transparent
+ color: #5A1D64
+ .answer-container
+ padding-left: 30px
+ .question-valid-container
+ display: none
+
+.hide-first-row table.ls-answers tr.answers-list:first-child
+ display: none
+
+.hidden
display: none
\ No newline at end of file
diff --git a/sass/_progress.sass b/sass/_progress.sass
index 0b5170a..b8ec177 100644
--- a/sass/_progress.sass
+++ b/sass/_progress.sass
@@ -1,7 +1,7 @@
-.progress
- border-radius: 0
- box-shadow: none
-
-.progress-bar
- font-size: 80%
+.progress
+ border-radius: 0
+ box-shadow: none
+
+.progress-bar
+ font-size: 80%
padding-left: 2px
\ No newline at end of file
diff --git a/sass/_surveys-list.sass b/sass/_surveys-list.sass
index 0aa010a..ca621b7 100644
--- a/sass/_surveys-list.sass
+++ b/sass/_surveys-list.sass
@@ -1,3 +1,3 @@
-#surveys-list-container
- background: white
+#surveys-list-container
+ background: white
padding: 15px
\ No newline at end of file
diff --git a/sass/plain.sass b/sass/plain.sass
index 47e9bd4..43423f2 100644
--- a/sass/plain.sass
+++ b/sass/plain.sass
@@ -1,4 +1,4 @@
-@use 'base'
-@use 'surveys-list'
-@use 'progress'
+@use 'base'
+@use 'surveys-list'
+@use 'progress'
@use 'extras'
\ No newline at end of file
diff --git a/scripts/custom.js b/scripts/custom.js
index cd87a5b..a42ca80 100644
--- a/scripts/custom.js
+++ b/scripts/custom.js
@@ -1,40 +1,40 @@
-/******************
- User custom JS
- ---------------
-
- Put JS-functions for your template here.
- If possible use a closure, or add them to the general Template Object "Template"
-*/
-
-
-$(document).on('ready pjax:scriptcomplete',function(){
- /**
- * Code included inside this will only run once the page Document Object Model (DOM) is ready for JavaScript code to execute
- * @see https://learn.jquery.com/using-jquery-core/document-ready/
- */
-
- // Replace classes
- $('.container-fluid').addClass('container');
- $('.container-fluid').removeClass('container-fluid');
-
- // Remove classes
- $('.survey-name.text-center').removeClass('text-center');
- $('.survey-description.text-center').removeClass('text-center');
- $('.survey-welcome.h5.text-primary').removeClass('text-primary');
- $('.survey-welcome.h5').removeClass('h5');
- $('.ls-privacy-head.h4.text-primary').removeClass('text-primary');
- $('.ls-privacy-head.h4').removeClass('h4');
- $('.space-col').removeClass('space-col'); //The presence of .space-col is one of the greatest mistakes in the Vanilla theme IMHO
- $('.group-title.text-center.h3').removeClass('h3');
- $('.group-title.text-center').removeClass('text-center');
- $('.text-info').removeClass('text-info');
- $('.text-muted').removeClass('text-muted');
- $('.limit-text-window').removeClass('limit-text-window');
- $('.save-message.card').removeClass('card');
- $('.save-message.bg-light').removeClass('bg-light');
- $('.save-survey-form.col-lg-8.offset-lg-2').removeClass('offset-lg-2');
- $('.save-survey-form.col-lg-8').removeClass('col-lg-8');
- $('.save-message .card-body').removeClass('card-body');
- $('.navbar-light.bg-light').removeClass('bg-light');
- $('.privacy.row').removeClass('row');
-});
+/******************
+ User custom JS
+ ---------------
+
+ Put JS-functions for your template here.
+ If possible use a closure, or add them to the general Template Object "Template"
+*/
+
+
+$(document).on('ready pjax:scriptcomplete',function(){
+ /**
+ * Code included inside this will only run once the page Document Object Model (DOM) is ready for JavaScript code to execute
+ * @see https://learn.jquery.com/using-jquery-core/document-ready/
+ */
+
+ // Replace classes
+ $('.container-fluid').addClass('container');
+ $('.container-fluid').removeClass('container-fluid');
+
+ // Remove classes
+ $('.survey-name.text-center').removeClass('text-center');
+ $('.survey-description.text-center').removeClass('text-center');
+ $('.survey-welcome.h5.text-primary').removeClass('text-primary');
+ $('.survey-welcome.h5').removeClass('h5');
+ $('.ls-privacy-head.h4.text-primary').removeClass('text-primary');
+ $('.ls-privacy-head.h4').removeClass('h4');
+ $('.space-col').removeClass('space-col'); //The presence of .space-col is one of the greatest mistakes in the Vanilla theme IMHO
+ $('.group-title.text-center.h3').removeClass('h3');
+ $('.group-title.text-center').removeClass('text-center');
+ $('.text-info').removeClass('text-info');
+ $('.text-muted').removeClass('text-muted');
+ $('.limit-text-window').removeClass('limit-text-window');
+ $('.save-message.card').removeClass('card');
+ $('.save-message.bg-light').removeClass('bg-light');
+ $('.save-survey-form.col-lg-8.offset-lg-2').removeClass('offset-lg-2');
+ $('.save-survey-form.col-lg-8').removeClass('col-lg-8');
+ $('.save-message .card-body').removeClass('card-body');
+ $('.navbar-light.bg-light').removeClass('bg-light');
+ $('.privacy.row').removeClass('row');
+});
From cee78a973f34460c6ca6434d653f054c39114b35 Mon Sep 17 00:00:00 2001
From: Tammo ter Hark
Date: Mon, 16 Nov 2026 19:51:19 +0100
Subject: [PATCH 2/9] 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
---
README.md | 32 +++++++++++++++++++++++++++++-
config.xml | 10 ++++++----
options/options.twig | 1 -
sass/plain.sass | 17 +++++++++++++++-
views/subviews/header/nav_bar.twig | 28 ++++++++++++++++----------
5 files changed, 71 insertions(+), 17 deletions(-)
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)) %}
-
+
{% if ShowMenu %}
@@ -37,24 +38,25 @@ For the survey navigator ("Next", "Back", etc.), see: navigation/navigator.twig
{% endif %}
- {# Logo option #}
- {% if( aSurveyInfo.options.brandlogo == "on") %}
-
+ {# Left logo #}
+ {% if( aSurveyInfo.options.brandlogo == "on" and imageSrc(aSurveyInfo.options.brandlogofile)) %}
+
{{ image(aSurveyInfo.options.brandlogofile, aSurveyInfo.name, {"class": "logo img-fluid"}) }}
{% else %}
-
+
{{ aSurveyInfo.name }}
{% endif %}
- {% if( aSurveyInfo.options.secondlogo == "on") %}
-
- {{ image(aSurveyInfo.options.secondlogofile, aSurveyInfo.name, {"class": "logo img-fluid"}) }}
+ {# Center logo (absolutely centered via CSS, see sass/plain.sass) #}
+ {% if( aSurveyInfo.options.centerlogo == "on" and imageSrc(aSurveyInfo.options.centerlogofile)) %}
+
+ {{ image(aSurveyInfo.options.centerlogofile, aSurveyInfo.name, {"class": "logo img-fluid"}) }}
{% endif %}
{% if ShowMenu %}
-
{% endif %}
From 193de4b6b97418ff95cf6c74d7af3cb60f4723bd Mon Sep 17 00:00:00 2001
From: Tammo ter Hark
Date: Mon, 16 Nov 2026 19:51:19 +0100
Subject: [PATCH 3/9] 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
---
README.md | 7 +++++++
config.xml | 1 +
views/subviews/header/custom_header.twig | 13 +++++++++++--
3 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index bc5b41d..9ee7267 100644
--- a/README.md
+++ b/README.md
@@ -18,6 +18,7 @@ copying of files needed.
- `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.
@@ -29,3 +30,9 @@ 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`.
+
diff --git a/config.xml b/config.xml
index 4b0e7a0..f4c7267 100644
--- a/config.xml
+++ b/config.xml
@@ -100,6 +100,7 @@
#eeeeee
+ #444444
#5e1c64
#444444
#5e1c64
diff --git a/views/subviews/header/custom_header.twig b/views/subviews/header/custom_header.twig
index 301fbc1..b6dd478 100644
--- a/views/subviews/header/custom_header.twig
+++ b/views/subviews/header/custom_header.twig
@@ -145,8 +145,17 @@
background-color: {{ aSurveyInfo.options.headerbackgroundcolor }};
}
- .navbar-default .navbar-nav > li > a:hover {
- color: {{ aSurveyInfo.options.fontcolor }};
+ #survey-nav .navbar-nav > li > a,
+ #survey-nav .navbar-nav .nav-link {
+ color: {{ aSurveyInfo.options.navbarfontcolor }};
+ }
+
+ #survey-nav .navbar-nav > li > a:hover,
+ #survey-nav .navbar-nav > li > a:focus,
+ #survey-nav .navbar-nav .nav-link:hover,
+ #survey-nav .navbar-nav .nav-link:focus {
+ color: {{ aSurveyInfo.options.navbarfontcolor }};
+ opacity: 0.75;
}
.progress {
From b6a9ac74dbf7a3e3e9cde0dbb257ce53399b2689 Mon Sep 17 00:00:00 2001
From: Tammo ter Hark
Date: Mon, 16 Nov 2026 19:51:19 +0100
Subject: [PATCH 4/9] 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
---
README.md | 6 ++++++
config.xml | 1 +
views/subviews/header/custom_header.twig | 4 ++++
3 files changed, 11 insertions(+)
diff --git a/README.md b/README.md
index 9ee7267..6c65ba1 100644
--- a/README.md
+++ b/README.md
@@ -36,3 +36,9 @@ 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.
+
diff --git a/config.xml b/config.xml
index f4c7267..80371cb 100644
--- a/config.xml
+++ b/config.xml
@@ -73,6 +73,7 @@
./files/logo.png
off
./files/logo2.png
+ 15px
on
scroll
tile
diff --git a/views/subviews/header/custom_header.twig b/views/subviews/header/custom_header.twig
index b6dd478..5e98305 100644
--- a/views/subviews/header/custom_header.twig
+++ b/views/subviews/header/custom_header.twig
@@ -145,6 +145,10 @@
background-color: {{ aSurveyInfo.options.headerbackgroundcolor }};
}
+ #survey-nav .logo-container > img {
+ padding-top: {{ aSurveyInfo.options.logotopmargin }};
+ }
+
#survey-nav .navbar-nav > li > a,
#survey-nav .navbar-nav .nav-link {
color: {{ aSurveyInfo.options.navbarfontcolor }};
From 02eda6c503465cc4bbf336e5fa2ef7642af92b99 Mon Sep 17 00:00:00 2001
From: Tammo ter Hark
Date: Mon, 16 Nov 2026 19:51:19 +0100
Subject: [PATCH 5/9] 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
---
README.md | 33 +++++++++++++++++++++++++++++++++
config.xml | 36 +++++++++++++++++++++++++++++++++++-
2 files changed, 68 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 6c65ba1..bcb2913 100644
--- a/README.md
+++ b/README.md
@@ -42,3 +42,36 @@ 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:
+
+1. Put the font files in the variant's `files/fonts/` (e.g. `my-custom-font.woff2`).
+2. Create `css/variant.css` in the variant with the `@font-face` and the body
+ class rule (the selected font is applied as `font-` on ``):
+ ```css
+ @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.)
+3. In `variants/.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 `` 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).
+4. Run `php variants/build.php ` and upload/reset as usual.
+
diff --git a/config.xml b/config.xml
index 80371cb..0859735 100644
--- a/config.xml
+++ b/config.xml
@@ -109,10 +109,44 @@
#5e1c64
#ffffff
lightyellow
-
+
+
opensans
+
+
+
Arial
Arial Black
From 80a3d4a0792839cd811cfc61d58f5c70194f934a Mon Sep 17 00:00:00 2001
From: Tammo ter Hark
Date: Mon, 16 Nov 2026 19:51:19 +0100
Subject: [PATCH 6/9] feat(variants): thin client themes on one shared code
base
Architecture: a client theme extends this mother theme via 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/.json holds ONLY the house-style values (colors, fonts,
font sizes/weights/colors, logo files, logotopmargin, custom fonts).
- variants/build.php generates ..//config.xml from the mother
config.xml + the json: only those values are replaced, is set,
is emptied except . Unknown option keys fail the
build loudly, so drift is caught at build time.
- Client definitions (variants/.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
---
.gitignore | 6 ++
README.md | 41 ++++++++
variants/build.php | 226 +++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 273 insertions(+)
create mode 100644 .gitignore
create mode 100644 variants/build.php
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..b299d56
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+# Client variant definitions contain confidential house-style values (client
+# names, colors, fonts, logo files). They are NOT kept in this public repo:
+# store them in the private variants repository or locally, and point
+# variants/build.php at that folder (2nd CLI argument or RESPONDAGE_VARIANTS_DIR).
+variants/*.json
+variants/README.internal.md
diff --git a/README.md b/README.md
index bcb2913..7417087 100644
--- a/README.md
+++ b/README.md
@@ -75,3 +75,44 @@ its own font files and css:
loaded by the variant's own css).
4. Run `php variants/build.php ` and upload/reset as usual.
+## 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.
+
+Workflow:
+
+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 —
+ never hardcode house-style values in shared files (`views/`, `sass/`,
+ `css/`, `scripts/`), because those are inherited by all variants.
+2. Create `variants/.json` with the variant name/title/description and
+ only the house-style option keys with the client values:
+ ```json
+ {
+ "name": "client_vanilla",
+ "title": "Client Vanilla",
+ "options": { "primarycolor": "#123456", "fontsize": "18px" }
+ }
+ ```
+2. Run `php variants/build.php `. This generates
+ `..//config.xml`: a copy of this theme's config.xml with only those
+ option values replaced, `` set to this theme, and the ``
+ section emptied except `` (same as LimeSurvey's own "extend
+ theme" action), so engine settings are inherited. The `` list is
+ kept: LimeSurvey resolves each listed file in the variant first and then in
+ the mother, so the mother's css/js keep loading until a variant ships its
+ own file with the same name. Unknown option keys make the build fail
+ loudly, so drift is caught at build time.
+3. Put the client's images in `..//files/`, upload the folder to
+ `upload/themes/survey/`, install/reset the theme in LimeSurvey.
+
+Because of the native `` mechanism:
+- changes to any file (twig/css/js) in this mother theme apply to all
+ 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/.json` and the variant's
+ `files/`, so they are never overwritten by changes in this mother theme.
+
diff --git a/variants/build.php b/variants/build.php
new file mode 100644
index 0000000..145697e
--- /dev/null
+++ b/variants/build.php
@@ -0,0 +1,226 @@
+ in its config.xml). LimeSurvey then inherits ALL files
+ * (views, css, js, images, options page) from the mother theme, so any
+ * change made here in a file automatically applies to every variant.
+ *
+ * Only config.xml is generated per variant: it is a copy of this mother
+ * config.xml in which ONLY the house-style option values (colors, fonts,
+ * font sizes/colors/weights, logo files) listed in variants/.json
+ * are replaced, plus the metadata (name/title/description/extends).
+ * The section is emptied except , so engine settings
+ * (css framework, packages, view/files directories, template editor) are
+ * inherited from the mother. The section is kept as-is: LimeSurvey
+ * resolves each listed file in the variant first and then in the mother,
+ * so the mother's css/js keep loading until the variant ships its own file
+ * with the same name (which then replaces the mother's file). This mirrors
+ * what LimeSurvey itself does when you "extend" a theme in the theme editor.
+ *
+ * Usage:
+ * php variants/build.php [definitions-dir]
+ *
+ * The definitions (variants/.json) contain confidential client
+ * house-style values and are NOT kept in this (public) repository - see
+ * .gitignore. Store them in the private variants repository or locally, and
+ * point this script at that folder via the optional second argument or the
+ * RESPONDAGE_VARIANTS_DIR environment variable.
+ *
+ * Example:
+ * php variants/build.php /path/to/private-variants
+ *
+ * Optional keys in the variant json:
+ * "files_add": {"css": ["css/variant.css"], "js": []} extra files shipped by the
+ * variant, appended to the list of the generated config.xml
+ * "fontOptions": [{"value": "my_custom_font", "label": "My Custom Font"}] custom fonts,
+ * appended to the "Custom (this theme)" optgroup of the font dropdown
+ *
+ * Output:
+ * ..//config.xml (next to this theme, in upload/themes/survey)
+ *
+ * After running this script, upload the variant folder to
+ * upload/themes/survey/ and (re)install or reset the theme in LimeSurvey
+ * (Theme options -> reset), so the new config.xml is imported into the DB.
+ *
+ * If an option key in the json no longer exists in the mother config.xml,
+ * the script fails loudly, so drift between mother and variant is caught
+ * at build time instead of silently rendering wrong values.
+ */
+
+if (PHP_SAPI !== 'cli') {
+ fwrite(STDERR, "This script must be run from the command line.\n");
+ exit(1);
+}
+
+$variantName = isset($argv[1]) ? trim($argv[1]) : '';
+if ($variantName === '' || !preg_match('/^[a-z0-9_]+$/i', $variantName)) {
+ fwrite(STDERR, "Usage: php variants/build.php [definitions-dir]\n");
+ fwrite(STDERR, " must match an existing /.json file.\n");
+ fwrite(STDERR, " Default definitions-dir: the variants/ folder next to this script, or RESPONDAGE_VARIANTS_DIR.\n");
+ exit(1);
+}
+
+$motherDir = dirname(__DIR__); // .../themes/survey/respondage_vanilla
+$themesDir = dirname($motherDir); // .../themes/survey
+$motherConfig = $motherDir . DIRECTORY_SEPARATOR . 'config.xml';
+$definitionsDir = $argv[2] ?? (getenv('RESPONDAGE_VARIANTS_DIR') ?: __DIR__);
+$definitionFile = rtrim($definitionsDir, '/\\') . DIRECTORY_SEPARATOR . $variantName . '.json';
+
+foreach ([$motherConfig, $definitionFile] as $f) {
+ if (!is_file($f)) {
+ fwrite(STDERR, "Required file not found: $f\n");
+ exit(1);
+ }
+}
+
+$definition = json_decode(file_get_contents($definitionFile), true);
+if (!is_array($definition)) {
+ fwrite(STDERR, "Invalid JSON in $definitionFile\n");
+ exit(1);
+}
+
+$doc = new DOMDocument();
+$doc->preserveWhiteSpace = false;
+$doc->formatOutput = true;
+if (!$doc->load($motherConfig)) {
+ fwrite(STDERR, "Could not parse mother config: $motherConfig\n");
+ exit(1);
+}
+$xpath = new DOMXPath($doc);
+
+$motherName = (string) $xpath->query('//metadata/name')->item(0)->textContent;
+
+// --- metadata: identify the variant, point extends to the mother theme ---
+function setMetadata(DOMXPath $xpath, DOMDocument $doc, string $tag, string $value): void
+{
+ $node = $xpath->query("//metadata/$tag")->item(0);
+ if ($node === null) {
+ $node = $doc->createElement($tag);
+ $xpath->query('//metadata')->item(0)->appendChild($node);
+ }
+ $node->textContent = $value;
+}
+
+setMetadata($xpath, $doc, 'name', $definition['name'] ?? $variantName);
+setMetadata($xpath, $doc, 'title', $definition['title'] ?? ucfirst($variantName));
+if (isset($definition['description'])) {
+ setMetadata($xpath, $doc, 'description', $definition['description']);
+}
+setMetadata($xpath, $doc, 'extends', $motherName);
+setMetadata($xpath, $doc, 'lastUpdate', date('Y-m-d H:i:s'));
+
+// --- empty the section except : inherited from the mother ---
+// (same as TemplateManifest::deleteEngineInDom() does when extending a theme in LimeSurvey)
+$engineNode = $xpath->query('//engine')->item(0);
+if ($engineNode !== null) {
+ foreach (iterator_to_array($engineNode->childNodes) as $child) {
+ if ($child instanceof DOMElement && $child->nodeName !== 'optionspage') {
+ $engineNode->removeChild($child);
+ } elseif ($child instanceof DOMComment) {
+ $engineNode->removeChild($child);
+ }
+ }
+}
+
+// --- extra files shipped by the variant itself ---
+// In the variant json: "files_add": {"css": ["css/variant.css"], "js": []}
+// They are appended to the list. The mother's files keep loading until the
+// variant ships a file with the same name; from that moment it replaces the mother's
+// file (LimeSurvey "add" also means "replace" for identical paths).
+if (!empty($definition['files_add'])) {
+ $filesNode = $xpath->query('//files')->item(0);
+ if ($filesNode === null) {
+ fwrite(STDERR, "No section found in mother config\n");
+ exit(1);
+ }
+ foreach (['css', 'js', 'print_css'] as $type) {
+ $values = $definition['files_add'][$type] ?? [];
+ if (empty($values)) {
+ continue;
+ }
+ $typeNode = $xpath->query('//files/' . $type)->item(0);
+ if ($typeNode === null) {
+ $typeNode = $doc->createElement($type);
+ $filesNode->appendChild($typeNode);
+ }
+ foreach ((array) $values as $file) {
+ $add = $doc->createElement('add');
+ $add->appendChild($doc->createTextNode((string) $file));
+ $typeNode->appendChild($add);
+ }
+ }
+}
+
+// --- custom fonts of the variant, added to the font dropdown ---
+// In the variant json: "fontOptions": [{"value": "my_custom_font", "label": "My Custom Font"}]
+// The font files themselves live in the variant's files/fonts/ and the @font-face +
+// body.font- rule in a css file shipped by the variant (see files_add, e.g.
+// css/variant.css with src: url('../files/fonts/my-custom-font.woff2')).
+// data-font-package stays "websafe": LimeSurvey only knows the core font packages
+// (application/config/fonts.php), and "websafe" is the neutral one, so no missing
+// package is requested. The real font is loaded by the variant's own css.
+if (!empty($definition['fontOptions'])) {
+ $optgroup = $xpath->query('//options/font/dropdownoptions/optgroup[@label="Custom (this theme)"]')->item(0);
+ if ($optgroup === null) {
+ fwrite(STDERR, "No found in the font dropdown of the mother config.xml\n");
+ exit(1);
+ }
+ foreach ((array) $definition['fontOptions'] as $font) {
+ if (empty($font['value']) || empty($font['label'])) {
+ fwrite(STDERR, "Each entry in 'fontOptions' needs 'value' and 'label'\n");
+ exit(1);
+ }
+ $value = preg_replace('/[^a-z0-9_]/i', '_', (string) $font['value']);
+ $option = $doc->createElement('option');
+ $option->setAttribute('class', 'font-' . $value);
+ $option->setAttribute('value', $value);
+ $option->setAttribute('data-font-package', 'websafe');
+ $option->appendChild($doc->createTextNode((string) $font['label']));
+ $optgroup->appendChild($option);
+ }
+}
+
+// --- options: replace only the house-style values listed in the json ---
+if (!empty($definition['options']) && !is_array($definition['options'])) {
+ fwrite(STDERR, "'options' in $definitionFile must be an object of optionName => value\n");
+ exit(1);
+}
+$optionsNode = $xpath->query('//options')->item(0);
+if ($optionsNode === null) {
+ fwrite(STDERR, "No section found in mother config\n");
+ exit(1);
+}
+foreach (($definition['options'] ?? []) as $key => $value) {
+ $matches = $xpath->query('//options/' . $key);
+ if ($matches->length === 0) {
+ fwrite(STDERR, "Option '$key' from $definitionFile does not exist in the mother config.xml.\n");
+ fwrite(STDERR, "Remove it from the json or rename it there; the mother theme changed.\n");
+ exit(1);
+ }
+ $option = $matches->item(0);
+ // Replace only the text value, keep child elements (e.g. of the font option)
+ foreach (iterator_to_array($option->childNodes) as $child) {
+ if ($child instanceof DOMText) {
+ $option->removeChild($child);
+ }
+ }
+ $option->insertBefore($doc->createTextNode((string) $value), $option->firstChild);
+}
+
+// --- write the variant config ---
+$variantDir = $themesDir . DIRECTORY_SEPARATOR . $variantName;
+if (!is_dir($variantDir) && !mkdir($variantDir, 0775, true)) {
+ fwrite(STDERR, "Could not create directory: $variantDir\n");
+ exit(1);
+}
+if (!is_dir($variantDir . DIRECTORY_SEPARATOR . 'files')) {
+ mkdir($variantDir . DIRECTORY_SEPARATOR . 'files', 0775, true);
+}
+$out = $variantDir . DIRECTORY_SEPARATOR . 'config.xml';
+$doc->save($out);
+
+echo "Variant '$variantName' built: $out\n";
+echo 'Options overridden: ' . (empty($definition['options']) ? '(none)' : implode(', ', array_keys($definition['options']))) . "\n";
+echo "Remember: upload the folder to upload/themes/survey/ and reset the theme in LimeSurvey.\n";
From 7677aefc140c848aec645a66f35f3f4f90da167a Mon Sep 17 00:00:00 2001
From: Tammo ter Hark
Date: Mon, 16 Nov 2026 19:51:19 +0100
Subject: [PATCH 7/9] docs: document conventions in config.xml (HOUSE-STYLE
markers, LF line endings)
- HOUSE-STYLE convention block above and per-section markers
(Images/Questions/Colors/Fonts) make clear which options are house-style
specific and belong in variants/.json only - never hardcoded in
shared views/sass/css/js files.
- Header comment documents the LF-only line-ending rule (enforced by
.gitattributes).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe
---
config.xml | 34 +++++++++++++++++++++++++++++++++-
1 file changed, 33 insertions(+), 1 deletion(-)
diff --git a/config.xml b/config.xml
index 0859735..2c70849 100644
--- a/config.xml
+++ b/config.xml
@@ -3,6 +3,11 @@
(¯`·._.·(¯`·._.· Vanilla Theme Manifest ·._.·´¯)·._.·´¯)
Base configuration for Vanilla Theme.
The content of this file is imported into DB when you install the template.
+
+ Line endings: ALL text files in this theme (including this config.xml) use
+ LF (Unix) line endings only - no CRLF, no lone CR. This is enforced by
+ .gitattributes (* text=auto eol=lf). Keep it that way so diffs stay
+ readable; do not re-save files with CRLF line endings.
-->
@@ -59,6 +64,20 @@
+
+
off
on
@@ -66,6 +85,9 @@
off
enable
+
on
./files/logo.png
@@ -80,6 +102,12 @@
./files/tiledtexture.png
#dddddd
+
#5e1c64
#ffffff
@@ -99,7 +127,11 @@
under
-
+
+
#eeeeee
#444444
#5e1c64
From 7de33a31f747469eaea89a44707ca9c43474bbd1 Mon Sep 17 00:00:00 2001
From: Tammo ter Hark
Date: Mon, 16 Nov 2026 19:51:19 +0100
Subject: [PATCH 8/9] chore: version 3.1.0, declare compatibility with
LimeSurvey 6 and 7
- version 3.0.1 -> 3.1.0, lastUpdate refreshed.
- now lists 6.0 and 7.0 (same as the core vanilla theme), so
the theme is accepted on both LS 6 and LS 7.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe
---
config.xml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/config.xml b/config.xml
index 2c70849..c97f35a 100644
--- a/config.xml
+++ b/config.xml
@@ -21,15 +21,16 @@
http://www.respondage.nl
Copyright (C) 2026 Respondage. All rights reserved.
GNU General Public License version 2 or later
- 3.0.1
+ 3.1.0
3
Respondage Theme based on core theme Vanilla A clean and simple base that was used by a certain theme developer to create a really clean theme.]]>
- 2026-06-10 12:00:00
+ 2026-11-16 19:13:27
vanilla
6.0
+ 7.0