Skip to content

Commit

Permalink
パンくずリスト等の修正
Browse files Browse the repository at this point in the history
  • Loading branch information
hikarut committed Nov 2, 2019
1 parent c03120e commit c07b6a2
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 5 deletions.
7 changes: 6 additions & 1 deletion components/molecules/ListImg.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="tile-parent">
<div>
<img v-lazy="img" :alt="alt" :class="[isDesktop ? 'responsive' : '']"
<img v-lazy="imgUrl" :alt="alt" :class="[isDesktop ? 'responsive' : '']"
src="/loading.png"
class="tile">
</div>
Expand All @@ -22,6 +22,11 @@ export default {
type: String,
default: ''
}
},
computed: {
imgUrl() {
return this.img === '' ? process.env.constant.newsImage : this.img
}
}
}
</script>
Expand Down
1 change: 1 addition & 0 deletions mixins/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export default {
menus: [
{ title: 'Top', url: '/', icon: 'fas fa-home' },
{ title: 'About', url: '/about', icon: 'fas fa-question-circle' },
{ title: 'News', url: '/news', icon: 'fas fa-newspaper' },
{ title: 'Posts', url: '/posts', icon: 'far fa-newspaper' },
{ title: 'Contact', url: '/contact', icon: 'far fa-envelope' },
{ title: 'Privacy', url: '/privacy', icon: 'fas fa-key' }
Expand Down
5 changes: 5 additions & 0 deletions pages/news/_month/_day.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ export default {
disabled: false,
url: '/'
},
{
text: '複業ニュース',
disabled: false,
url: '/news'
},
{
text: addDateString(this.month),
disabled: false,
Expand Down
5 changes: 5 additions & 0 deletions pages/news/_month/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ export default {
disabled: false,
url: '/'
},
{
text: '複業ニュース',
disabled: false,
url: '/news'
},
{
text: addDateString(this.month),
disabled: true,
Expand Down
28 changes: 24 additions & 4 deletions pages/news/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<v-layout row wrap>
<v-flex :class="[isDesktop ? 'xs8' : 'xs12']" >
<div class="top">
<bread-list :items="breadItems"/>

<template v-if="loading">
<v-progress-linear :indeterminate="true"/>
</template>
Expand All @@ -15,9 +17,7 @@

</v-flex>

<template v-if="isDesktop">
<side-menu />
</template>
<side-menu />
</v-layout>
</v-container>
</template>
Expand All @@ -32,6 +32,7 @@ import ButtonLink from '~/components/atoms/Button.vue'
import Subheader from '~/components/atoms/Subheader.vue'
import MenuLink from '~/components/molecules/Menu.vue'
import SideMenu from '~/components/molecules/SideMenu.vue'
import BreadList from '~/components/organisms/BreadList.vue'
import device from '~/mixins/device'
export default {
Expand All @@ -41,14 +42,29 @@ export default {
ButtonLink,
Subheader,
MenuLink,
SideMenu
SideMenu,
BreadList
},
mixins: [device],
async fetch({ store }) {
// news記事の取得
await store.dispatch('news/getTopNews')
},
computed: {
breadItems() {
return [
{
text: 'トップ',
disabled: false,
url: '/'
},
{
text: '複業ニュース',
disabled: true,
url: '/news'
}
]
},
...mapGetters('news', ['topNews', 'loading'])
},
methods: {
Expand Down Expand Up @@ -77,4 +93,8 @@ export default {
margin-top: -20px;
padding-bottom: 30px;
}
/* リストページだけ場所を調整 */
.v-breadcrumbs {
padding: 20px 0px 20px 24px !important;
}
</style>

0 comments on commit c07b6a2

Please sign in to comment.