added mini logo animation

This commit is contained in:
2023-02-28 16:11:56 +00:00
parent a44f874bb9
commit eb52ae8480
4 changed files with 6 additions and 5 deletions

View File

@@ -19,6 +19,7 @@ document.addEventListener('alpine:init', () => {
phases: {
1: 'images/lf-anim-simple.gif',
2: 'images/lf-anim.gif',
9: 'images/lf-mini.gif',
},
sidebar: false,
init() {
@@ -26,7 +27,7 @@ document.addEventListener('alpine:init', () => {
this.preloadPhase(1);
},
togglePhase() {
var phase = this.sidebar ? 1 : 2;
var phase = this.sidebar ? 9 : 2;
if (phase in this.phases) {
console.log("reloading logo phase", phase);
this.$el.style.backgroundImage = 'url(' + this.phases[phase] + ')';