diff --git a/src/components/shortcodes/Callout.astro b/src/components/shortcodes/Callout.astro index 8886a7f..9617c89 100644 --- a/src/components/shortcodes/Callout.astro +++ b/src/components/shortcodes/Callout.astro @@ -31,11 +31,6 @@ const { icon, type = 'info'} = Astro.props; --callout-text: #2e3440; } - .callout-tip { - --callout-bg: var(--secondary-color); - --callout-text: #2e3440; - } - .callout-warning { --callout-bg: var(--terminal-yellow); --callout-text: #2e3440; diff --git a/src/components/shortcodes/timeline/TimeLine.astro b/src/components/shortcodes/timeline/TimeLine.astro index 4e9dac0..99b6cda 100644 --- a/src/components/shortcodes/timeline/TimeLine.astro +++ b/src/components/shortcodes/timeline/TimeLine.astro @@ -15,14 +15,8 @@ import TimeLineItem from "./TimeLineItem.astro"; import { parse } from "ultrahtml"; import {querySelectorAll} from 'ultrahtml/selector' -interface TimelineItem { - date: string; - title: string; - descriptionHTML: string; -} - /* These code has a lot of children LoL */ -function parseTimeLineContent(content: string): TimelineItem[] { +function parseTimeLineContent(content: string) { if (!content) return []; const html = parse(content); @@ -53,24 +47,18 @@ function parseTimeLineContent(content: string): TimelineItem[] { return items; } -let timelineItems: TimelineItem[] = [] +const renderedHTML = await Astro.slots.render('default'); +const timelineItems = parseTimeLineContent(renderedHTML); -const { parseFromText = true } = Astro.props; - -if (parseFromText) { - const renderedHTML = await Astro.slots.render('default'); - timelineItems = parseTimeLineContent(renderedHTML); -} ---