docs/.vitepress/theme/components/OgImageTemplate.vue

f6e58ff382cd571d2dcefa40774366f4d8d6ecbe
wotaku/docs/.vitepress/theme/components/OgImageTemplate.vue history · blame · raw

41 lines · 1376 bytes

 1<!--
 2  Copyright (c) 2024 taskylizard
 3
 4  Licensed under the Apache License, Version 2.0 (the "License");
 5  you may not use this file except in compliance with the License.
 6  You may obtain a copy of the License at
 7
 8  http://www.apache.org/licenses/LICENSE-2.0
 9
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15-->
16<script setup lang="ts">
17defineProps<{ title: string; description?: string; image: string }>()
18</script>
19
20<template>
21  <span
22    tw="w-full h-full bg-black flex flex-col"
23    :style="{
24      backgroundImage: `url(${image})`
25    }"
26  >
27    <span
28      tw="p-10 w-full min-h-0 grow flex flex-col items-center justify-between"
29    >
30      <span tw="w-full flex justify-between items-center text-5xl font-medium">
31        <span tw="flex items-center">
32          <span tw="text-zinc-100 ml-2 mt-1 font-semibold">wotaku.wiki</span>
33        </span>
34      </span>
35      <span tw="w-full pr-56 flex flex-col items-start justify-end">
36        <span style="color: #f7f7f7" tw="text-6xl font-bold" v-html="title" />
37      </span>
38    </span>
39    <span tw="shrink-0 h-2 w-full flex" />
40  </span>
41</template>