advent22/ui/src/components/calendar/CalendarDoor.vue

57 lines
1.2 KiB
Vue
Raw Normal View History

2022-10-30 01:27:46 +00:00
<template>
2023-09-22 19:02:51 +00:00
<SVGRect
variant="primary"
:visible="store.is_touch_device || force_visible"
2023-09-22 19:02:51 +00:00
:rectangle="door.position"
>
<div class="has-text-danger glow">{{ door.day }}</div>
2023-09-22 19:02:51 +00:00
</SVGRect>
2022-10-30 01:27:46 +00:00
</template>
<style lang="scss" scoped>
@import "@/bulma-scheme";
.glow {
-webkit-animation: glow 2s ease-in-out infinite alternate;
-moz-animation: glow 2s ease-in-out infinite alternate;
animation: glow 2s ease-in-out infinite alternate;
}
@keyframes glow {
from {
text-shadow: 0 0 10px white, 0 0 20px white, 0 0 30px $primary,
0 0 40px $primary, 0 0 50px $primary, 0 0 60px $primary, 0 0 70px $primary;
}
to {
text-shadow: 0 0 10px white;
}
}
</style>
2022-10-30 01:27:46 +00:00
<script lang="ts">
2023-09-07 02:08:56 +00:00
import { Door } from "@/lib/door";
import { advent22Store } from "@/plugins/store";
2023-09-06 16:25:35 +00:00
import { Options, Vue } from "vue-class-component";
2023-09-07 00:41:38 +00:00
2023-09-07 02:08:56 +00:00
import SVGRect from "./SVGRect.vue";
2022-10-30 01:27:46 +00:00
@Options({
2023-09-07 00:41:38 +00:00
components: {
SVGRect,
},
2022-10-30 01:27:46 +00:00
props: {
2023-09-07 00:41:38 +00:00
door: Door,
force_visible: {
2023-10-27 14:40:25 +00:00
type: Boolean,
default: false,
},
2022-10-30 01:27:46 +00:00
},
})
2023-01-24 23:18:09 +00:00
export default class extends Vue {
public readonly store = advent22Store();
2023-11-04 01:31:49 +00:00
public door!: Door;
public force_visible!: boolean;
2022-10-30 01:27:46 +00:00
}
</script>