-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(post): show title, date, location
- Loading branch information
Showing
6 changed files
with
69 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<template> | ||
<span :class="$style.dot">•</span> | ||
</template> | ||
|
||
<style scoped module> | ||
.dot { | ||
color: var(--vp-c-text-3); | ||
font-size: 0.45rem; | ||
margin: 0 0.3rem; | ||
vertical-align: bottom; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<template> | ||
<div :class="$style.postHeader"> | ||
<h1 :class="$style.title"> | ||
{{ frontmatter.title }} | ||
</h1> | ||
<div :class="$style.elementList"> | ||
<Dot /> | ||
<span :class="$style.elementItem"> | ||
{{ moment(frontmatter.date).format("LL") }} | ||
</span> | ||
<Dot v-if="frontmatter.location" /> | ||
<span :class="$style.elementItem"> | ||
{{ frontmatter.location }} | ||
</span> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import moment from "moment-timezone"; | ||
import { useData } from "vitepress"; | ||
import Dot from "./Dot.vue"; | ||
const { frontmatter } = useData(); | ||
</script> | ||
|
||
<style module scoped> | ||
.postHeader { | ||
padding-bottom: 2rem; | ||
} | ||
.title { | ||
padding-bottom: 1rem; | ||
margin-bottom: 0.3em; | ||
font-size: 1.8em; | ||
font-weight: 600; | ||
border-bottom: 1px dashed var(--vp-c-divider); | ||
} | ||
.elementList { | ||
color: var(--vp-c-text-3); | ||
font-size: 0.9rem; | ||
} | ||
.elementItem { | ||
margin-right: 1rem; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
title: Pilot | ||
date: 2019-06-02 | ||
location: 西乡街道,深圳 | ||
location: 深圳,西乡街道 | ||
sort: Miscellaneous | ||
tags: | ||
- Small Talk | ||
|