From 4f100fdce0ec8f088c68405d4cfae2221366eb83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozman?= <tomas.hozman@pm.me> Date: Wed, 7 Sep 2022 21:09:44 +0200 Subject: [PATCH] working further on template --- generator/static/js/ui.js | 28 ++++++++++++++++++++++++++++ generator/templates/generator.html | 13 +++++++++++++ 2 files changed, 41 insertions(+) diff --git a/generator/static/js/ui.js b/generator/static/js/ui.js index 7505751f..df8e92c4 100644 --- a/generator/static/js/ui.js +++ b/generator/static/js/ui.js @@ -2693,6 +2693,34 @@ async function setCoalition(coalition, template) { reloadColorPalette(); + break; + case "zeleni-melnik-green-dark": + template.setPrimaryColorScheme("zeleni-melnik-black-on-white", true); + + setGlobalSpecifics("zeleni-melnik"); + + reloadColorPalette(); + + break; + case "zeleni-melnik-green-light": + template.setPrimaryColorScheme("zeleni-melnik-white-on-green", true); + + setGlobalSpecifics("zeleni-melnik"); + + reloadColorPalette(); + + break; + case "zeleni-melnik-dark": + template.setPrimaryColorScheme("black-on-white", true); + + if (template.nameColorSchemes !== undefined) { + template.setNameColorScheme("white-on-black", true); + } + + setGlobalSpecifics("zeleni-melnik"); + + reloadColorPalette(); + break; case "zeleni-bystrc-green-dark": template.setPrimaryColorScheme("zeleni-volary-bystrc-most-black-on-white", true); diff --git a/generator/templates/generator.html b/generator/templates/generator.html index 5832f55f..5b8ac539 100644 --- a/generator/templates/generator.html +++ b/generator/templates/generator.html @@ -1983,6 +1983,19 @@ value="zeleni-most-dark" >Piráti a Zelení pro Most - původní barvy</option> + <option + data-image-source="{{ url_for('static', filename='images/examples/zeleni_melnik_green_dark.png') }}" + value="zeleni-melnik-green-dark" + >Piráti a Zelení Mělník - zelené barvy, tmavé pozadí</option> + <option + data-image-source="{{ url_for('static', filename='images/examples/zeleni_melnik_green_light.png') }}" + value="zeleni-melnik-green-light" + >Piráti a Zelení Mělník - zelené barvy, světlé pozadí</option> + <option + data-image-source="{{ url_for('static', filename='images/examples/zeleni_melnik.png') }}" + value="zeleni-melnik-dark" + >Piráti a Zelení Mělník - původní barvy</option> + <option data-image-source="{{ url_for('static', filename='images/examples/zeleni_bystrc_green_dark.png') }}" value="zeleni-bystrc-green-dark" -- GitLab