POC frontend setup w/ static data.
This commit is contained in:
38
frontend/components/PostPreview.vue
Normal file
38
frontend/components/PostPreview.vue
Normal file
@@ -0,0 +1,38 @@
|
||||
<template>
|
||||
<div>
|
||||
<h2>{{ post.title }}</h2>
|
||||
<p><span>{{ post.date }}</span> by <span>{{ post.author }}</span></p>
|
||||
|
||||
<img v-if="post.thumbnail" :src="post.thumbnail" />
|
||||
|
||||
<div class="preview">
|
||||
<p>{{ post.description }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
post: {
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
h2 {
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
p, span {
|
||||
font-family: monospace;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user