Hotfix: Réorganisation fichiers JS pour les Pages
This commit is contained in:
14
scripts/pagesJS/functions-list.js
Normal file
14
scripts/pagesJS/functions-list.js
Normal file
@ -0,0 +1,14 @@
|
||||
$(function () {
|
||||
/* Apparition au défilement avec animation */
|
||||
function setWindowScrollAppear() {
|
||||
var $animate = $('.animate-up, .animate-down, .animate-left, .animate-right');
|
||||
$animate.appear();
|
||||
$animate.on('appear', function (event, affected) {
|
||||
for (var i = 0; i < affected.length; i++) {
|
||||
$(affected[i]).addClass('animated');
|
||||
}
|
||||
});
|
||||
$.force_appear();
|
||||
}
|
||||
setWindowScrollAppear();
|
||||
});
|
14
scripts/pagesJS/home-page.js
Normal file
14
scripts/pagesJS/home-page.js
Normal file
@ -0,0 +1,14 @@
|
||||
$(function () {
|
||||
/* Changement du texte accueil (exemples de fonction) */
|
||||
let index=-1;
|
||||
function change() {
|
||||
if(index === texteFonctionChange.length-1) {
|
||||
index = 0;
|
||||
}
|
||||
else {
|
||||
index++;
|
||||
}
|
||||
document.getElementById("change").innerHTML = texteFonctionChange[index];
|
||||
}
|
||||
setInterval(change, 10000);
|
||||
});
|
9
scripts/pagesJS/quote-list.js
Normal file
9
scripts/pagesJS/quote-list.js
Normal file
@ -0,0 +1,9 @@
|
||||
$(function () {
|
||||
/* Permet d'afficher la liste des citations/proverbes */
|
||||
$('.totalLengthQuote').html('Total de ' + quotes.length + ' citations.');
|
||||
let resultat = "";
|
||||
for (index in quotes) {
|
||||
resultat = resultat + `<tr> <td class="quote-element-list important">${quotes[index]["source"]}</td> <td class="quote-element-list">${quotes[index]["quote"]}</td> </tr>`;
|
||||
}
|
||||
$(".quote-list").append(resultat);
|
||||
});
|
12
scripts/pagesJS/short_links-list.js
Normal file
12
scripts/pagesJS/short_links-list.js
Normal file
@ -0,0 +1,12 @@
|
||||
$(function () {
|
||||
/* Permet d'afficher la liste des liens récemment raccourcit */
|
||||
try {
|
||||
const shortcuts = JSON.parse(getCookieValue("shortcuts"));
|
||||
window.onload = $('.totalLengthLinksList').html(`Total de ${shortcuts.length} lien(s) raccourcit récemment.`);
|
||||
let resultat = "";
|
||||
for (element of shortcuts) {
|
||||
resultat += `<tr> <td class="original-link-list"><a href="${element["url"]}" target="_blank">${element["url"]}</a></td> <td class="link-list"><a href="${element["shortcut"]}" target="_blank">${element["shortcut"]}</a></td> </tr>`;
|
||||
}
|
||||
$(".links-list").append(resultat);
|
||||
} catch(error) {}
|
||||
});
|
Reference in New Issue
Block a user