diff --git a/src/runtime/components/BitinflowFirstLevelMenu.vue b/src/runtime/components/BitinflowFirstLevelMenu.vue index c859329..e3b0c06 100644 --- a/src/runtime/components/BitinflowFirstLevelMenu.vue +++ b/src/runtime/components/BitinflowFirstLevelMenu.vue @@ -9,15 +9,15 @@
- @@ -118,6 +118,7 @@ export default { }, data() { return { + count: 0, colors: ["#59FFE8", "#00BFA5", "#00F2D1", "#26FFE1", "#8CFFEF"], //colors: ["#A6FFF3", "#00352E", "#00BFA5", "#59FFE8", "#A6FFF3"], primaryMenu: [ @@ -142,6 +143,20 @@ export default { this.$refs.sidebar.classList.add('-translate-x-full'); }, toggleDarkMode() { + this.count++; + if (this.count % 4 === 0) { + console.log('rotate'); + this.$refs.button.classList.add('rotate-360'); + this.$refs.button.classList.add('transition-transform'); + this.$refs.button.classList.add('duration-500'); + + setTimeout(() => { + // remove all classes + this.$refs.button.classList.remove('rotate-360'); + this.$refs.button.classList.remove('transition-transform'); + this.$refs.button.classList.remove('duration-500'); + }, 500); + } document.body.classList.toggle('dark') } }, @@ -156,4 +171,8 @@ export default { .nuxt-link-active:hover { background: #004F44; } + +.rotate-360 { + transform: rotate(360deg); +} diff --git a/src/runtime/components/BitinflowSecondLevelMenu.vue b/src/runtime/components/BitinflowSecondLevelMenu.vue index a586cdb..ecde8e1 100644 --- a/src/runtime/components/BitinflowSecondLevelMenu.vue +++ b/src/runtime/components/BitinflowSecondLevelMenu.vue @@ -9,6 +9,16 @@
+ +