alpha_full/_include/_spinner/spinner.php
2026-04-06 22:58:51 +02:00

250 lines
5.7 KiB
PHP
Executable File

<style>
.lds-spinner {
color: white;
display: inline-block;
position: relative;
width: 80px;
height: 80px;
top:50%;
left:50%;
display:none;
}
.lds-spinner div {
transform-origin: 35px 35px;
animation: lds-spinner 1.2s linear infinite;
}
.lds-spinner div:after {
content: " ";
display: block;
position: absolute;
top: 3px;
left: 37px;
width: 3px;
height: 18px;
border-radius: 30%;
background: lightblue;
}
.lds-spinner div:nth-child(1) {
transform: rotate(0deg);
animation-delay: -1.1s;
}
.lds-spinner div:nth-child(1):after {
background: orange;
}
.lds-spinner div:nth-child(2) {
transform: rotate(30deg);
animation-delay: -1s;
}
.lds-spinner div:nth-child(3) {
transform: rotate(60deg);
animation-delay: -0.9s;
}
.lds-spinner div:nth-child(3):after {
background: orange;
}
.lds-spinner div:nth-child(4) {
transform: rotate(90deg);
animation-delay: -0.8s;
}
.lds-spinner div:nth-child(5) {
transform: rotate(120deg);
animation-delay: -0.7s;
}
.lds-spinner div:nth-child(5):after {
background: orange;
}
.lds-spinner div:nth-child(6) {
transform: rotate(150deg);
animation-delay: -0.6s;
}
.lds-spinner div:nth-child(7) {
transform: rotate(180deg);
animation-delay: -0.5s;
}
.lds-spinner div:nth-child(7):after {
background: orange;
}
.lds-spinner div:nth-child(8) {
transform: rotate(210deg);
animation-delay: -0.4s;
}
.lds-spinner div:nth-child(9) {
transform: rotate(240deg);
animation-delay: -0.3s;
}
.lds-spinner div:nth-child(9):after {
background: orange;
}
.lds-spinner div:nth-child(10) {
transform: rotate(270deg);
animation-delay: -0.2s;
}
.lds-spinner div:nth-child(11) {
transform: rotate(300deg);
animation-delay: -0.1s;
}
.lds-spinner div:nth-child(11):after {
background: orange;
}
.lds-spinner div:nth-child(12) {
transform: rotate(330deg);
animation-delay: 0s;
}
@keyframes lds-spinner {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
#spinnerOverlay{
position:absolute;
display:none;
font-family: Bradley Hand, cursive;
color: #FF8C00;
font-size:11px;
top:20%;
left:20px;
z-index: 10000;
background: #fff;
fill: #fff;
resize:none;
text-align: center;
width:50%;
height:50%;
/*border:1px transparent #fff;*/
margin:auto;
background-color:#F0F0F0;
background:transparent;
padding-left:48%;
padding-top:30%;
}
#spinnerOverlay:target{
display: block;
background-color:#F0F0F0;
}
.spinnerPopup{
position: absolute;
display:none;
top: 10px;
background: #fff;
padding: 10px;
border: 2px solid #ddd;
box-shadow: 0px 0px 20px #000;
border-radius: 10px;
text-align:center;
align-content:center;
resize:none;
overflow:visible;
text-align: center;
width:90%;
height: 30%;
margin: auto;
}
@keyframes spin{
0% {transform: rotate(0deg); }
100% {transform: rotate(360deg); }
}
h2{
left:0;
top:5%;
position:relative;
text-align:center;
align-content:center;
}
/* garder les sauts de ligne pour le responsive */
.spinner_close {
position:absolute;
opacity:1;
float: right;
right:0px;
top:0px;
font-size:20px;
z-index:1250;
background-color:lightgrey;
box-shadow: 0px 0px 20px grey;
color:#0b4c5f;
border-radius:100%;
}
</style>
<?php
// ---------------------------------------------------
// Spinner overlay
// ---------------------------------------------------
echo '<div id="spinnerOverlay" >';
echo '<div id="spinnerPopup" class="spinnerPopup lds-spinner" >';
echo '<div></div>';
echo '<div></div>';
echo '<div></div>';
echo '<div></div>';
echo '<div></div>';
echo '<div></div>';
echo '<div></div>';
echo '<div></div>';
echo '<div></div>';
echo '<div></div>';
echo '<div></div>';
echo '<div></div>';
// ---------------------------------------------------
// Bouton fermer
// ---------------------------------------------------
// if (isset($_SERVER['REQUEST_URI'] ) ) $test=strpos($_SERVER['REQUEST_URI'] ,"wbadm");
// if($test>0) {
// echo '<a href="' .$referant. '" target="rightFrameAdmin" >';
// echo '<a href="' .$referant. '" target="top" >';
echo '<span id="FermerSpinner" class="fad fa-times-circle spinner_close" onClick="offSpinnerUser();" alt="Fermer"></span>';
// echo '</a>';
// }
echo '<h2 >Veuillez patienter, traitement en cours... ' .$_SESSION['nomSiteAff']. '</h2>';
echo '</div>';
echo '</div>';
?>
<script language="javascript" type="text/javascript">
function onSpinnerUser() {
// alert('onSpinnerUser');
if (document.getElementById("body")) {document.getElementById("body").style.backgroundColor = "#F0F0F0";}
if (document.getElementById("spinnerOverlay")) {document.getElementById("spinnerOverlay").style.display = "block";}
if (document.getElementById("spinnerPopup")) {document.getElementById("spinnerPopup").style.display = "block";}
if (document.getElementById("lds-spinner")) {document.getElementById("lds-spinner").style.display = "block";}
}
function offSpinnerUser() {
// alert('offSpinnerUser');
if (document.getElementById("body")) {document.getElementById("body").style.backgroundColor = "";}
if (document.getElementById("spinnerOverlay")) {document.getElementById("spinnerOverlay").style.display = "none";}
if (document.getElementById("spinnerPopup")) {document.getElementById("spinnerPopup").style.display = "none";}
if (document.getElementById("lds-spinner")) {document.getElementById("lds-spinner").style.display = "none";}
}
</script>