Reviewed-on: #89 Co-authored-by: dbroqua <contact@darkou.fr> Co-committed-by: dbroqua <contact@darkou.fr>
This commit is contained in:
parent
1df39410c3
commit
bfdb19eec1
9 changed files with 2 additions and 109 deletions
|
@ -66,33 +66,6 @@ function setCookie(cname, cvalue, exdays = 30) {
|
|||
document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fonction de (dé)charger le thème accessible
|
||||
* @param {String} value
|
||||
*/
|
||||
function setAriaTheme(value) {
|
||||
const { body } = document;
|
||||
if (value === "true") {
|
||||
const classesString = body.className || "";
|
||||
if (classesString.indexOf("is-accessible") === -1) {
|
||||
body.classList.add("is-accessible");
|
||||
}
|
||||
} else {
|
||||
body.classList.remove("is-accessible");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fonction de (dé)charger le thème accessible
|
||||
*/
|
||||
function switchAriaTheme() {
|
||||
const { body } = document;
|
||||
|
||||
body.classList.toggle("is-accessible");
|
||||
|
||||
setCookie("ariatheme", body.classList.contains("is-accessible"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Fonction permettant de switcher de thème clair/sombre
|
||||
* @param {Object} e
|
||||
|
@ -124,12 +97,6 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||
});
|
||||
}
|
||||
|
||||
const switchAriaThemeBtn = document.querySelector("#switchAriaTheme");
|
||||
if (switchAriaThemeBtn) {
|
||||
switchAriaThemeBtn.addEventListener("click", switchAriaTheme);
|
||||
}
|
||||
setAriaTheme(getCookie("ariatheme"));
|
||||
|
||||
const toggleSwitch = document.querySelector(
|
||||
'.theme-switch input[type="checkbox"]'
|
||||
);
|
||||
|
|
|
@ -8,10 +8,6 @@
|
|||
width: calc(100% - 6rem);
|
||||
margin: 2rem auto;
|
||||
|
||||
.header {
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
&.info {
|
||||
background-color: $warning-color;
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -24,9 +24,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
label {
|
||||
font-weight: 800;
|
||||
}
|
||||
input,
|
||||
textarea,
|
||||
select {
|
||||
|
|
|
@ -7,19 +7,10 @@ html {
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-top: 3.5rem;
|
||||
font-family: 'open_sansregular';
|
||||
font-weight: 400;
|
||||
font-family: 'lucioleregular';
|
||||
min-height: 100vh;
|
||||
color: var(--font-color);
|
||||
@include transition() {}
|
||||
|
||||
&.is-accessible {
|
||||
font-family: 'lucioleregular';
|
||||
|
||||
.text-justify {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
@include transition();
|
||||
|
||||
footer.footer {
|
||||
margin-top: auto;
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
}
|
||||
|
||||
.title {
|
||||
font-weight: 800;
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
word-break: break-word;
|
||||
color: var(--font-color);
|
||||
font-size: 2rem;
|
||||
font-weight: 600;
|
||||
line-height: 1.125;
|
||||
margin-left: .5rem !important;
|
||||
@include transition() {}
|
||||
|
|
|
@ -105,9 +105,6 @@
|
|||
</div>
|
||||
<div class="navbar-item">
|
||||
<div class="buttons">
|
||||
<button type="button" class="button is-primary" id="switchAriaTheme" aria-label="Renforcer la visibilité de ce site" title="Renforcer la visibilité de ce site">
|
||||
<i class="icon-eye"></i>
|
||||
</button>
|
||||
<% if ( !user ) { %>
|
||||
<a class="button is-primary" href="/connexion">
|
||||
<strong>Connexion</strong>
|
||||
|
|
|
@ -497,9 +497,6 @@
|
|||
</div>
|
||||
<div class="navbar-item">
|
||||
<div class="buttons">
|
||||
<button type="button" class="button is-primary" id="switchAriaTheme" aria-label="Renforcer la visibilité de ce site" title="Renforcer la visibilité de ce site">
|
||||
<i class="icon-eye"></i>
|
||||
</button>
|
||||
<a class="button is-danger" href="/se-deconnecter">
|
||||
Déconnexion
|
||||
</a>
|
||||
|
|
Loading…
Reference in a new issue