KawAnime/pages/news.vue

46 lines
910 B
Vue
Raw Normal View History

2017-08-03 08:46:44 +00:00
<template lang="pug">
v-container(fluid).pa-0
loader(v-if="!$store.state.news.length")
v-container(fluid v-else)
v-layout(row wrap).news-container
v-flex(xs12).refresh-button-container
v-btn(icon @click="refresh()").refresh-button
v-icon(large) refresh
v-flex(xs12).pr-3
2017-08-03 08:46:44 +00:00
news(v-for="item in $store.state.news", :item="item", :key="item.title")
2017-04-15 14:16:14 +00:00
</template>
<script>
export default {
methods: {
2017-05-13 14:38:17 +00:00
refresh () {
2017-04-15 14:16:14 +00:00
this.$store.dispatch('refreshNews')
}
}
}
</script>
<style scoped>
2017-05-13 14:38:17 +00:00
/* ----- Refresh button ----- */
.refresh-button-container
{
display: inline-block;
text-align: right;
margin-top: 5px;
margin-bottom: 2px;
padding-right: 3%;
}
.refresh-button
{
display: inline-block;
}
/* ---------- ELEM ---------- */
.news-container
{
2017-08-03 08:46:44 +00:00
padding: 0 0 1% 1%;
2017-05-13 14:38:17 +00:00
}
</style>