2023-07-27 05:31:52 +00:00
|
|
|
<!--
|
2024-02-13 15:59:27 +00:00
|
|
|
SPDX-FileCopyrightText: syuilo and misskey-project
|
2023-07-27 05:31:52 +00:00
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
-->
|
|
|
|
|
2019-04-29 00:11:57 +00:00
|
|
|
<template>
|
2023-05-27 02:35:26 +00:00
|
|
|
<section>
|
2023-06-01 08:19:46 +00:00
|
|
|
<component
|
|
|
|
:is="'h' + h"
|
|
|
|
:class="{
|
|
|
|
'h2': h === 2,
|
|
|
|
'h3': h === 3,
|
|
|
|
'h4': h === 4,
|
|
|
|
}"
|
|
|
|
>
|
|
|
|
{{ block.title }}
|
|
|
|
</component>
|
2019-04-29 00:11:57 +00:00
|
|
|
|
2023-05-27 02:35:26 +00:00
|
|
|
<div class="_gaps">
|
2023-05-14 01:50:21 +00:00
|
|
|
<XBlock v-for="child in block.children" :key="child.id" :page="page" :block="child" :h="h + 1"/>
|
2019-04-29 00:11:57 +00:00
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</template>
|
|
|
|
|
2023-05-14 01:50:21 +00:00
|
|
|
<script lang="ts" setup>
|
|
|
|
import { defineAsyncComponent } from 'vue';
|
|
|
|
import * as Misskey from 'misskey-js';
|
|
|
|
|
|
|
|
const XBlock = defineAsyncComponent(() => import('./page.block.vue'));
|
|
|
|
|
|
|
|
defineProps<{
|
2024-01-30 10:53:53 +00:00
|
|
|
block: Misskey.entities.PageBlock,
|
2023-05-14 01:50:21 +00:00
|
|
|
h: number,
|
|
|
|
page: Misskey.entities.Page,
|
|
|
|
}>();
|
2019-04-29 00:11:57 +00:00
|
|
|
</script>
|
|
|
|
|
2023-05-27 02:35:26 +00:00
|
|
|
<style lang="scss" module>
|
|
|
|
.h2 {
|
|
|
|
font-size: 1.35em;
|
|
|
|
margin: 0 0 0.5em 0;
|
|
|
|
}
|
2019-04-29 00:11:57 +00:00
|
|
|
|
2023-05-27 02:35:26 +00:00
|
|
|
.h3 {
|
|
|
|
font-size: 1em;
|
|
|
|
margin: 0 0 0.5em 0;
|
|
|
|
}
|
2019-04-29 00:11:57 +00:00
|
|
|
|
2023-05-27 02:35:26 +00:00
|
|
|
.h4 {
|
|
|
|
font-size: 1em;
|
|
|
|
margin: 0 0 0.5em 0;
|
2020-01-29 19:37:25 +00:00
|
|
|
}
|
2019-04-29 00:11:57 +00:00
|
|
|
</style>
|