Files
vue-journal-layer/app/components/Journal/PostBody.vue
Jakub Zych c408eeb2ca feat: Journal list, category pages, pagination, tokens and pl/en strings
- index and category pages paginate with ?page=N and 404 out of range
- category content renders above the list through the html gate
- related posts fall back to the latest posts
- --journal-* tokens and neutral base styles
- pl/en strings registered only for locales the app enables
2026-10-09 18:02:48 +02:00

14 lines
634 B
Vue

<script setup lang="ts">
// The post body. v-html only ever receives HTML that passed the Journal gate;
// a blocked or unsafe body renders a neutral notice instead.
import { gateJournalHtml } from '../../utils/htmlGate.ts'
const props = defineProps<{ html: string | null | undefined; blocked?: boolean }>()
const gated = computed(() => (props.blocked ? { safe: false, html: '' } : gateJournalHtml(props.html)))
</script>
<template>
<div v-if="gated.safe" class="journal-post-body" v-html="gated.html" />
<p v-else class="journal-post-body journal-post-body--blocked">{{ $t('journal.post.contentUnavailable') }}</p>
</template>