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

28 lines
628 B
Vue

<!--
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
<template>
<div v-if="meta" :class="$style.root" :style="{ backgroundImage: `url(${ meta.backgroundImageUrl })` }"></div>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import * as Misskey from 'misskey-js';
import { misskeyApi } from '@/scripts/misskey-api.js';
const meta = ref<Misskey.entities.MetaResponse>();
misskeyApi('meta', { detail: true }).then(gotMeta => {
meta.value = gotMeta;
});
</script>
<style lang="scss" module>
.root {
background-position: center;
background-size: cover;
}
</style>