misskey/packages/frontend/src/components/MkFeaturedPhotos.vue

28 lines
623 B
Vue
Raw Normal View History

<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-License-Identifier: AGPL-3.0-only
-->
2020-12-31 00:22:20 +09:00
<template>
2023-01-15 09:14:17 +09:00
<div v-if="meta" :class="$style.root" :style="{ backgroundImage: `url(${ meta.backgroundImageUrl })` }"></div>
2020-12-31 00:22:20 +09:00
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import * as Misskey from 'misskey-js';
2023-09-19 16:37:43 +09:00
import * as os from '@/os.js';
2020-12-31 00:22:20 +09:00
const meta = ref<Misskey.entities.DetailedInstanceMetadata>();
2020-12-31 00:22:20 +09:00
os.api('meta', { detail: true }).then(gotMeta => {
meta.value = gotMeta;
2020-12-31 00:22:20 +09:00
});
</script>
2023-01-15 09:14:17 +09:00
<style lang="scss" module>
.root {
2020-12-31 00:22:20 +09:00
background-position: center;
background-size: cover;
}
</style>