Optimisation logo header adapté taille fenêtre

This commit is contained in:
Divlo
2019-12-07 09:21:15 +01:00
parent a070e5aefc
commit 2c98cd252d
3 changed files with 16 additions and 17 deletions

View File

@ -229,6 +229,21 @@ $(function () {
}
setInterval(change,10000);
}
/* Changement du logo du header selon la largeur de la fenêtre */
$(window).resize(function() {
const windowWidth = $(window).width();
if(windowWidth < 463){
$('#logo-header').attr('src', '/img/FunctionProject_icon.png');
$('#logo-header').attr('style', 'display: inline-block;width: 80%;');
$('.navbar-brand').attr('style', 'width: 30%;');
}
else {
$('#logo-header').attr('src', '/img/FunctionProject_brand-logo.png');
$('#logo-header').removeAttr('style');
$('.navbar-brand').removeAttr('style');
}
});
/* Permet d'afficher l'heure en temps réel sur le footer */
window.onload = realDateTime('realDateTime');