amélioration mineure du papier peint
|
@ -36,19 +36,22 @@ body {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
min-height: 100vh;
|
|
||||||
|
|
||||||
background-attachment: fixed;
|
background-attachment: fixed,fixed;
|
||||||
background-color: #ffffff;
|
background-color: #499135;
|
||||||
background-image: url("https://etud.insa-toulouse.fr/~mougnibas/accueil_2023/assets/img/background.svg");
|
background-repeat: no-repeat, no-repeat;
|
||||||
|
background-size: auto,cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* papier peint pour petits écrans (smartphones) */
|
/* papier peint pour petits écrans (smartphones) */
|
||||||
@media all and (max-width: 800px) {
|
@media all and (max-width: 800px) {
|
||||||
|
|
||||||
body {
|
body{
|
||||||
background-image: url("https://etud.insa-toulouse.fr/~mougnibas/accueil_2023/assets/img/asterix.svg");
|
background-position: center center, center center;
|
||||||
background-repeat: space;
|
background-size: auto,cover;
|
||||||
|
background-attachment: fixed,fixed;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 276 KiB After Width: | Height: | Size: 309 KiB |
Before Width: | Height: | Size: 442 KiB After Width: | Height: | Size: 454 KiB |
Before Width: | Height: | Size: 156 KiB After Width: | Height: | Size: 169 KiB |
6227
assets/img/hutte_panoramix.svg
Normal file
After Width: | Height: | Size: 1 MiB |
Before Width: | Height: | Size: 254 KiB After Width: | Height: | Size: 271 KiB |
Before Width: | Height: | Size: 155 KiB After Width: | Height: | Size: 162 KiB |
Before Width: | Height: | Size: 820 KiB After Width: | Height: | Size: 845 KiB |
39779
assets/img/romains.svg
Before Width: | Height: | Size: 865 KiB After Width: | Height: | Size: 942 KiB |
55763
assets/img/village.svg
Normal file
After Width: | Height: | Size: 1.5 MiB |
|
@ -110,20 +110,24 @@ header("Cache-Control: no-cache, must-revalidate");
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
|
||||||
var mobile_backgrounds = ['assets/img/asterix.svg', 'assets/img/adrenaline.svg', 'assets/img/obelix.svg', 'assets/img/assurancetourix.svg'];
|
var mobile_backgrounds = ['assets/img/asterix.svg', 'assets/img/adrenaline.svg', 'assets/img/obelix.svg', 'assets/img/assurancetourix.svg'];
|
||||||
var pc_backgrounds = ['assets/img/pc_background.svg'];
|
var pc_backgrounds = ['assets/img/pc_background.svg'];
|
||||||
|
|
||||||
|
var personnage = "";
|
||||||
var background = "";
|
var background = "";
|
||||||
|
|
||||||
// détecte les petits écrans (frigo connectés, 3DS ...)
|
// détecte les petits écrans (frigo connectés, 3DS ...)
|
||||||
//
|
//
|
||||||
if (window.innerWidth <= 800){
|
if (window.innerWidth <= 800){
|
||||||
background = mobile_backgrounds[Math.floor(Math.random() * mobile_backgrounds.length)]
|
personnage = mobile_backgrounds[Math.floor(Math.random() * mobile_backgrounds.length)]
|
||||||
|
background = "assets/img/hutte_panoramix.svg";
|
||||||
}else{
|
}else{
|
||||||
background = pc_backgrounds[Math.floor(Math.random() * pc_backgrounds.length)]
|
personnage = pc_backgrounds[Math.floor(Math.random() * pc_backgrounds.length)]
|
||||||
|
background = "assets/img/village.svg";
|
||||||
}
|
}
|
||||||
|
|
||||||
document.getElementsByTagName('body')[0].style.backgroundImage = 'url(' + background + ')';
|
document.getElementsByTagName('body')[0].style.backgroundImage = 'url(' + personnage + '),'+ 'url(\"'+background+'\")';
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|