Add secret icon while cliking on "website source code"

parent d911382a
Pipeline #1576 passed with stage
in 43 seconds
......@@ -60,7 +60,7 @@ let draw = function() {
let fgColor = document.querySelector('.colorpicker input[type="radio"][name="fgColor"]:checked').value;
let fillText = document.getElementById('step2value').value.trim();
let font = document.querySelector('#step3 input[type="radio"]:checked').value;
let icon = document.querySelector('#step4 input[type="radio"]:checked').value;
let icon = document.querySelector('input[name="icon"]:checked').value;
let signature = document.getElementById('signature').value.trim();
// Clear canvas
......@@ -167,7 +167,7 @@ window.addEventListener('load', function() {
document.getElementById('signature').value = params['signature'];
// Add event listeners to inputs
let inputs = document.querySelectorAll('.colorpicker input[type="radio"], #step3 input[type="radio"], #step4 input[type="radio"]');
let inputs = document.querySelectorAll('.colorpicker input[type="radio"], #step3 input[type="radio"], input[type="radio"][name="icon"]');
for (let i = 0; i < inputs.length; ++i) {
inputs[i].onchange = draw;
}
......@@ -200,7 +200,7 @@ for (let i = 0; i < randomButtons.length; ++i) {
} while (document.querySelector('.colorpicker input[type="radio"][name="bgColor"]:checked').value
== document.querySelector('.colorpicker input[type="radio"][name="fgColor"]:checked').value);
randomElement('input[name="font"]').checked = true;
randomElement('input[name="icon"]').checked = true;
randomElement('#step4 input[name="icon"]').checked = true;
document.getElementById('step2value').value = document.getElementById('step2value').innerText = _(sampleTexts[Math.trunc(Math.random() * sampleTexts.length)]);
if (document.getElementById('signature').value.match(/(\t$|^$)/))
document.getElementById('signature').value = _(sampleSignatures[Math.trunc(Math.random() * sampleSignatures.length)]);
......
......@@ -147,8 +147,10 @@ html(lang=locale)
a(href="https://www.velvetyne.fr/") &nbsp;Velvetyne Type Foundry
= ". Bluu " + _('par') + " Jean Baptiste Morizot, Bilbo Inc " + _('par') + " Hélène Marian Srodogora, Combat " + _('par') + " Martin Desinde, Gulax " + _('par') + " Morgan Gilbert, Lineal " + _('par') + " Frank Adebiaye, Resistance " + _('par') + " Collective, Savate " + _('par') + " Wech, Solide Mirage " + _('par') + " Jérémy Landes-Nones, Steps mono " + _('par') + " Jean Baptiste Morizot, Terminal " + _('par') + " Rapaël Bastide " + _('et') + " Jérémy Landes-Nones."
p
strong= _('Code source du site :')
label(for="radio-icon-hidden")
strong= _('Code source du site :')
br
a(href="https://git.laquadrature.net/lqdn-interne/generateur-slogans/")
| https://git.laquadrature.net
script(src="./canvas.js")
\ No newline at end of file
input(type="radio" id="radio-icon-hidden" name="icon" value="37" checked=(params.icon == 37) style="display: none")
script(src="./canvas.js")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment