diff --git a/generator/static/images/badges/Kralovec-dark.png b/generator/static/images/badges/Kralovec-dark.png index 1cf3e007fa445c3d0fa93eab6190d96645966061..5b841e8103b7829c5cb0c2d468cf06402bbfc2dc 100644 Binary files a/generator/static/images/badges/Kralovec-dark.png and b/generator/static/images/badges/Kralovec-dark.png differ diff --git a/generator/static/images/badges/Kralovec-light.png b/generator/static/images/badges/Kralovec-light.png index 1cf3e007fa445c3d0fa93eab6190d96645966061..221dfc28efe1ff2028ff9b8b91a96bb963484ad6 100644 Binary files a/generator/static/images/badges/Kralovec-light.png and b/generator/static/images/badges/Kralovec-light.png differ diff --git a/generator/static/images/badges/Kralovec_erb.png b/generator/static/images/badges/Kralovec_erb.png new file mode 100644 index 0000000000000000000000000000000000000000..dadbeef4e5da7bbd0be2247f246c746cd77cf613 Binary files /dev/null and b/generator/static/images/badges/Kralovec_erb.png differ diff --git a/generator/templates/avatar_public.html b/generator/templates/avatar_public.html index 3196578926ffc7874ab9cb4f105d55d29a9681f5..2aac2b33711300041f1cc31709b2de7e5b333d6a 100644 --- a/generator/templates/avatar_public.html +++ b/generator/templates/avatar_public.html @@ -18,6 +18,10 @@ type="text/javascript" src="{{ url_for('static', filename='js/avatar/external_ui.js') }}" ></script> + <script + type="text/javascript" + src="{{ url_for('static', filename='js/utils.js') }}" + ></script> <link rel="stylesheet" @@ -55,7 +59,7 @@ </span> {% else %} <img - src="{{ url_for('static', filename='images/badges/Kralovec-light.png') }}" + src="{{ url_for('static', filename='images/badges/Kralovec_erb.png') }}" alt="Erb s Královcem" width="80" > @@ -74,7 +78,7 @@ Tady si nahrajete fotografii (třeba teď vyfocenou nebo tu, kterou už nastavenou máte), automaticky na ní nalepíme naše logo a můžete si ji zase stáhnout. Není to tak lehké jako to původně na Facebooku bylo, ale i tak to chce jen pár kliknutí.<br> <b>Směle do toho! Volíme Piráty!</b> {% else %} - Jak už jistě víš, Královec je a vždy byl součástí České Republiky. Ne všichni ale souhlasí, nebo o něm dokonce ani neví - je tedy nutné ho propagovat. Tady si můžeš na profilový obrázek nasadit nový český erb, jehož je součástí. + Jak už jistě víš, Královec je a vždy byl součástí České Republiky. Ne všichni ale souhlasí, nebo o něm dokonce ani neví - je tedy nutné ho propagovat. <b>Tady si můžeš na profilový obrázek nasadit nový český erb, jehož je Královec součástí!</b> {% endif %} </p> @@ -160,6 +164,10 @@ ) }}"; template.iconHeightMultiplier = {{ icon_height_multiplier }}; template.iconOffsetBottomMultiplier = {{ icon_offset_bottom_multiplier }}; + + {% if icon_localization == "kralovec" %} + template.hasGradient = true; + {% endif %} {% elif base_localization is not none %} template.setLocalizationSource("{{ url_for( 'static', diff --git a/generator/templates/spolu.html b/generator/templates/spolu.html deleted file mode 100644 index 84190e91ab7afc76115877dfbf446f6d924724c2..0000000000000000000000000000000000000000 --- a/generator/templates/spolu.html +++ /dev/null @@ -1,68 +0,0 @@ -<!DOCTYPE html> -<html lang="cs"> - <head> - <title>Generátor SPOLU kampaně</title> - - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - - <script - type="text/javascript" - src="{{ url_for('static', filename='js/jquery.js') }}" - ></script> - <script - type="text/javascript" - src="{{ url_for('static', filename='js/spolu/template.js') }}" - ></script> - <script - type="text/javascript" - src="{{ url_for('static', filename='js/spolu/ui.js') }}" - ></script> - - <link - rel="stylesheet" - href="{{ url_for('static', filename='fonts/montserrat/style.css') }}" - > - - <link - rel="stylesheet" - href="{{ url_for('static', filename='css/spolu.css') }}" - > - - <link - rel="icon" - href="{{ url_for('static', filename='images/badges/default-light.png') }}" - type="image/png" - > - </head> - <body> - <header> - </header> - <main> - <canvas - id="spolu-canvas" - width="2000" - height="2000" - ></canvas> - </main> - - <footer> - <small> - <span> - Generátor s ♥ vytvořil <a - href="https://toho.neocities.org" - target="_blank" - rel="noopener noreferrer nofollow" - >Tomáš Valenta</a> - </span> - <span> - pod svobodnou licencí <a - href="https://www.gnu.org/licenses/agpl-3.0.en.html" - target="_blank" - rel="noopener noreferrer nofollow" - >AGPLv3</a>. - </span> - </small> - </footer> - </body> -</html> diff --git a/generator/views/generator.py b/generator/views/generator.py index 2dadc3134df373d21701718500b4ff719eb84186..01b9d724e2c263299cd2e05eba62e6921e83012f 100644 --- a/generator/views/generator.py +++ b/generator/views/generator.py @@ -378,6 +378,8 @@ def view_avatar_generator_with_localization( ), http.client.OK -@generator_blueprint.route("/spolu") -def view_spolu_version() -> typing.Tuple[flask.Response, int]: - return flask.render_template("spolu.html"), http.client.OK +@generator_blueprint.route("/kralovec") +def view_kralovec() -> typing.Tuple[flask.Response, int]: + return view_avatar_generator_with_localization( + icon_localization="kralovec" + )