Skip to content

Commit bf0345c

Browse files
committed
1 parent c6247f2 commit bf0345c

File tree

1 file changed

+2
-89
lines changed

1 file changed

+2
-89
lines changed

custom/MarkdownRenderer.vue

Lines changed: 2 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div v-html="purifiedHtml" class="mdwn"></div>
2+
<div v-html="purifiedHtml" class="prose"></div>
33
</template>
44

55
<script setup lang="ts">
@@ -20,91 +20,4 @@
2020
return DOMPurify.sanitize(html);
2121
});
2222
</script>
23-
24-
<style lang="scss">
25-
26-
.mdwn h1 {
27-
@apply text-2xl font-bold mt-2 mb-2;
28-
}
29-
30-
.mdwn h2 {
31-
@apply text-xl font-bold mt-2 mb-2;
32-
}
33-
34-
.mdwn h3 {
35-
@apply text-lg font-bold mt-2 mb-2;
36-
}
37-
38-
.mdwn h4 {
39-
@apply text-base font-bold mt-2 mb-2;
40-
}
41-
42-
.mdwn h5 {
43-
@apply text-sm font-bold mt-2 mb-2;
44-
}
45-
46-
.mdwn h6 {
47-
@apply text-xs font-bold mt-2 mb-2;
48-
}
49-
50-
.mdwn p {
51-
@apply mb-2 leading-relaxed;
52-
}
53-
54-
.mdwn ul {
55-
@apply list-disc pl-5 mb-2;
56-
}
57-
58-
.mdwn ol {
59-
@apply list-decimal pl-5 mb-2;
60-
}
61-
62-
.mdwn li {
63-
@apply mb-1;
64-
}
65-
66-
.mdwn blockquote {
67-
@apply border-l-4 border-gray-300 dark:border-gray-600 pl-4 italic text-gray-600 dark:text-gray-400 mb-2;
68-
}
69-
70-
.mdwn code {
71-
@apply bg-gray-100 dark:bg-gray-800 text-red-600 dark:text-red-400 font-mono px-1 py-0.5 rounded;
72-
}
73-
74-
.mdwn pre {
75-
@apply bg-gray-100 dark:bg-gray-900 text-sm font-mono p-4 rounded overflow-x-auto mb-2;
76-
}
77-
.mdwn pre code {
78-
@apply bg-transparent p-0 text-inherit;
79-
}
80-
81-
.mdwn table {
82-
@apply w-full border-collapse text-left text-sm mb-2;
83-
}
84-
85-
.mdwn thead {
86-
@apply bg-gray-100 dark:bg-gray-700;
87-
}
88-
89-
.mdwn th,
90-
.mdwn td {
91-
@apply border border-gray-300 dark:border-gray-700 px-4 py-2;
92-
}
93-
94-
.mdwn th {
95-
@apply font-semibold;
96-
}
97-
98-
.mdwn hr {
99-
@apply border-t border-gray-300 dark:border-gray-700 my-6;
100-
}
101-
102-
.mdwn img {
103-
@apply max-w-full h-auto rounded;
104-
}
105-
106-
.mdwn a {
107-
@apply text-blue-600 hover:underline dark:text-blue-400;
108-
}
109-
110-
</style>
23+

0 commit comments

Comments
 (0)