KawAnime/components/loader.vue

42 lines
976 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-10-14 13:41:05 +00:00
<style lang="stylus" scoped>
2017-05-13 14:38:17 +00:00
.loading-text
2017-10-14 13:41:05 +00:00
padding 0
margin 0
font-family 'Hiragino Mincho Pro', 'MS PMincho', serif
2017-04-15 14:16:14 +00:00
.loader-container
2017-10-14 13:41:05 +00:00
min-height calc(100vh - (48px + 24px))
.flex-centered
2017-10-14 13:41:05 +00:00
display flex
justify-content center
2017-04-15 14:16:14 +00:00
</style>
2017-04-15 14:16:14 +00:00
<script>
export default {
data () {
return {
number: this.ran()
}
},
methods: {
2017-05-13 14:38:17 +00:00
ran () {
return parseInt(Math.random() * 2 + 1)
}
},
beforeMount () {
this.number = this.ran()
}
}
2017-04-15 14:16:14 +00:00
</script>