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