hippofish/packages/frontend/src/ui/minimum.vue

42 lines
963 B
Vue
Raw Normal View History

<!--
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
<template>
<div :class="$style.root">
<div style="container-type: inline-size;">
<RouterView/>
</div>
<XCommon/>
</div>
</template>
<script lang="ts" setup>
import { provide, ComputedRef, ref } from 'vue';
import XCommon from './_common_/common.vue';
2023-09-19 09:37:43 +02:00
import { PageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata.js';
import { instanceName } from '@/config.js';
import { mainRouter } from '@/router/main.js';
const pageMetadata = ref<null | ComputedRef<PageMetadata>>();
provide('router', mainRouter);
provideMetadataReceiver((info) => {
pageMetadata.value = info;
if (pageMetadata.value.value) {
document.title = `${pageMetadata.value.value.title} | ${instanceName}`;
}
});
document.documentElement.style.overflowY = 'scroll';
</script>
2023-05-19 09:30:39 +02:00
<style lang="scss" module>
.root {
min-height: 100dvh;
box-sizing: border-box;
}
</style>