feat: add image module

This commit is contained in:
2022-08-10 17:22:08 -04:00
parent e56325677c
commit f4c481b81d
10 changed files with 68 additions and 48 deletions

View File

@@ -1,10 +1,6 @@
<script setup lang="ts">
import type { StoryParsedContent, BlogParsedContent } from "@/shared/types";
import { calcReadingTime } from "@/shared/readingTime";
import dayjs from "dayjs";
import utc from "dayjs/plugin/utc.js";
dayjs.extend(utc);
import { calcReadingTime, getPrettyDate } from "@/shared/metadata";
const { post, type, highlighttags } = defineProps<{
post: StoryParsedContent | BlogParsedContent;
@@ -12,11 +8,6 @@ const { post, type, highlighttags } = defineProps<{
highlighttags?: string[];
}>();
const getPrettyDate = (story: StoryParsedContent) => {
const date = dayjs(story.date).utc();
return date.format("DD MMM YYYY");
};
const readingTime = calcReadingTime(post);
const descText =
type === "stories"