mirror of
https://github.com/modrinth/code.git
synced 2026-08-25 00:55:25 +00:00
fix blog
This commit is contained in:
@@ -45,7 +45,12 @@ const parts = computed(() => parseArticleHtml(props.html))
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="markdown-body">
|
<div
|
||||||
|
v-if="parts.length === 1 && parts[0].type === 'html'"
|
||||||
|
class="markdown-body"
|
||||||
|
v-html="parts[0]?.content"
|
||||||
|
/>
|
||||||
|
<div v-else class="markdown-body">
|
||||||
<template v-for="(part, index) in parts" :key="index">
|
<template v-for="(part, index) in parts" :key="index">
|
||||||
<div v-if="part.type === 'html'" v-html="part.content" />
|
<div v-if="part.type === 'html'" v-html="part.content" />
|
||||||
<component :is="ARTICLE_WIDGETS[part.id]" v-else />
|
<component :is="ARTICLE_WIDGETS[part.id]" v-else />
|
||||||
|
|||||||
Reference in New Issue
Block a user