[+] Display blog post info

This commit is contained in:
Hykilpikonna
2021-12-26 11:06:24 -05:00
parent 97336ae40e
commit 25ad2900c9
4 changed files with 17 additions and 10 deletions
+11 -6
View File
@@ -1,6 +1,11 @@
<template>
<div id="BlogPostPreview">
<div id="title">{{meta.title}}</div>
<div id="BlogPostPreview" class="card">
<div id="date">{{meta.date}}</div>
<div id="titles">
<div id="title">{{meta.title}}</div>
<div id="subtitle" v-if="meta.subtitle">{{meta.subtitle}}</div>
</div>
<div id="expand">展开...</div>
</div>
</template>
@@ -30,10 +35,10 @@ export default class BlogPostPreview extends Vue
{
if (!this.meta.subtitle)
{
fetch(`${hosts.content}/${this.meta.file}`).then(it => it.text()).then(it =>
{
this.meta.subtitle = marked(it)
})
// fetch(`${hosts.content}/${this.meta.file}`).then(it => it.text()).then(it =>
// {
// this.meta.subtitle = marked(it)
// })
}
}
}
+1 -2
View File
@@ -59,8 +59,7 @@ export default class PostView extends Vue
display: none
.post
width: 100%
padding: 12px 20px 8px
text-align: left
> *
+2 -1
View File
@@ -156,10 +156,11 @@ html
.card
width: 100%
background: #fdf9f1
border-radius: 20px
margin-bottom: 20px
padding: 12px 20px 8px
padding: 15px 20px
overflow: auto
overflow-x: hidden
box-sizing: border-box
+3 -1
View File
@@ -24,5 +24,7 @@ export default class Blog extends Vue
</script>
<style lang="sass" scoped>
#Blog
width: 600px
margin: 20px auto
</style>