2023-07-27 08:31:52 +03:00
|
|
|
<!--
|
|
|
|
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
-->
|
|
|
|
|
2019-04-29 03:11:57 +03:00
|
|
|
<template>
|
2023-05-27 05:35:26 +03:00
|
|
|
<section>
|
2023-06-01 11:19:46 +03:00
|
|
|
<component
|
|
|
|
:is="'h' + h"
|
|
|
|
:class="{
|
|
|
|
'h2': h === 2,
|
|
|
|
'h3': h === 3,
|
|
|
|
'h4': h === 4,
|
|
|
|
}"
|
|
|
|
>
|
|
|
|
{{ block.title }}
|
|
|
|
</component>
|
2019-04-29 03:11:57 +03:00
|
|
|
|
2023-05-27 05:35:26 +03:00
|
|
|
<div class="_gaps">
|
2023-05-14 04:50:21 +03:00
|
|
|
<XBlock v-for="child in block.children" :key="child.id" :page="page" :block="child" :h="h + 1"/>
|
2019-04-29 03:11:57 +03:00
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</template>
|
|
|
|
|
2023-05-14 04:50:21 +03: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 03:11:57 +03:00
|
|
|
</script>
|
|
|
|
|
2023-05-27 05:35:26 +03:00
|
|
|
<style lang="scss" module>
|
|
|
|
.h2 {
|
|
|
|
font-size: 1.35em;
|
|
|
|
margin: 0 0 0.5em 0;
|
|
|
|
}
|
2019-04-29 03:11:57 +03:00
|
|
|
|
2023-05-27 05:35:26 +03:00
|
|
|
.h3 {
|
|
|
|
font-size: 1em;
|
|
|
|
margin: 0 0 0.5em 0;
|
|
|
|
}
|
2019-04-29 03:11:57 +03:00
|
|
|
|
2023-05-27 05:35:26 +03:00
|
|
|
.h4 {
|
|
|
|
font-size: 1em;
|
|
|
|
margin: 0 0 0.5em 0;
|
2020-01-29 21:37:25 +02:00
|
|
|
}
|
2019-04-29 03:11:57 +03:00
|
|
|
</style>
|