├── .dockerignore ├── .github └── workflows │ ├── docker_container_registry.yml │ └── gh_container_registry.yml ├── Dockerfile ├── LICENSE ├── data ├── Obsthausen_Fragen.csv ├── Obsthausen_Parteien.csv ├── appel2.jpg ├── banane2.jpg ├── definition.js ├── egal2.jpg └── tbc2.jpg ├── docker-compose-dev.yml ├── docker-compose.yml ├── extras ├── addon_check_iframe_resize_client.js ├── addon_check_iframe_resize_host.js ├── addon_contacts_in_results.js ├── addon_favorite_party.js ├── addon_limit_results.js ├── addon_permalink_to_personal_result.js ├── addon_results_textfilter_by_button.js ├── addon_show_first_results.js ├── addon_tooltips.js ├── data_fruitville.zip ├── data_obsthausen.zip ├── data_springfield.zip ├── readme.md ├── startSimplePythonServer.txt ├── statistics │ ├── db_settings.php │ ├── example_results.ods │ ├── readme.md │ ├── results.txt │ ├── results_db.sql │ ├── vote_db.php │ └── vote_txt.php └── statistics_db │ ├── htaccess │ ├── htpasswd │ ├── read_db_write_text.php │ ├── readme.md │ └── results_db.txt ├── i18n ├── i18n_de.js └── i18n_en.js ├── index.html ├── quicktest.html ├── readme.md ├── results.html ├── styles ├── buttons-colors-off.css ├── buttons-colors-on.css ├── default.css └── progressbar.css └── system ├── License-GPL-3.0-en.txt ├── License-MIT-jquery.txt ├── Lizenz-GPL-3.0-de.txt ├── Mat-O-Wahl-Hilfe.odt ├── Mat-O-Wahl-Hilfe.pdf ├── bootstrap4 ├── css │ ├── bootstrap-grid.css │ ├── bootstrap-grid.css.map │ ├── bootstrap-grid.min.css │ ├── bootstrap-grid.min.css.map │ ├── bootstrap-reboot.css │ ├── bootstrap-reboot.css.map │ ├── bootstrap-reboot.min.css │ ├── bootstrap-reboot.min.css.map │ ├── bootstrap.css │ ├── bootstrap.css.map │ ├── bootstrap.min.css │ └── bootstrap.min.css.map ├── js │ ├── bootstrap.bundle.js │ ├── bootstrap.bundle.js.map │ ├── bootstrap.bundle.min.js │ ├── bootstrap.bundle.min.js.map │ ├── bootstrap.js │ ├── bootstrap.js.map │ ├── bootstrap.min.js │ └── bootstrap.min.js.map └── version.txt ├── changelog.md ├── general.js ├── imprint.html ├── imprint.js ├── jquery.csv-0.8.9.min.js ├── jquery3 └── jquery-3.4.1.min.js ├── output.js ├── quicktest.js └── results.js /.dockerignore: -------------------------------------------------------------------------------- 1 | LICENSE 2 | readme.md -------------------------------------------------------------------------------- /.github/workflows/docker_container_registry.yml: -------------------------------------------------------------------------------- 1 | name: Build and Push Docker Image to docker registry 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - name: Set up QEMU 14 | uses: docker/setup-qemu-action@v3 15 | 16 | - name: Set up Docker Buildx 17 | uses: docker/setup-buildx-action@v1 18 | 19 | - name: Log in to Docker Hub 20 | uses: docker/login-action@v1 21 | with: 22 | username: ${{ secrets.docker_username }} 23 | password: ${{ secrets.docker_password }} 24 | 25 | - name: Get latest release tag 26 | id: get_latest_release 27 | uses: pozetroninc/github-action-get-latest-release@master 28 | with: 29 | owner: msteudtn 30 | repo: mat-o-wahl 31 | 32 | - name: Build and push Docker image 33 | uses: docker/build-push-action@v2 34 | with: 35 | file: dockerfile 36 | push: true 37 | platforms: linux/amd64,linux/arm64 38 | tags: ${{ secrets.docker_username }}/mat-o-wahl:latest,${{ secrets.docker_username }}/mat-o-wahl:${{ steps.get_latest_release.outputs.release }} -------------------------------------------------------------------------------- /.github/workflows/gh_container_registry.yml: -------------------------------------------------------------------------------- 1 | name: Build and Push Docker Image to github registry 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - name: Get latest release tag 14 | id: get_latest_release 15 | uses: pozetroninc/github-action-get-latest-release@master 16 | with: 17 | owner: msteudtn 18 | repo: mat-o-wahl 19 | 20 | - name: 'Checkout GitHub Action' 21 | uses: actions/checkout@v2 22 | 23 | - name: Set up Docker Buildx 24 | uses: docker/setup-buildx-action@v1 25 | 26 | - name: log in to Github Container Registry 27 | uses: docker/login-action@v2 28 | with: 29 | registry: ghcr.io 30 | username: ${{ github.repository_owner }} 31 | password: ${{ secrets.GHCR_TOKEN }} 32 | 33 | - name: 'Build and push Docker image' 34 | run: | 35 | docker buildx create --use 36 | docker buildx build --platform linux/amd64,linux/arm64 . --tag ghcr.io/msteudtn/mat-o-wahl:latest --tag ghcr.io/mat-o-wahl:${{ steps.get_latest_release.outputs.release }} --push -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx:1.27.3 AS mat-o-wahl 2 | COPY . /usr/share/nginx/html/ 3 | 4 | EXPOSE 80 5 | -------------------------------------------------------------------------------- /data/Obsthausen_Fragen.csv: -------------------------------------------------------------------------------- 1 | "Farbe";"Die beste Fruchtfarbe ist gelb." 2 | "Form";"Die beste Fruchtform ist rund." 3 | "Schale";"Früchte muss man mit ihrer Schale essen können." 4 | "Spinat";"Spinat ist nicht nur gesund, sondern schmeckt auch lecker." 5 | "Reife";"Früchte müssen bis zur vollen Reife an der Pflanze bleiben." 6 | "Süße";"Süße Früchte schmecken am besten." 7 | -------------------------------------------------------------------------------- /data/Obsthausen_Parteien.csv: -------------------------------------------------------------------------------- 1 | Partei_kurz:;"APPD" 2 | Partei_lang:;"Appelpartei Deutschlands" 3 | Partei_Beschreibung:;"Die Apfelpartei steht seit vielen Jahren für alle Angelegenheiten des Apfels. 👤 ​ ‎ " 4 | Partei_URL:;"https://www.appelpartei.ap" 5 | Partei_Bild:;"data/appel2.jpg" 6 | -1;"Gelb ist keine schöne Farbe. Rot ist viel besser!" 7 | 1;"Runde Früchte sind am besten!" 8 | 1;"Volle Zustimmung!" 9 | 0;"Ist uns ziemlich egal." 10 | 1;"Ja, Früchte sollen am Baum bleiben, bis sie reif sind." 11 | 1;"Ja, süße Früchte sind toll." 12 | # 13 | Partei_kurz:;"Bananen" 14 | Partei_lang:;"Bananenrepublikpartei" 15 | Partei_Beschreibung:;"Warum ist die Banane krumm? Weil niemand in den Urwald zog und die Banane grade bog! - Die Bananenpartei kümmert sich um alle Belange der Bananen. ​ ‍ " 16 | Partei_URL:;"https://www.banane.ba" 17 | Partei_Bild:;"data/banane2.jpg" 18 | 1;"Gelb ist die beste Farbe! Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." 19 | -1;"Früchte müssen lang sein, nicht rund. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." 20 | -1;"Wer will denn ernsthaft die Schalte mitessen? Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." 21 | -1;"Spinat ist eklig. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." 22 | -1;"Früchte können schon früher abgenommen werden und im Container reifen. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." 23 | 1;"Süße Früchte sind lecker. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." 24 | #; 25 | Partei_kurz:;"TBC" 26 | Partei_lang:;"Tradionelle Bundesdeutsche Citronenpartei" 27 | Partei_Beschreibung:;"Deutsche, kauft deutsche Zitronen! - Gelb, saftig, sauer - ideal um zum Lachen in den Keller zu gehen. ​ ‍ ‎ " 28 | Partei_URL:;"https://www.die-citronen.ca" 29 | Partei_Bild:;"data/tbc2.jpg" 30 | 1;Gelb ist eindeutig die beste Farbe. 31 | 1;Runde Früchte haben die beste Form! 32 | -1;Die Schale muss nicht mitgegessen werden. 33 | -1;Spinat ist kein gesundes Essen. 34 | -1;Früchte können gern schon frühzeitig abgenommen werden. 35 | -1;Süße Früchte sind für kleine Mädchen. Echte Männer mögen Zitronen! 36 | # 37 | Partei_kurz:;"Neutrale" 38 | Partei_lang:;"Neutrale Partei" 39 | Partei_Beschreibung:;"👤 ​" 40 | Partei_URL:;"http://www.neutrale-partei.np" 41 | Partei_Bild:;"data/egal2.jpg" 42 | 0;Ist uns egal. 43 | 0;Ist uns egal. 44 | 0;Ist uns egal. 45 | 0;Ist uns egal. 46 | 0;Ist uns egal. 47 | 0;Ist uns egal. 48 | 49 | -------------------------------------------------------------------------------- /data/appel2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/msteudtn/Mat-O-Wahl/a0322f949e5a13082813e5410dae520931e31a4d/data/appel2.jpg -------------------------------------------------------------------------------- /data/banane2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/msteudtn/Mat-O-Wahl/a0322f949e5a13082813e5410dae520931e31a4d/data/banane2.jpg -------------------------------------------------------------------------------- /data/definition.js: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////// 2 | 3 | /* 4 | DEFINITIONEN *** DEFINITIONS 5 | http://www.mat-o-wahl.de 6 | 7 | DE: Bei Problemen benutzen Sie bitte die /QUICKTEST.HTML 8 | oder lesen in der /SYSTEM/MAT-O-WAHL-HILFE.PDF nach. 9 | Diese Datei am besten in einem Editor mit Syntaxhervorhebung bearbeiten. z.B. Notepad++, gedit, kate, ... 10 | 11 | ******************************************************************** 12 | 13 | EN: Please try QUICKTEST.HTML in case of problems. 14 | Edit this file with an editor that uses syntax-highlighting, e.g. Notepad++, gedit, kate, ... 15 | */ 16 | 17 | /////////////////////////////////////////////////////////////////////// 18 | 19 | /* 20 | 1. ALLGEMEINE / EINFACHE EINSTELLUNGEN: 21 | 22 | DE: Bei den CSV-Dateien bitte beachten: 23 | - ueberall das gleiche Trennzeichen benutzen (z.B. immer nur Komma) 24 | - Zweispaltig aufbauen, z.B. 25 | -- richtig: 1,"Wir sind dafür" 26 | -- richtig: 1,"" 27 | -- grenzwertig: 1, 28 | -- falsch: 1 29 | 30 | Bei Problemen mit Umlauten und Sonderzeichen benutzen Sie bitte 31 | den entsprechenden HTML-Code. z.B. ä = ae = ä Anführungszeichen = " 32 | Siehe: http://de.selfhtml.org/html/allgemein/zeichen.htm#umlaute 33 | 34 | ******************************************************************** 35 | 36 | 1. GENERAL / SIMPLE SETTINGS 37 | 38 | EN: When creating the CSV files, please take care of: 39 | - use always the same separator (e.g. always comma) 40 | - use two rows, e.g. 41 | -- right: 1,"We support it" 42 | -- right: 1,"" 43 | -- borderline: 1, 44 | -- wrong: 1 45 | 46 | In case of problems with special characters, please use its HTML code 47 | see here: https://www.utexas.edu/learn/html/spchar.html 48 | 49 | */ 50 | 51 | // -------------------------------------------------------------------- 52 | 53 | /* 54 | 1.1. FRAGENKATALOG: 55 | DE: Die erste Spalte der CSV-Datei enthält eine Kurzzusammenfassung der Frage, die zweite Spalte enthält die eigentliche Frage. 56 | z.B. "Flughafenausbau","Der Flughafen soll ausgebaut werden." 57 | 58 | ******************************************************************** 59 | 60 | 1.1. LIST OF QUESTIONS: 61 | EN: First row always contains a short summary of the question while the second row holds the question itself. 62 | e.g. "Airport","The airport shall be expanded." 63 | */ 64 | 65 | const fileQuestions = "Obsthausen_Fragen.csv"; 66 | 67 | 68 | // -------------------------------------------------------------------- 69 | 70 | // 1.2 ANZAHL der FRAGEN / 1.2 NUMBER of QUESTIONS 71 | 72 | const intQuestions = 6; 73 | 74 | 75 | // -------------------------------------------------------------------- 76 | 77 | /* 78 | 1.3. PARTEIEN, PARTEI-INFORMATIONEN und ANTWORTEN 79 | 80 | Die Datei hat folgenden Aufbau: 81 | 0;Parteiname kurz (z.B. APPD) 82 | 0;Parteiname lang (z.B. Appelpartei Deutschlands) 83 | 0;Beschreibung (optional, z.B. Die Apfelpartei steht seit vielen Jahren für alle Angelegenheiten des Apfels.) 84 | 0;Webseite (z.B. https://www.appelpartei.ap) 85 | 0;Logo / Bilddatei (z.B. appel.png) 86 | Danach kommen die Antworten der Parteien, z.B. 87 | -1;Wir sind dagegen weil ... 88 | 0;Das ist uns egal 89 | 1;Wir sind dafür weil ... 90 | 0;Zum Schluss kommt noch ein Leerzeile ohne Funktion, nur für die Übersicht. Danach geht es mit der nächsten Partei weiter. 91 | 92 | ******************************************************************** 93 | 94 | 1.3. PARTIES, PARTY-INFORMATION and ANSWERS 95 | */ 96 | 97 | const fileAnswers = "Obsthausen_Parteien.csv"; 98 | 99 | /* 100 | 1.5. BILDGROESSE des PARTEILOGOS (am Ende) 101 | DE: Die Breite und Höhe kann in Pixel und Prozent angegeben werden. 102 | 103 | ******************************************************************** 104 | 105 | 1.5. PICTURE SIZE OF PARTY-LOGO (at the end) 106 | EN: Width and height can be defined in pixels or percent. 107 | 108 | 109 | Beispiele / Examples: 110 | const intPartyLogosImgWidth = 50; 111 | const intPartyLogosImgHeight = 25; 112 | 113 | const intPartyLogosImgWidth = "10%"; 114 | const intPartyLogosImgHeight = "10%"; 115 | 116 | const intPartyLogosImgWidth = 50; 117 | const intPartyLogosImgHeight = ""; 118 | 119 | */ 120 | 121 | const intPartyLogosImgWidth = "10%"; 122 | const intPartyLogosImgHeight = "10%"; 123 | 124 | 125 | // -------------------------------------------------------------------- 126 | 127 | 128 | // 1.6. UeBERSCHRIFTEN UND TEXTE / 1.6. HEADLINES AND TEXTS: 129 | 130 | // 1.6.1 Soll am Anfang eine kurze Beschreibung angezeigt (1) werden oder sollen gleich die Fragen (0) starten? 131 | // Wenn die Fragen sofort starten, gibt es einen kurzen "Loading"-Hinweis. :( 132 | // Show a short description in the beginning (1) or start with the questions right (0) away? 133 | // If you choose for the questions right away, a short "loading" message will appear. :( 134 | 135 | const descriptionShowOnStart = 1; 136 | 137 | // 1.6.2. Hauptueberschrift / 1.6.1. Main headline 138 | 139 | const descriptionHeading1 = "Fruchtkorbwahlen"; 140 | 141 | 142 | // 1.6.3. Zweite Ueberschrift / 1.6.2. Second Headline 143 | 144 | const descriptionHeading2 = "Die Wahl zur neuen Regierung in Obsthausen"; 145 | 146 | 147 | // 1.6.4. Kurzer Text um was es bei der Wahl geht / 1.6.3. Short (descriptive) text on what's the election about 148 | 149 | const descriptionExplanation = "Am 30. Februar finden in Obsthausen Wahlen statt. Sie können sich hier alle Parteipositionen anschauen und miteinander vergleichen. Dies ist keine Wahlempfehlung, sondern ein Informationsangebot zu Wahlen!
Zur Auswahl stehen vier Parteien mit unterschiedlichen Meinungen zu kontroversen Themen der Obst- und Frucht-Landschaft."; 150 | 151 | 152 | // -------------------------------------------------------------------- 153 | 154 | /* 155 | 1.7. IMPRESSUM, KONTAKT: 1.7. LEGAL NOTICE, CONTACT: 156 | 157 | 1.7.A 158 | 159 | DE: Option A) Eigenes Impressum (empfohlen) -> Link anpassen und Option B ignorieren! 160 | Muster finden Sie z.B. auf: http://www.e-recht24.de/ oder http://www.datenschutz-generator.de/ 161 | 162 | empfohlener Hinweis bei einem eigenen Impressum: 163 | "Der XXXXX-o-Mat basiert auf dem www.Mat-O-Wahl.de von Mathias Steudtner und ist freie Software unter GPL 3 Lizenz." 164 | 165 | ******************************************************************** 166 | 167 | EN: Option A) Own legal notice (recommended) -> change link and ignore option B! 168 | 169 | 170 | */ 171 | 172 | const imprintLink = "system/imprint.html" 173 | 174 | 175 | // -------------------------------------------------------------------- 176 | 177 | /* 178 | 179 | DE: Option B) (Standard)-Mat-o-Wahl-Impressum. 180 | Wenn Sie keine (oder eigene) Angaben machen, so lassen Sie bitte die Variablen stehen. 181 | Loeschen Sie stattdessen einfach den Text, z.B. 182 | const imprintVATid = `` oder const imprintVATid = ""; 183 | 184 | ******************************************************************** 185 | 186 | EN: Option B) Use (default) legal notice of Mat-o-Wahl. 187 | If you prefer to leave these information blank, please do not delete these lines 188 | but only its content, e.g. 189 | const imprintVATid = `` or const imprintVATid = ""; 190 | 191 | */ 192 | 193 | // 1.7.B.1: Allgemeines. "Angaben gemäß § 5 TMG" / General information 194 | 195 | const imprintGeneral = `

