[+] Title image

This commit is contained in:
Hykilpikonna
2021-12-26 11:06:49 -05:00
parent 9f43c2b8f7
commit db488a8583
+12
View File
@@ -5,6 +5,7 @@
<div id="title">{{meta.title}}</div>
<div id="subtitle" v-if="meta.subtitle">{{meta.subtitle}}</div>
</div>
<img :src="image" v-if="image" alt="Title Image">
<div id="expand">展开...</div>
</div>
</template>
@@ -41,6 +42,9 @@ export default class BlogPostPreview extends Vue
// })
}
}
get image(): string | null
{ return this.meta.title_image ? hosts.content + '/' + this.meta.title_image : null }
}
</script>
@@ -65,6 +69,14 @@ export default class BlogPostPreview extends Vue
font-size: 0.8em
color: $color-text-light
img
$margin: 10px
max-width: calc(100% + 2 * $margin)
min-width: calc(100% + 2 * $margin)
border-radius: 10px
margin-left: -$margin
margin-right: -$margin
#expand
font-size: 0.8em
padding-top: 10px