]> _ Git - fluidbook-toolbox.git/commitdiff
wip #6194 @2:30 animation des boutons
authorsoufiane <soufiane@cubedesigners.com>
Thu, 10 Aug 2023 17:06:40 +0000 (19:06 +0200)
committersoufiane <soufiane@cubedesigners.com>
Thu, 10 Aug 2023 17:06:40 +0000 (19:06 +0200)
resources/quizv2/js/quiz.animations.js
resources/quizv2/js/quiz.js
resources/quizv2/js/quiz.score.js
resources/quizv2/style/005-utilities.sass
resources/quizv2/style/100-global.sass
resources/quizv2/style/105-outro.sass

index d20d95669a23562baef67582c9cfaca1b3f36c66..d43a719cc7e745b018ba332792042f5b76a62dd3 100644 (file)
@@ -22,6 +22,14 @@ QuizAnimations.prototype = {
                 animationData: JSON.parse(json),
             });
         }
+    },
+
+    triggeredBtn: function() {
+        /*$(document).on("mousedown", ".btn", function() {
+            gsap.to($(this), { scale: .9, duration: 0.3 });
+        }).on("mouseup", ".btn", function() {
+            gsap.to($(this), { scale: 1, duration: 0.3 });
+        })*/
     }
 }
 
index f4f358951183ac7883c550e01d7415c57ca4d2f4..96066a6dfe8281e666f99cd25adc037690b3becd 100644 (file)
@@ -45,6 +45,10 @@ Quiz.prototype = {
         // ICI tout commence vraiment
         console.log(this.data.theme)
 
+        //
+        //this.animations.triggeredBtn()
+
+        //
         $("#quiz").css("background-image","url("+this.data.theme.backgroundImage+")")
 
         // La fonction resize est appelée à chaque fois qu'un resize de la fenêtre survient (et à l'init de l'app)
@@ -104,9 +108,20 @@ Quiz.prototype = {
         })
         key('r', function (e){
             e.preventDefault()
+            console.log(e)
             $this.resetForm()
         })
 
+        if(key.isPressed('R')) {
+            alert('r')
+        }
+
+        $(document).on("mousedown", ".btn", function() {
+            gsap.to($(this), { scale: .95, duration: .2, ease: "back.inOut" });
+        }).on("mouseup", ".btn", function() {
+            gsap.to($(this), { scale: 1, duration: .2 });
+        })
+
         //
         this.activeNav()
     },
@@ -295,6 +310,10 @@ Quiz.prototype = {
         // mise en place de la scrollbar personnalisé
         // https://github.com/Grsmto/simplebar/tree/master/packages/simplebar
         const simpleBar = new SimpleBar($ul.get(0))
+    },
+
+    restart: function() {
+
     }
 }
 
index 9d8d9dcea4022e569b76c265b29a6f2580a9e66a..b3367885c3d05dccef970336b9e9fb3afc828f16 100644 (file)
@@ -147,7 +147,6 @@ QuizScore.prototype = {
             cubeSCORM.setSCORMLocation(state);
         }
     },
-
 };
 
 module.exports = QuizScore;
index 96177f955adfc06b9a6658095dc9dd044df8741c..41ac547e602b9e916093469a042e77f59eaf1928 100644 (file)
@@ -6,3 +6,7 @@
 
 .none
     display: none
+
+\:root
+    --space-21-66: clamp(1.31rem, calc(0.29rem + 5.11vw), 4.13rem)
+
index 32d6160128a3e6470b57285d84753298c785a30e..b7af25569ea6c78e23fd79335dbc75b9d94942a0 100644 (file)
@@ -66,7 +66,6 @@ body
         +opacity(.24, background-color, $nok-color)
         svg
             color: $nok-color
-
     &.ok,
     &.nok,
     &.missed
index 97ff0eb446701d20af851f4b20edfb95215fc572..0b2e9da5f60cbba7bbabf4b2669c91a27094ffdf 100644 (file)
             margin-bottom: 9px
         .subtitle
             +font-size(16)
+
     &-content-wrapper
         +flex-config(false,false,false,center)
+        position: relative
+        top: var(--space-21-66)
+        left: var(--space-21-66)
 
     &-counter
         height: 0