Muster e. V.
196 | Musterstraße 111
197 | Gebäude 44
198 | 90210 Musterstadt

199 | 200 |

Vereinsregister: VR 12 3456
201 | Registergericht: Amtsgericht Musterstadt

202 | 203 |

Vertreten durch:
204 | Vorstand: Dr. Harry Mustermann
205 | Luise Beispiel

` 206 | 207 | 208 | // 1.7.B.2: Kontaktdaten / Contact details 209 | 210 | const imprintContact = `

Telefon: +49 (0) 123 44 55 66
211 | Telefax: +49 (0) 123 44 55 99
212 | E-Mail: mustermann@musterfirma.de
213 | Web: musterfirma.de

` 214 | 215 | 216 | // 1.7.B.3: (optional) Umsatzsteuer-ID / (optional) VAT-ID 217 | 218 | const imprintVATid = `

Umsatzsteuer-Identifikationsnummer gemäß § 27 a Umsatzsteuergesetz:
219 | DE 999 999 999

` 220 | 221 | 222 | // 1.7.B.4: 223 | // (optional) Verbraucher­streit­beilegung / Universal­schlichtungs­stelle 224 | // (optional) Online Dispute Resolution for consumers by European Commission 225 | 226 | const imprintDisputeResultion = `

Die Europäische Kommission stellt eine Plattform zur Online-Streitbeilegung (OS) bereit: (https://ec.europa.eu/consumers/odr).

227 |

Wir sind nicht bereit oder verpflichtet, an Streitbeilegungsverfahren vor einer Verbraucherschlichtungsstelle teilzunehmen.

` 228 | 229 | 230 | // 1.7.B.5 231 | // (optional) Redaktion: Person(en), die die Fragen ausgearbeitet hat 232 | // (optional) Editor: Person(s), who worked on the questions 233 | 234 | const imprintEditors = `

Max Mustermann, Martina Mustermann, Harry Hirsch

235 |

max@mustermann-politikfreund.de

`; 236 | 237 | 238 | // 1.7.B.6 239 | // (optional) Technik: Person(en), die das System aufgesetzt hat 240 | // (optional) Programming: Person(s), who set up the system 241 | 242 | const imprintProgramming = `

Max Mustermann, Hans Wurst

243 |

E-Mailadresse

`; 244 | 245 | 246 | // 1.7.B.7 247 | // (optional) Quellenangaben zu den Bildern 248 | // (optional) Sources of pictures 249 | 250 | const imprintPictures = `

Bilder mit freundlicher Genehmigung von / Pictures with permission from: 251 |
Max Mustermann, Foto Franz Frankfurt, Neutrale Partei 252 |
Äpfel: Von Glysiak - Eigenes Werk, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=8146365 253 |
Bananen: Von Steve Hopson, www.stevehopson.com, CC BY-SA 2.5, https://commons.wikimedia.org/w/index.php?curid=1541726 254 |
Zitronen: Von André Karwath aka Aka - Eigenes Werk, CC BY-SA 2.5, https://commons.wikimedia.org/w/index.php?curid=59992 `; 255 | 256 | 257 | // 1.7.B.8 258 | // (optional) Link zu einer Datenschutzerklaerung beginnend mit http(s):- erlaubt die anonyme Statistik 259 | // (optional) Link to a privacy policy starting with http(s):- allows the anonymous statistics 260 | 261 | const imprintPrivacyUrl = "https://www.hans-wurst-webdesign-obsthausen.com/datenschutz.html"; 262 | 263 | 264 | // -------------------------------------------------------------------- 265 | 266 | 267 | /////////////////////////////////////////////////////////////////////// 268 | 269 | // 2. ERWEITERTE EINSTELLUNGEN: / 2. ADVANCED SETTINGS 270 | 271 | // 2.1. Trennzeichen fuer die CSV-Dateien (Excel benutzt haeufig Semikolon, OpenOffice/LibreOffice ein Komma) 272 | // 2.1. Separator for CSV files (Excel uses often a semicolon, OpenOffice/LibreOffice a comma) 273 | 274 | const separator = ";"; 275 | 276 | 277 | /* 278 | 2.2. CSS-Designvorlage(n) 279 | 280 | Der Mat-o-Wahl nutzt das "Bootstrap"-Framework für mobile Ansichten. 281 | Alle Standard-Bootstrap-Einstellungen können aber überschrieben werden. 282 | Die Dateien finden sich im Ordner /STYLES. 283 | Beispiele für das DESIGN-Aray: 284 | 285 | ******************************************************************** 286 | 287 | const design = ["default.css","buttons-colors-on.css", "progressbar.css"]; 288 | const design = ["default.css","buttons-colors-off.css", "progressbar.css"]; 289 | const design = ["default.css","buttons-colors-on.css"]; 290 | const design = ["my-personal-styles.css"]; 291 | 292 | ******************************************************************** 293 | 294 | 2.2. CSS-Design(s) 295 | 296 | Mat-o-Wahl uses the "bootstrap" framework for responsive design. 297 | All default settings can be overwritten. 298 | You can find the files in the /STYLES folder. 299 | Please find some examples above. 300 | */ 301 | 302 | const design = ["default.css","buttons-colors-on.css", "progressbar.css"]; 303 | 304 | 305 | /* 306 | 2.3. Add-ons / Plug-Ins / Extras 307 | 308 | Man kann eigene und fremde Addons einbinden. 309 | Einige Beispiele liegen im Ordner /EXTRAS. 310 | Die Einstellungen finden sich üblicherweise innerhalb den dortigen Dateien. 311 | Beispiele für das ADDONS-Aray: 312 | 313 | ******************************************************************** 314 | 315 | const addons = ["extras/addon_results_textfilter_by_button.js"] 316 | const addons = ["extras/addon_results_textfilter_by_button.js", "extras/addon_check_iframe_resize_client.js", "extras/addon_limit_results.js", "extras/addon_favorite_party.js", "extras/addon_show_first_results.js"] 317 | const addons = [] 318 | const addons = ["my_folder/my_file.js"] 319 | 320 | ******************************************************************** 321 | 322 | 2.3. Add-ons / Plug-Ins / Extras 323 | 324 | You can include your own and external add-ons. 325 | Some examples are in the folder /EXTRAS. 326 | The settings are usually inside the corresponding files. 327 | Please find some examples above. 328 | 329 | */ 330 | 331 | const addons = [] 332 | 333 | 334 | // 2.4 Sprache / Language 335 | // see files in folder /i18n/ 336 | 337 | const language = "de"; 338 | 339 | 340 | /////////////////////////////////////////////////////////////////////// 341 | 342 | /* 343 | 3. PROFESSIONELLE EINSTELLUNGEN: 344 | 3. PROFESSIONAL SETTINGS 345 | 346 | DE: STATISTIK 347 | Anonyme Auswertung zulassen: true/1 oder false/0 348 | Die Einwilligung des Nutzers und eine Datenschutzerklaerung (s.o.) werden benoetigt! (*) 349 | Als Ergebnis erhaelt man die Liste mit der persoenlichen Auswahl in der Variablen "mowpersonal" (-1,0,1,99) 350 | und die Liste mit der Anzahl der Uebereinstimmungen mit den Parteien als "mowparties" (5,1,0,2) zurueck. 351 | Als Trennzeichen fuer die Werte dient wieder ein Komma. ;-) 352 | Das Skript und der Mat-O-Wahl sollten auf der gleichen Domain und Netzwerk-Protokoll liegen. (kein "cross origin" / CORS) 353 | 354 | ******************************************************************** 355 | 356 | EN: STATISTICS 357 | Allow anonymous analysis: true/1 or false/0 358 | Consent of the user and a privacy policy are needed! (*) 359 | As a result you'll get the list of personal choices in a variable "mowpersonal" (-1,0,1,99) 360 | and a list with the number of party-matches as "mowparties" (5,1,0,2). 361 | Separator for these variables is a comma gain. ;-) 362 | The script and Mat-O-Wahl must be on the same domain and network-protocoll. (no "cross origin" / CORS) 363 | */ 364 | 365 | const statsRecord = 0; 366 | const statsServer = "http://localhost/extras/statistics/vote_txt.php"; 367 | 368 | 369 | /* 370 | -> POST-Aufruf der gesendeten Ergebnisse / POST-Call of sent results: 371 | http://localhost/extras/statistics/vote_txt.php?mowpersonal=-1,0,1,99&mowparties=5,1,0,2 372 | 373 | (*) In der OUTPUT.JS etwa auf Zeile 60 kann man die Checkbox automatisch als 374 | "checked" / angeklickt definieren. Das entspricht dem Opt-In Verfahren. 375 | 376 | (*) In OUTPUT.JS at around line 60 you can define the checkbox as "checked". 377 | This would be an opt-in method. 378 | */ 379 | -------------------------------------------------------------------------------- /data/egal2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/msteudtn/Mat-O-Wahl/a0322f949e5a13082813e5410dae520931e31a4d/data/egal2.jpg -------------------------------------------------------------------------------- /data/tbc2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/msteudtn/Mat-O-Wahl/a0322f949e5a13082813e5410dae520931e31a4d/data/tbc2.jpg -------------------------------------------------------------------------------- /docker-compose-dev.yml: -------------------------------------------------------------------------------- 1 | services: 2 | mat-o-wahl: 3 | container_name: mat-o-wahl 4 | build: . 5 | restart: always 6 | ports: 7 | - "80:80" 8 | volumes: 9 | - ./data:/var/www/html/data 10 | - ./extras:/var/www/html/extras -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | mat-o-wahl: 3 | container_name: mat-o-wahl 4 | image: ghcr.io/msteudtn/mat-o-wahl:latest # you can also use the dockerhub image msteudtn/mat-o-wahl:latest 5 | restart: always 6 | ports: 7 | - "80:80" 8 | volumes: 9 | - ./data:/var/www/html/data 10 | - ./extras:/var/www/html/extras -------------------------------------------------------------------------------- /extras/addon_check_iframe_resize_client.js: -------------------------------------------------------------------------------- 1 | /* 2 | // EINSTELLUNGEN / SETTINGS 3 | // http://www.mat-o-wahl.de 4 | 5 | /* EINSATZZWECK / USE CASE 6 | 7 | * WENN der Mat-o-Wahl als 27 | 28 | 31 | 32 | /////////////////////////////////////////////////////////////////////// 33 | 34 | 35 | // Hier kommt nur noch Quellcode. Bitte gehen Sie weiter. Hier gibt es nichts zu sehen. 36 | // That's just source code. Please move on. Nothing to see here. 37 | 38 | 39 | /////////////////////////////////////////////////////////////////////// 40 | 41 | */ 42 | 43 | 44 | lastScrollHeight = 0; 45 | 46 | // Aktiviere den Eventlistener und warte auf postMessage-Nachrichten 47 | function fnMatoWahlIframeEventListener(iFrameID) { 48 | 49 | window.addEventListener('message', function(ereignis) { 50 | 51 | var meinIframe = document.getElementById(iFrameID); 52 | 53 | // Auslesen der Ereigenisse aus dem "postMessage"-Array[] 54 | // z.B. ["setHeight", 123] 55 | var eventName = ereignis.data[0]; 56 | var data = ereignis.data[1]; 57 | 58 | switch(eventName) { 59 | case 'setHeight': 60 | 61 | // wenn sich die Höhe geändert hat 62 | if (lastScrollHeight !== data) { 63 | 64 | // neue Höhe des