complete modulation of html

This commit is contained in:
Hugo LAMY
2026-03-17 18:16:21 +01:00
parent 704483f6e6
commit d728897805
27 changed files with 2990 additions and 1686 deletions
+86
View File
@@ -0,0 +1,86 @@
<style>
input#language {
display: none;
}
label#language_label {
position: fixed;
top: 20px;
right: 20px;
padding: 10px;
cursor: pointer;
z-index: 1;
.flag {
width: 20px;
}
}
/*
* SWITCH FLAG
*/
#language {
&:not(:checked) + #language_label {
#fr {
display: inline;
}
#en {
display: none;
}
}
&:checked + #language_label {
#fr {
display: none;
}
#en {
display: inline;
}
}
}
/*
* SWITCH LANGUAGE
*/
#language {
~ * .fr,
~ * .en {
display: none;
}
&:not(:checked) ~ * .en {
display: inline;
}
&:checked ~ * .fr {
display: inline;
}
}
</style>
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* * * * * * * * * * * * * *
* * * * * * * * * *
* * * * * * * * * *
* * * * * * * * *
* * * * * * * * * * * * *
* * * * * * * *
* * * * * * * *
* * * * * * * *
* * * * * * * * * * * * * *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
<input type="checkbox" id="language" />
<label id="language_label" for="language">
<span id="fr"
><img class="flag" src="./docs/flags/fr_bnw.svg" alt="french flag"
/></span>
<span id="en"
><img class="flag" src="./docs/flags/gb_bnw.svg" alt="english flag"
/></span>
</label>