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