KawAnime/components/loader.vue

48 lines
1003 B
Vue
Raw Normal View History

<template lang="pug">
transition(name="fade" mode="out-in")
v-layout(row wrap justify-center align-end).loader-container
v-flex(xs12).flex-centered
h3.loading-text.white--text 少々お待ち下さいね
v-flex(xs12).flex-centered
img(v-if="number === 1" src="~static/images/loading-gif1.gif" height="500")
2017-07-27 22:15:05 +00:00
img(v-else-if="number === 2" src="~static/images/loading-gif2.gif" height="500")
2017-04-15 14:16:14 +00:00
</template>
2017-04-15 14:16:14 +00:00
<style scoped>
2017-05-13 14:38:17 +00:00
.loading-text
{
padding: 0;
margin: 0;
font-family: 'Hiragino Mincho Pro', 'MS PMincho', serif;
2017-05-13 14:38:17 +00:00
}
2017-04-15 14:16:14 +00:00
.loader-container
2017-05-13 14:38:17 +00:00
{
2017-08-03 11:30:29 +00:00
min-height: calc(100vh - (48px + 24px));
}
.flex-centered
{
display: flex;
justify-content: center;
2017-05-13 14:38:17 +00:00
}
2017-04-15 14:16:14 +00:00
</style>
2017-04-15 14:16:14 +00:00
<script>
export default{
data: function () {
return {
number: this.ran()
}
},
methods: {
2017-05-13 14:38:17 +00:00
ran () {
return parseInt(Math.random() * 2 + 1)
}
},
2017-05-13 14:38:17 +00:00
mounted () {
this.number = this.ran()
}
}
2017-04-15 14:16:14 +00:00
</script>