2019-04-29 02:11:57 +02:00
|
|
|
<template>
|
2023-05-27 04:35:26 +02:00
|
|
|
<section>
|
|
|
|
<component :is="'h' + h" :class="h < 5 ? $style['h' + h] : null">{{ block.title }}</component>
|
2019-04-29 02:11:57 +02:00
|
|
|
|
2023-05-27 04:35:26 +02:00
|
|
|
<div class="_gaps">
|
2023-05-14 03:50:21 +02:00
|
|
|
<XBlock v-for="child in block.children" :key="child.id" :page="page" :block="child" :h="h + 1"/>
|
2019-04-29 02:11:57 +02:00
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</template>
|
|
|
|
|
2023-05-14 03:50:21 +02: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 02:11:57 +02:00
|
|
|
</script>
|
|
|
|
|
2023-05-27 04:35:26 +02:00
|
|
|
<style lang="scss" module>
|
|
|
|
.h2 {
|
|
|
|
font-size: 1.35em;
|
|
|
|
margin: 0 0 0.5em 0;
|
|
|
|
}
|
2019-04-29 02:11:57 +02:00
|
|
|
|
2023-05-27 04:35:26 +02:00
|
|
|
.h3 {
|
|
|
|
font-size: 1em;
|
|
|
|
margin: 0 0 0.5em 0;
|
|
|
|
}
|
2019-04-29 02:11:57 +02:00
|
|
|
|
2023-05-27 04:35:26 +02:00
|
|
|
.h4 {
|
|
|
|
font-size: 1em;
|
|
|
|
margin: 0 0 0.5em 0;
|
2020-01-29 20:37:25 +01:00
|
|
|
}
|
2019-04-29 02:11:57 +02:00
|
|
|
</style>
|