80 lines
3.1 KiB
Vue
Raw Normal View History

2024-09-26 01:05:18 +05:00
<script setup lang="ts">
import { ref, onMounted } from "vue";
import { headMeta, devel } from "@";
2024-09-26 01:05:18 +05:00
import NavBar from "@/components/NavBar.vue";
import DocumentationIcon from "@/components/DocumentationIcon.vue";
import DiscordIcon from "@/components/DiscordIcon.vue";
2024-10-10 22:14:08 +05:00
import MatrixIcon from "@/components/MatrixIcon.vue";
import GitIcon from "@/components/GitIcon.vue";
import VinylIcon from "@/components/VinylIcon.vue";
2024-09-26 01:05:18 +05:00
import Player from "@/components/Player.vue";
import Error from "@/components/Error.vue";
const title = ref(null);
const author = ref(null);
const discord = ref(null);
2024-10-10 22:14:08 +05:00
const matrix = ref(null);
const git = ref(null);
const documentation = ref(null);
onMounted(() => {
title.value = document.getElementsByTagName("title")[0].text;
author.value = devel ? "L-Nafaryus" : headMeta("author");
discord.value = devel ? "http://example.com" : headMeta("discord");
2024-10-10 22:14:08 +05:00
matrix.value = devel ? "http://example.com" : headMeta("matrix");
git.value = devel ? "http://example.com" : headMeta("git");
documentation.value = devel ? "http://example.com" : headMeta("documentation");
});
2024-09-26 01:05:18 +05:00
</script>
<template>
<VinylIcon class="absolute h-full mx-auto w-full -z-10 opacity-15" />
2024-09-26 01:05:18 +05:00
<div class="flex-grow">
<NavBar>
<template #left>
<RouterLink class="link-button font-bold" to="/">{{ title }}</RouterLink>
2024-09-26 01:05:18 +05:00
</template>
<template #right>
2024-10-11 15:52:24 +05:00
<a v-if="matrix" :href="matrix" target="_blank" rel="noreferrer"
2024-10-10 22:14:08 +05:00
class="flex justify-center items-center space-x-1 text-ctp-surface0 link-button font-bold">
<MatrixIcon />
<span class="hidden sm:inline">Matrix</span>
</a>
<a v-if="discord" :href="discord" target="_blank" rel="noreferrer"
class="flex justify-center items-center space-x-1 text-ctp-surface0 link-button font-bold">
<DiscordIcon />
<span class="hidden sm:inline">Discord</span>
</a>
2024-09-26 01:05:18 +05:00
</template>
</NavBar>
<main class="w-full max-w-[1000px] mx-auto">
<slot></slot>
</main>
</div>
<Player />
<footer class="pb-2 pt-2 pl-5 pr-5 bg-ctp-mantle">
<div class="flex justify-between max-w-[1200px] mx-auto">
<span v-if="author" class="text-ctp-peach font-bold items-center flex">Made by {{ author }}</span>
<div class="flex space-x-1">
2024-10-10 22:14:08 +05:00
<a v-if="documentation" :href="documentation" target="_blank" rel="noreferrer"
class="flex justify-center items-center space-x-1 text-ctp-peach link-button font-bold bg-ctp-mantle">
<DocumentationIcon />
<span class="hidden sm:inline">Docs</span>
</a>
2024-10-10 22:14:08 +05:00
<a v-if="git" :href="git" target="_blank" rel="noreferrer"
class="flex justify-center items-center space-x-1 text-ctp-peach link-button font-bold bg-ctp-mantle">
<GitIcon />
<span class="hidden sm:inline">Git</span>
</a>
2024-09-26 01:05:18 +05:00
</div>
2024-09-26 01:05:18 +05:00
</div>
</footer>
</template>