profectus-docs/docs/.vitepress/theme/Layout.vue

41 lines
1.1 KiB
Vue
Raw Normal View History

2022-02-28 21:30:17 -06:00
<template>
<Layout>
<template #home>
<main class="home" aria-labelledby="main-title">
2022-03-01 00:05:00 -06:00
<Profectus v-if="showLogo" style="height: 30vmin; margin: auto; display: block" />
<div v-else style="height: 30vmin; margin: auto; display: block" />
2022-02-28 21:30:17 -06:00
<HomeHero />
<HomeFeatures />
<div class="home-content">
<Content />
</div>
<HomeFooter />
</main>
</template>
</Layout>
</template>
<script setup>
2022-03-01 00:05:00 -06:00
import { nextTick, ref } from 'vue';
2022-02-28 21:30:17 -06:00
import DefaultTheme from 'vitepress/theme';
import Profectus from './Profectus.vue';
// I want Profectus above the hero text, so I effectively need to recreate the Home class now
import HomeHero from './home/HomeHero.vue';
import HomeFeatures from './home/HomeFeatures.vue';
import HomeFooter from './home/HomeFooter.vue';
const { Layout } = DefaultTheme;
2022-03-01 00:05:00 -06:00
const showLogo = ref(false);
nextTick(() => showLogo.value = true);
2022-02-28 21:30:17 -06:00
</script>
<style scoped>
.home {
padding-top: var(--header-height);
}
.home-content {
max-width: 960px;
margin: 0px auto;
padding: 0 1.5rem;
}
</style>