Commit d5031206 authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

Ajout d'un "loading" pour éviter de voir la page alors que le CSS n'est pas complétement chargé

parent 932a34d3
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -68,6 +68,14 @@ $this->headScript();

    <?= $this->Vite()->addJs('src/oscar-css.js'); ?>

    <style>
        body { 
            display: none; 
            opacity: 0; 
            animation: opacity .3s;
        }
    </style>

</head>

<body class="privatize <?php
@@ -483,6 +491,10 @@ echo getenv('APPLICATION_ENV') ?: 'development' ?>">
<a href="#" class="scrollup" title="Remonter en haut de cette page"><img alt="Remonter" src="<?php
    echo $this->basePath('/css/icon-top.png') ?>"/></a>
<script>
    window.addEventListener('DOMContentLoaded', () => {
      document.body.style.display = 'block';
      document.body.style.opacity = 1;
    });

    window.flashMessage = function (type, content) {
        var message = $('<div class="flashmsg flashmsg-' + type + '">'