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

View File

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