2019-04-29 02:11:57 +02:00
|
|
|
<template>
|
2023-04-08 02:01:42 +02:00
|
|
|
<section class="sdgxphyu">
|
|
|
|
<component :is="'h' + h">{{ block.title }}</component>
|
2019-04-29 02:11:57 +02:00
|
|
|
|
2023-04-08 02:01:42 +02:00
|
|
|
<div class="children">
|
|
|
|
<XBlock
|
|
|
|
v-for="child in block.children"
|
|
|
|
:key="child.id"
|
|
|
|
:block="child"
|
|
|
|
:hpml="hpml"
|
|
|
|
:h="h + 1"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</section>
|
2019-04-29 02:11:57 +02:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2023-04-08 02:01:42 +02:00
|
|
|
import { defineComponent, defineAsyncComponent, PropType } from "vue";
|
|
|
|
import * as os from "@/os";
|
|
|
|
import { SectionBlock } from "@/scripts/hpml/block";
|
|
|
|
import { Hpml } from "@/scripts/hpml/evaluator";
|
2019-04-29 02:11:57 +02:00
|
|
|
|
2020-10-17 13:12:00 +02:00
|
|
|
export default defineComponent({
|
2020-10-19 02:30:21 +02:00
|
|
|
components: {
|
2023-04-08 02:01:42 +02:00
|
|
|
XBlock: defineAsyncComponent(() => import("./page.block.vue")),
|
2020-10-19 02:30:21 +02:00
|
|
|
},
|
2019-04-29 02:11:57 +02:00
|
|
|
props: {
|
2021-01-30 02:59:05 +01:00
|
|
|
block: {
|
|
|
|
type: Object as PropType<SectionBlock>,
|
2023-04-08 02:01:42 +02:00
|
|
|
required: true,
|
2019-04-29 02:11:57 +02:00
|
|
|
},
|
2020-04-20 14:35:27 +02:00
|
|
|
hpml: {
|
2021-01-30 02:59:05 +01:00
|
|
|
type: Object as PropType<Hpml>,
|
2023-04-08 02:01:42 +02:00
|
|
|
required: true,
|
2019-04-29 02:11:57 +02:00
|
|
|
},
|
|
|
|
h: {
|
2023-04-08 02:01:42 +02:00
|
|
|
required: true,
|
|
|
|
},
|
2019-04-29 02:11:57 +02:00
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2020-01-29 20:37:25 +01:00
|
|
|
<style lang="scss" scoped>
|
|
|
|
.sdgxphyu {
|
|
|
|
margin: 1.5em 0;
|
2019-04-29 02:11:57 +02:00
|
|
|
|
2020-01-29 20:37:25 +01:00
|
|
|
> h2 {
|
|
|
|
font-size: 1.35em;
|
|
|
|
margin: 0 0 0.5em 0;
|
|
|
|
}
|
2019-04-29 02:11:57 +02:00
|
|
|
|
2020-01-29 20:37:25 +01:00
|
|
|
> h3 {
|
|
|
|
font-size: 1em;
|
|
|
|
margin: 0 0 0.5em 0;
|
|
|
|
}
|
2019-04-29 02:11:57 +02:00
|
|
|
|
2020-01-29 20:37:25 +01:00
|
|
|
> h4 {
|
|
|
|
font-size: 1em;
|
|
|
|
margin: 0 0 0.5em 0;
|
|
|
|
}
|
2019-04-29 02:11:57 +02:00
|
|
|
|
2020-01-29 20:37:25 +01:00
|
|
|
> .children {
|
2019-04-29 02:11:57 +02:00
|
|
|
//padding 16px
|
2020-01-29 20:37:25 +01:00
|
|
|
}
|
|
|
|
}
|
2019-04-29 02:11:57 +02:00
|
|
|
</style>
|