summaryrefslogtreecommitdiff
path: root/src/client/app/common/views/components/special-message.vue
blob: deac757c5b43c320a0b8f435346572e85a16330b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<template>
<div class="mk-special-message">
	<p v-if="m == 1 && d == 1">%i18n:@new-year%</p>
	<p v-if="m == 12 && d == 25">%i18n:@christmas%</p>
</div>
</template>

<script lang="ts">
import Vue from 'vue';
export default Vue.extend({
	data() {
		return {
			now: new Date()
		};
	},
	computed: {
		d(): number {
			return this.now.getDate();
		},
		m(): number {
			return this.now.getMonth() + 1;
		}
	}
});
</script>

<style lang="stylus" scoped>
.mk-special-message
	&:empty
		display none

	> p
		margin 0
		padding 4px
		text-align center
		font-size 14px
		font-weight bold
		text-transform uppercase
		color #fff
		background #ff1036

</style>