Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
generateur-slogans
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LQDN Adminsys
generateur-slogans
Commits
81d459b0
Verified
Commit
81d459b0
authored
Nov 13, 2017
by
Thibaut Broggi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add secret icon while cliking on "website source code"
parent
d911382a
Pipeline
#1576
passed with stage
in 43 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
static/canvas.js
static/canvas.js
+3
-3
views/index.pug
views/index.pug
+4
-2
No files found.
static/canvas.js
View file @
81d459b0
...
@@ -60,7 +60,7 @@ let draw = function() {
...
@@ -60,7 +60,7 @@ let draw = function() {
let
fgColor
=
document
.
querySelector
(
'
.colorpicker input[type="radio"][name="fgColor"]:checked
'
).
value
;
let
fgColor
=
document
.
querySelector
(
'
.colorpicker input[type="radio"][name="fgColor"]:checked
'
).
value
;
let
fillText
=
document
.
getElementById
(
'
step2value
'
).
value
.
trim
();
let
fillText
=
document
.
getElementById
(
'
step2value
'
).
value
.
trim
();
let
font
=
document
.
querySelector
(
'
#step3 input[type="radio"]:checked
'
).
value
;
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
();
let
signature
=
document
.
getElementById
(
'
signature
'
).
value
.
trim
();
// Clear canvas
// Clear canvas
...
@@ -167,7 +167,7 @@ window.addEventListener('load', function() {
...
@@ -167,7 +167,7 @@ window.addEventListener('load', function() {
document
.
getElementById
(
'
signature
'
).
value
=
params
[
'
signature
'
];
document
.
getElementById
(
'
signature
'
).
value
=
params
[
'
signature
'
];
// Add event listeners to inputs
// 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
)
{
for
(
let
i
=
0
;
i
<
inputs
.
length
;
++
i
)
{
inputs
[
i
].
onchange
=
draw
;
inputs
[
i
].
onchange
=
draw
;
}
}
...
@@ -200,7 +200,7 @@ for (let i = 0; i < randomButtons.length; ++i) {
...
@@ -200,7 +200,7 @@ for (let i = 0; i < randomButtons.length; ++i) {
}
while
(
document
.
querySelector
(
'
.colorpicker input[type="radio"][name="bgColor"]:checked
'
).
value
}
while
(
document
.
querySelector
(
'
.colorpicker input[type="radio"][name="bgColor"]:checked
'
).
value
==
document
.
querySelector
(
'
.colorpicker input[type="radio"][name="fgColor"]:checked
'
).
value
);
==
document
.
querySelector
(
'
.colorpicker input[type="radio"][name="fgColor"]:checked
'
).
value
);
randomElement
(
'
input[name="font"]
'
).
checked
=
true
;
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
)]);
document
.
getElementById
(
'
step2value
'
).
value
=
document
.
getElementById
(
'
step2value
'
).
innerText
=
_
(
sampleTexts
[
Math
.
trunc
(
Math
.
random
()
*
sampleTexts
.
length
)]);
if
(
document
.
getElementById
(
'
signature
'
).
value
.
match
(
/
(\t
$|^$
)
/
))
if
(
document
.
getElementById
(
'
signature
'
).
value
.
match
(
/
(\t
$|^$
)
/
))
document
.
getElementById
(
'
signature
'
).
value
=
_
(
sampleSignatures
[
Math
.
trunc
(
Math
.
random
()
*
sampleSignatures
.
length
)]);
document
.
getElementById
(
'
signature
'
).
value
=
_
(
sampleSignatures
[
Math
.
trunc
(
Math
.
random
()
*
sampleSignatures
.
length
)]);
...
...
views/index.pug
View file @
81d459b0
...
@@ -147,8 +147,10 @@ html(lang=locale)
...
@@ -147,8 +147,10 @@ html(lang=locale)
a(href="https://www.velvetyne.fr/") Velvetyne Type Foundry
a(href="https://www.velvetyne.fr/") 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."
= ". 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
p
strong= _('Code source du site :')
label(for="radio-icon-hidden")
strong= _('Code source du site :')
br
br
a(href="https://git.laquadrature.net/lqdn-interne/generateur-slogans/")
a(href="https://git.laquadrature.net/lqdn-interne/generateur-slogans/")
| https://git.laquadrature.net
| https://git.laquadrature.net
script(src="./canvas.js")
input(type="radio" id="radio-icon-hidden" name="icon" value="37" checked=(params.icon == 37) style="display: none")
\ No newline at end of file
script(src="./canvas.js")
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment