Skip to content
Snippets Groups Projects
Select Git revision
  • 3bce17c91533d897fa289cbe7c21ca75c5917d4e
  • test default protected
  • master protected
  • feat/custom-css
  • feat/redesign-improvements-10
  • feat/redesign-improvements-8
  • feat/redesign-fixes-3
  • feat/pirstan-changes
  • feat/separate-import-thread
  • feat/dary-improvements
  • features/add-pdf-page
  • features/add-typed-table
  • features/fix-broken-calendar-categories
  • features/add-embed-to-articles
  • features/create-mastodon-feed-block
  • features/add-custom-numbering-for-candidates
  • features/add-timeline
  • features/create-wordcloud-from-article-page
  • features/create-collapsible-extra-legal-info
  • features/extend-hero-banner
  • features/add-link-to-images
21 results

blocks.py

Blame
  • avatar_public.html 5.34 KiB
    <!DOCTYPE html>
    <html lang="cs">
    	<head>
    		<title>Generátor profilových obrázků{% if icon_localization == "kralovec" %} - Královec{% endif %}</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/avatar/template.js') }}"
    		></script>
    		<script
    			type="text/javascript"
    			src="{{ url_for('static', filename='js/avatar/external_ui.js') }}"
    		></script>
    		
    		<link
    			rel="stylesheet"
    			href="{{ url_for('static', filename='fonts/open-sans/style.css') }}"
    		>
    		<link
    			rel="stylesheet"
    			href="{{ url_for('static', filename='fonts/bebas-neue/style.css') }}"
    		>
    		<link
    			rel="stylesheet"
    			href="{{ url_for('static', filename='css/avatar_public.css') }}"
    		>
    		
    		<link
    			rel="icon"
    			href="{{ url_for('static', filename='images/badges/default-light.png') }}"
    			type="image/png"
    		>
    	</head>
    	<body>
    		<header>
    			<h1>
    				{% if icon_localization != "kralovec" %}
    					<img
    						src="{{ url_for('static', filename='images/badges/default-light.png') }}"
    						alt="Pirátské logo"
    						height="80"
    						width="80"
    					>
    					
    					<span>
    						<span style="display:inline-block">Generátor</span>
    						<span style="display:inline-block">profilových obrázků</span>
    					</span>
    				{% else %}
    					<img
    						src="{{ url_for('static', filename='images/badges/Kralovec-light.png') }}"
    						alt="Erb s Královcem"
    						width="80"
    					>
    					
    					<span>
    						<span style="display:inline-block">Generátor</span>
    						<span style="display:inline-block">Královeckých avatarů</span>
    					</span>
    				{% endif %}
    			</h1>
    		</header>
    		<main>
    			<p id="description">
    				{% if icon_localization != "kralovec" %}
    					Jak asi víte, Facebook kvůli řádění antivaxerů a šíření hoaxů skrz profilové rámečky, které šly snadno vytvořit, nandat, sdílet a rozšiřovat, tuto funkci zrušil. Nám ale přišla vyloženě tuna dopisů, že byste chtěli snadno vyjádřit svou touhu dát si naše logo na svou profilovku, aniž byste museli umět s grafickými programy. No, a když jste to chtěli, tak my jsme to udělali!<br>
    					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í.
    				{% endif %}
    			</p>
    			
    			<canvas
    				id="avatar-canvas"
    				width="2000"
    				height="2000"
    			></canvas>
    			
    			<div class="controls">
    				<button id="download">Stáhnout</button>
    				<button id="upload-image-button">Nahrát obrázek</button>
    				
    				<input
    					id="upload-image"
    					type="file"
    				>
    			</div>
    			
    			<div class="controls" id="image-controls">
    				<div>
    					Přiblížení: 
    					
    					<input
    						type="range"
    						min="25"
    						max="300"
    						value="100"
    						id="zoom-image-input"
    						autocomplete="off"
    					>
    					<button class="button-small" id="zoom-image-reset">Reset</button>
    				</div>
    				
    				<div>
    					<div id="position-controls-wrapper">
    						Pozice:
    						
    						<button class="button-small" id="move-image-left">←</button>
    						<button class="button-small" id="move-image-up">↑</button>
    						<button class="button-small" id="move-image-right">→</button>
    						<button class="button-small" id="move-image-down">↓</button>
    						<button class="button-small" id="move-image-reset">Reset</button>
    						
    						<br>
    						<small>(Lze měnit i tažením myši)</small>
    					</div>
    				</div>
    			</div>
    		</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>
    		
    		<script type="text/javascript">
    			async function init() {
    				template.setColorScheme("{% if dark %}white-on-black{% else %}black-on-white{% endif %}", true);
    				
    				{% if icon_localization is not none %}
    					template.darkIconDefaultSource = "{{ url_for(
    						'static',
    						filename='images/badges/' + icon_localization.capitalize() + '-dark.png'
    					) }}";
    					template.lightIconDefaultSource = "{{ url_for(
    						'static',
    						filename='images/badges/' + icon_localization.capitalize() + '-light.png'
    					) }}";
    					template.iconHeightMultiplier = {{ icon_height_multiplier }};
    					template.iconOffsetBottomMultiplier = {{ icon_offset_bottom_multiplier }};
    				{% elif base_localization is not none %}
    					template.setLocalizationSource("{{ url_for(
    						'static',
    						filename='images/locations/' + base_localization.capitalize() + '.png'
    					) }}", true);
    				{% endif %}
    				
    				await template.redrawCanvas();
    			}
    		</script>
    	</body>
    </html>