edit: ajout d'une animation pour le reload du contenu génératif (qq valeurs à régler peut être)
This commit is contained in:
@@ -12,7 +12,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
:root[data-theme="green"]{
|
:root[data-theme="green"]{
|
||||||
--dark-color: #004D33;
|
--dark-color-overlay: 0 77 51;
|
||||||
|
--accent-color-overlay: 230 0 230;
|
||||||
|
--dark-color:#004D33;
|
||||||
--darker-color: #000D07;
|
--darker-color: #000D07;
|
||||||
--light-color: #33FF77;
|
--light-color: #33FF77;
|
||||||
--accent-color: #E600E6;
|
--accent-color: #E600E6;
|
||||||
@@ -172,11 +174,11 @@ p{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@keyframes blink {
|
@keyframes blink {
|
||||||
0% { border-color: var(--accent-color);}
|
0% { background-color: rgba(var(--dark-color-overlay)/33.3%);}
|
||||||
25% { border-color: var(--dark-color);}
|
25% { background-color: rgba(var(--accent-color-overlay)/33.3%);}
|
||||||
50% { border-color: var(--accent-color);}
|
50% { background-color: rgba(var(--dark-color-overlay)/33.3%);}
|
||||||
75% { border-color: var(--dark-color);}
|
75% { background-color: rgba(var(--accent-color-overlay)/33.3%);}
|
||||||
100% { border-color: var(--accent-color);}
|
100% { background-color: rgba(var(--dark-color-overlay)/33.3%);}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*==========================Moveable*/
|
/*==========================Moveable*/
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="generatorContainer" ref="generatorContainer">
|
<div id="generatorContainer" ref="generatorContainer">
|
||||||
|
<div class="loadingOverlay" v-show="overlayIsActive">
|
||||||
|
<p class="floating" id="loadingOText">Loading...</p>
|
||||||
|
</div>
|
||||||
<div class="imgContainer" :id="'div'+item.id" :class="{highlightItem: item.isHighlight===1, highlightMax: item.isHighlight===2, graffStyle: item.isHighlight===3}" v-for="item in partOneItem" :key="item.id" :style="{
|
<div class="imgContainer" :id="'div'+item.id" :class="{highlightItem: item.isHighlight===1, highlightMax: item.isHighlight===2, graffStyle: item.isHighlight===3}" v-for="item in partOneItem" :key="item.id" :style="{
|
||||||
left: item.x + 'px',
|
left: item.x + 'px',
|
||||||
top: item.y + 'px'
|
top: item.y + 'px'
|
||||||
@@ -26,6 +29,28 @@
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
/*=====================Generated Content CSS*/
|
/*=====================Generated Content CSS*/
|
||||||
|
.loadingOverlay{
|
||||||
|
position: relative;
|
||||||
|
margin-top: 4%;
|
||||||
|
width: 97%;
|
||||||
|
height: 93%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-around;
|
||||||
|
z-index: 333;
|
||||||
|
border-radius: 0 16.1px 16.1px 0;
|
||||||
|
pointer-events: none;
|
||||||
|
animation: blink 3.33s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
#loadingOText{
|
||||||
|
position:relative;
|
||||||
|
z-index: 334;
|
||||||
|
font-family: 'lineal';
|
||||||
|
font-size: 33.3px;
|
||||||
|
color: var(--light-color);
|
||||||
|
}
|
||||||
|
|
||||||
#generatorContainer{
|
#generatorContainer{
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
position:absolute;
|
position:absolute;
|
||||||
@@ -101,7 +126,7 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*=============== (prononcé avec l'intonation de grouz) format moyen mes couilles là*/
|
/*=============== (*prononcé avec l'intonation de grouz*) format moyen mes couilles là*/
|
||||||
@media (max-width:800px){
|
@media (max-width:800px){
|
||||||
.imgStyle{
|
.imgStyle{
|
||||||
width:77px;
|
width:77px;
|
||||||
@@ -195,7 +220,8 @@
|
|||||||
partTwoItem:[],
|
partTwoItem:[],
|
||||||
partThreeItem:[],
|
partThreeItem:[],
|
||||||
containerWidth:0,
|
containerWidth:0,
|
||||||
containerHeight:0
|
containerHeight:0,
|
||||||
|
overlayIsActive: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed:{
|
computed:{
|
||||||
@@ -213,6 +239,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
delay(ms) {
|
||||||
|
return new Promise(resolve => setTimeout(resolve, ms));
|
||||||
|
},
|
||||||
getRandomInt(min,max){
|
getRandomInt(min,max){
|
||||||
min=Math.ceil(min)
|
min=Math.ceil(min)
|
||||||
max=Math.floor(max)
|
max=Math.floor(max)
|
||||||
@@ -376,6 +405,19 @@
|
|||||||
this.genCoord(this.partTwoItem);
|
this.genCoord(this.partTwoItem);
|
||||||
this.genCoord(this.partThreeItem);
|
this.genCoord(this.partThreeItem);
|
||||||
console.log('Content has been generated!');
|
console.log('Content has been generated!');
|
||||||
|
},
|
||||||
|
startContentReload(){
|
||||||
|
this.reloadContentAnimation();
|
||||||
|
},
|
||||||
|
async reloadContentAnimation() {
|
||||||
|
this.overlayIsActive = true;
|
||||||
|
for (let i = 0; i < 34; i++) {
|
||||||
|
this.generateContent();
|
||||||
|
await this.delay(50);
|
||||||
|
if(i===33){
|
||||||
|
this.overlayIsActive = false;
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
reloadContent(){
|
reloadContent(){
|
||||||
this.$refs.generator.generateContent();
|
this.$refs.generator.startContentReload();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
|
|||||||
Reference in New Issue
Block a user