This commit is contained in:
hamdy
2020-11-30 12:10:36 +02:00
parent 6981c9c3c3
commit 55515b540f
2 changed files with 23 additions and 12 deletions

View File

@@ -15,7 +15,7 @@
<h2 class="post-card-title mt-3">{{ record.title || record.name }}</h2>
<p class="post-card-excerpt">{{ record.excerpt }}</p>
<section
class="flex flex-wrap post-tags container mx-auto relative py-1"
class="flex flex-wrap post-tags container mx-auto relative py-1" v-if="displaytags()"
>
<g-link
v-for="membership in record.memberships"
@@ -66,7 +66,7 @@
</p>
</div>
</div>
<section class="post-tags container mx-auto relative py-3">
<section class="post-tags container mx-auto relative py-3" v-if="displaytags()">
<g-link
v-for="tag in record.tags"
:key="tag.id"
@@ -85,12 +85,18 @@
export default {
props: {
record: {},
showtags: false,
border: {
type: Boolean,
default: true,
},
},
};
methods: {
displaytags(){
return this.showtags
}
}
}
</script>
<style scoped>

View File

@@ -2,7 +2,7 @@
<Layout>
<div class="container sm:pxi-0 mx-auto">
<div class="flex flex-wrap with-large pt-8 pb-8 mx-4 sm:-mx-4">
<PostListItem
<PostListItem :showtags=true
v-for="edge in $page.entries.edges"
:key="edge.node.id"
:record="edge.node"
@@ -33,18 +33,18 @@ query{
}
edges {
node {
tags{
id
title
path
}
excerpt
image(width:800)
path
humanTime : created(format:"DD MMM YYYY")
datetime : created
author {
id
name
image(width:64, height:64, fit:inside)
path
}
}
}
}
@@ -69,5 +69,10 @@ export default {
return "";
},
},
methods: {
datefilter(){
}
}
};
</script>