2023-05-15 19:08:46 +09:00
|
|
|
<template>
|
2023-07-07 20:18:06 +09:00
|
|
|
<div :class="$style.root">
|
|
|
|
<div style="container-type: inline-size;">
|
|
|
|
<RouterView/>
|
|
|
|
</div>
|
2023-05-15 19:08:46 +09:00
|
|
|
|
|
|
|
<XCommon/>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
import { provide, ComputedRef } from 'vue';
|
|
|
|
import XCommon from './_common_/common.vue';
|
|
|
|
import { mainRouter } from '@/router';
|
|
|
|
import { PageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata';
|
|
|
|
import { instanceName } from '@/config';
|
|
|
|
|
|
|
|
let pageMetadata = $ref<null | ComputedRef<PageMetadata>>();
|
|
|
|
|
|
|
|
provide('router', mainRouter);
|
|
|
|
provideMetadataReceiver((info) => {
|
|
|
|
pageMetadata = info;
|
|
|
|
if (pageMetadata.value) {
|
|
|
|
document.title = `${pageMetadata.value.title} | ${instanceName}`;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
document.documentElement.style.overflowY = 'scroll';
|
|
|
|
</script>
|
|
|
|
|
2023-05-19 16:30:39 +09:00
|
|
|
<style lang="scss" module>
|
|
|
|
.root {
|
2023-05-15 19:08:46 +09:00
|
|
|
min-height: 100dvh;
|
|
|
|
box-sizing: border-box;
|
|
|
|
}
|
|
|
|
</style>
|