Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LQDN Adminsys
generateur-slogans
Commits
0772efd5
Verified
Commit
0772efd5
authored
Sep 26, 2017
by
Thibaut Broggi
Browse files
Change color of selected tab and fix js
parent
9c22a6a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
canvas.js
View file @
0772efd5
...
...
@@ -69,11 +69,19 @@ let draw = function() {
}
let
bgColorElems
=
document
.
querySelectorAll
(
'
.colorpicker input[type="radio"], #step3 input[type="radio"]
'
);
let
i
;
for
(
i
in
bgColorElems
)
{
for
(
let
i
=
0
;
i
<
bgColorElems
.
length
;
++
i
)
{
bgColorElems
[
i
].
onchange
=
draw
;
}
document
.
getElementById
(
'
step2value
'
).
oninput
=
draw
;
document
.
getElementById
(
'
signature
'
).
oninput
=
draw
;
window
.
onload
=
draw
;
let
navElems
=
document
.
querySelectorAll
(
'
nav > a
'
);
for
(
let
i
=
0
;
i
<
navElems
.
length
;
++
i
)
{
navElems
[
i
].
onclick
=
function
(
e
)
{
for
(
let
j
=
0
;
j
<
navElems
.
length
;
++
j
)
{
navElems
[
j
].
classList
.
remove
(
'
active-tab
'
);
}
e
.
target
.
classList
.
add
(
'
active-tab
'
);
}
}
style.css
View file @
0772efd5
...
...
@@ -30,6 +30,10 @@ nav > * {
border-bottom
:
1px
solid
#3b68b0
;
}
nav
>
.active-tab
{
background-color
:
#3b68b0
;
}
a
{
text-decoration
:
none
;
color
:
white
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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