2022-10-28 00:14:20 +00:00
|
|
|
<template>
|
2022-10-30 01:27:46 +00:00
|
|
|
<div class="container">
|
2022-12-22 00:16:42 +00:00
|
|
|
<LoginModal ref="login_modal" />
|
|
|
|
<ImageModal ref="image_modal" />
|
|
|
|
|
2022-10-30 01:27:46 +00:00
|
|
|
<div class="section">
|
2022-12-08 23:21:52 +00:00
|
|
|
<h1 class="title has-text-centered is-uppercase">
|
|
|
|
Adventskalender {{ date }}
|
|
|
|
</h1>
|
2022-10-30 01:27:46 +00:00
|
|
|
<h2 class="subtitle has-text-centered">Der Gelöt</h2>
|
|
|
|
|
2023-01-17 18:25:56 +00:00
|
|
|
<DoorMapEditor />
|
2023-01-16 00:19:16 +00:00
|
|
|
|
2023-09-06 16:25:35 +00:00
|
|
|
<CalendarDoor v-for="(_, index) in 24" :key="index" :day="index" @openDoor="open_calendar_door" />
|
2022-10-30 01:27:46 +00:00
|
|
|
</div>
|
2022-12-22 00:16:42 +00:00
|
|
|
|
|
|
|
<div class="section">
|
|
|
|
<button class="button" @click="$refs.login_modal.set_active(true)">
|
|
|
|
Login
|
|
|
|
</button>
|
|
|
|
</div>
|
2022-10-30 01:27:46 +00:00
|
|
|
</div>
|
2022-10-28 00:14:20 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2022-10-28 00:28:03 +00:00
|
|
|
import { Options, Vue } from "vue-class-component";
|
2022-12-14 02:39:32 +00:00
|
|
|
|
2022-10-30 01:27:46 +00:00
|
|
|
import CalendarDoor from "./components/CalendarDoor.vue";
|
2023-01-17 18:25:56 +00:00
|
|
|
import DoorMapEditor from "./components/DoorMapEditor.vue";
|
2022-11-03 23:01:28 +00:00
|
|
|
import ImageModal from "./components/ImageModal.vue";
|
2022-12-14 02:39:32 +00:00
|
|
|
import LoginModal from "./components/LoginModal.vue";
|
2022-10-28 00:14:20 +00:00
|
|
|
|
|
|
|
@Options({
|
|
|
|
components: {
|
2022-10-30 01:27:46 +00:00
|
|
|
CalendarDoor,
|
2023-01-17 18:25:56 +00:00
|
|
|
DoorMapEditor,
|
2022-11-03 23:01:28 +00:00
|
|
|
ImageModal,
|
2022-12-14 02:39:32 +00:00
|
|
|
LoginModal,
|
2022-10-28 00:14:20 +00:00
|
|
|
},
|
|
|
|
})
|
2023-01-24 23:18:09 +00:00
|
|
|
export default class extends Vue {
|
2022-12-21 23:48:54 +00:00
|
|
|
private visible_days = 0;
|
2022-12-08 23:21:52 +00:00
|
|
|
date = "";
|
|
|
|
|
2022-12-14 02:39:32 +00:00
|
|
|
declare $refs: {
|
|
|
|
login_modal: LoginModal;
|
2022-12-21 23:51:01 +00:00
|
|
|
image_modal: ImageModal;
|
2022-12-14 02:39:32 +00:00
|
|
|
};
|
|
|
|
|
2023-01-17 14:28:11 +00:00
|
|
|
public mounted() {
|
2022-12-08 23:21:52 +00:00
|
|
|
this.$advent22.api_get_string("days/date", (date: string) => {
|
|
|
|
this.date = date;
|
|
|
|
});
|
2022-12-14 02:39:32 +00:00
|
|
|
|
2022-12-21 23:48:54 +00:00
|
|
|
this.$advent22.api_get_number(
|
|
|
|
"days/visible_days",
|
|
|
|
(visible_days: number) => {
|
|
|
|
this.visible_days = visible_days;
|
|
|
|
}
|
|
|
|
);
|
2022-12-08 23:21:52 +00:00
|
|
|
}
|
2022-11-03 23:01:28 +00:00
|
|
|
|
2023-09-06 16:25:35 +00:00
|
|
|
public open_calendar_door(image_src: string) {
|
2022-12-22 00:16:42 +00:00
|
|
|
this.$refs.image_modal.show_src(image_src);
|
2022-11-03 23:01:28 +00:00
|
|
|
}
|
|
|
|
}
|
2022-10-28 00:14:20 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
2022-10-30 02:35:39 +00:00
|
|
|
body {
|
|
|
|
min-height: 100vh;
|
|
|
|
}
|
2022-10-28 00:14:20 +00:00
|
|
|
</style>
|