Fix logo glitch + erreur corriger dans la remise initiale (probablement un erreur de branche)
This commit is contained in:
@@ -6,49 +6,45 @@
|
|||||||
|
|
||||||
// https://www.w3schools.com/js/js_timing.asp
|
// https://www.w3schools.com/js/js_timing.asp
|
||||||
// https://stackoverflow.com/questions/62039703/blur-an-image-with-javascript
|
// https://stackoverflow.com/questions/62039703/blur-an-image-with-javascript
|
||||||
function timerBlur(){
|
function timerBlur() {
|
||||||
var count = 3;
|
var count = 3;
|
||||||
var timer2 = setInterval(function(){
|
var timer2 = setInterval(function () {
|
||||||
|
|
||||||
if (count == 3) {
|
if (count == 3) {
|
||||||
document.getElementById('logoAccueil').style.filter = "blur(3px)";
|
document.getElementById('logoAccueil').style.filter = "blur(3px)";
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (count == 2)
|
else if (count == 2) {
|
||||||
{
|
document.getElementById('logoAccueil').style.filter = "blur(2px)";
|
||||||
document.getElementById('logoAccueil').style.filter = "blur(2px)";
|
}
|
||||||
}
|
else if (count == 1) {
|
||||||
else if (count == 1)
|
document.getElementById('logoAccueil').style.filter = "blur(1px)";
|
||||||
{
|
}
|
||||||
document.getElementById('logoAccueil').style.filter = "blur(1px)";
|
else if (count == 0) {
|
||||||
}
|
document.getElementById('logoAccueil').style.filter = "";
|
||||||
else if (count == 0)
|
clearInterval(timer2);
|
||||||
{
|
}
|
||||||
document.getElementById('logoAccueil').style.filter = "";
|
count--;
|
||||||
clearInterval(timer2);
|
}, 350);
|
||||||
}
|
|
||||||
count--;
|
|
||||||
}, 350);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function timerGlitch(){
|
function timerGlitch() {
|
||||||
var timer = setInterval(function(){
|
var timer = setInterval(function () {
|
||||||
curSrc = document.getElementById('logoAccueil').getAttribute('src');
|
curSrc = document.getElementById('logoAccueil').getAttribute('src');
|
||||||
if (curSrc == 'images/LogoALT-F4_Nav.svg') {
|
if (curSrc == 'images/logoALT-F4_Nav.svg') {
|
||||||
timerBlur();
|
timerBlur();
|
||||||
document.getElementById('logoAccueil').setAttribute('src', 'images/LogoAlt-F4_NavGlitch.svg')
|
document.getElementById('logoAccueil').setAttribute('src', 'images/LogoAlt-F4_NavGlitch.svg')
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
document.getElementById('logoAccueil').setAttribute('src', 'images/LogoALT-F4_Nav.svg')
|
||||||
document.getElementById('logoAccueil').setAttribute('src', 'images/LogoALT-F4_Nav.svg')
|
}
|
||||||
}
|
}, 2500);
|
||||||
}, 2500);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
window.onload = function () {
|
window.onload = function () {
|
||||||
timerGlitch();
|
timerGlitch();
|
||||||
// NOTE: Change Current Page based on url in <NAV>
|
// NOTE: Change Current Page based on url in <NAV>
|
||||||
// NOTE Track mouse mouvement and show after a percentage of ?
|
// NOTE Track mouse mouvement and show after a percentage of ?
|
||||||
// NOTE une page sur deux, ...
|
// NOTE une page sur deux, ...
|
||||||
};
|
};
|
||||||
@@ -19,8 +19,7 @@
|
|||||||
|
|
||||||
<body class="lore">
|
<body class="lore">
|
||||||
<nav>
|
<nav>
|
||||||
<a href="index.html" class="boutonAccueil"><img src="images/logoALT-F4_Nav.svg" alt="ALT-F4" id="logoAccueil"
|
<a href="index.html" class="boutonAccueil"><img src="images/logoALT-F4_Nav.svg" alt="ALT-F4" id="logoAccueil"></a>
|
||||||
</a>
|
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="aPropos.html">À propos</a></li>
|
<li><a href="aPropos.html">À propos</a></li>
|
||||||
|
|||||||
Reference in New Issue
Block a user