#87 - Utiliser la police Luciole (#89)

Reviewed-on: #89
Co-authored-by: dbroqua <contact@darkou.fr>
Co-committed-by: dbroqua <contact@darkou.fr>
This commit is contained in:
Damien Broqua 2023-07-27 14:52:30 +02:00 committed by Damien Broqua
parent 1df39410c3
commit bfdb19eec1
9 changed files with 2 additions and 109 deletions

View file

@ -66,33 +66,6 @@ function setCookie(cname, cvalue, exdays = 30) {
document.cookie = `${cname}=${cvalue};${expires};path=/`;
}
/**
* Fonction de ()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 ()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"]'
);

View file

@ -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

View file

@ -24,9 +24,6 @@
}
}
label {
font-weight: 800;
}
input,
textarea,
select {

View file

@ -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;

View file

@ -42,7 +42,6 @@
}
.title {
font-weight: 800;
font-size: 1.4rem;
}

View file

@ -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() {}

View file

@ -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>

View file

@ -497,9 +497,6 @@
&lt;/div&gt;
&lt;div class="navbar-item"&gt;
&lt;div class="buttons"&gt;
&lt;button type="button" class="button is-primary" id="switchAriaTheme" aria-label="Renforcer la visibilité de ce site" title="Renforcer la visibilité de ce site"&gt;
&lt;i class="icon-eye"&gt;&lt;/i&gt;
&lt;/button&gt;
&lt;a class="button is-danger" href="/se-deconnecter"&gt;
Déconnexion
&lt;/a&gt;