This commit is contained in:
penner 2022-12-22 00:16:42 +00:00
parent cb7c785ef4
commit 2052efedd9
2 changed files with 12 additions and 8 deletions

View file

@ -1,14 +1,14 @@
<template> <template>
<div class="container"> <div class="container">
<LoginModal ref="login_modal" />
<ImageModal ref="image_modal" />
<div class="section"> <div class="section">
<h1 class="title has-text-centered is-uppercase"> <h1 class="title has-text-centered is-uppercase">
Adventskalender {{ date }} Adventskalender {{ date }}
</h1> </h1>
<h2 class="subtitle has-text-centered">Der Gelöt</h2> <h2 class="subtitle has-text-centered">Der Gelöt</h2>
<LoginModal ref="login_modal" />
<ImageModal ref="image_modal" />
<CalendarDoor <CalendarDoor
v-for="(_, index) in 24" v-for="(_, index) in 24"
:key="index" :key="index"
@ -16,6 +16,12 @@
@openDoor="open_calendar_door" @openDoor="open_calendar_door"
/> />
</div> </div>
<div class="section">
<button class="button" @click="$refs.login_modal.set_active(true)">
Login
</button>
</div>
</div> </div>
</template> </template>
@ -53,13 +59,10 @@ export default class App extends Vue {
this.visible_days = visible_days; this.visible_days = visible_days;
} }
); );
this.$refs.login_modal.set_active(true);
} }
private open_calendar_door(image_src: string): void { private open_calendar_door(image_src: string): void {
this.$refs.image_modal.set_src(image_src); this.$refs.image_modal.show_src(image_src);
this.$refs.image_modal.set_active(true);
} }
} }
</script> </script>

View file

@ -27,8 +27,9 @@ export default class ImageModal extends Vue {
this.active = state; this.active = state;
} }
public set_src(src: string): void { public show_src(src: string): void {
this.image_src = src; this.image_src = src;
this.set_active(true);
} }
} }
</script> </script>