2023-10-02 16:14:59 -04:00
|
|
|
<script setup lang="ts">
|
|
|
|
import { theme } from "ant-design-vue";
|
|
|
|
import navbar from "~/components/layouts/navbar.vue";
|
|
|
|
import cfooter from "~/components/layouts/footer.vue";
|
2023-10-05 01:59:23 -04:00
|
|
|
import sidebarThing from "~/components/layouts/sidebar.vue";
|
2023-10-02 16:14:59 -04:00
|
|
|
import icon from "~/components/icon.vue";
|
2023-10-05 01:59:23 -04:00
|
|
|
import { ISidebarItem } from "~/models/sidebarEntry";
|
2023-10-02 16:14:59 -04:00
|
|
|
const { useToken } = theme;
|
|
|
|
const { token } = useToken();
|
|
|
|
|
2023-10-05 01:59:23 -04:00
|
|
|
const col = token.value.colorText;
|
2023-10-02 16:14:59 -04:00
|
|
|
|
2023-10-05 01:59:23 -04:00
|
|
|
const { data: totals } = await useApiFetch<any>("/totals");
|
|
|
|
|
|
|
|
const collapsed = ref<boolean>(true);
|
|
|
|
|
|
|
|
const sideTriggerVal = computed(() => {
|
|
|
|
let th = collapsed.value ? " collapsed" : "";
|
|
|
|
return `sider-trigger${th}`;
|
|
|
|
});
|
|
|
|
|
|
|
|
// const {data: rd } = await useApiFetch<ISidebarItem[]>("/sidebar")
|
|
|
|
// provide("sidebar-items", rd.data)
|
|
|
|
|
|
|
|
provide("collapsed", collapsed);
|
|
|
|
const loaded = inject<Ref<boolean>>("loaded");
|
2023-10-02 16:14:59 -04:00
|
|
|
let darko = inject("dark");
|
|
|
|
</script>
|
|
|
|
<template>
|
2023-10-05 01:59:23 -04:00
|
|
|
<a-layout class="ylayout" has-sider>
|
|
|
|
<a-layout class="mlayout">
|
|
|
|
<a-layout-header class="alayhead">
|
|
|
|
<div style="display: flex; align-items: center; flex-wrap: wrap">
|
|
|
|
<a-typography-title class="siteTitle"> Rockfic </a-typography-title>
|
|
|
|
<div class="stat-block">
|
|
|
|
<div>
|
|
|
|
<a-typography-text> Band fiction that rocks </a-typography-text>
|
|
|
|
<a-typography-text type="secondary">
|
|
|
|
With {{ totals.stories }} stories by
|
|
|
|
{{ totals.authors }} authors
|
|
|
|
</a-typography-text>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<navbar />
|
|
|
|
</div>
|
|
|
|
</a-layout-header>
|
|
|
|
<a-layout-content>
|
|
|
|
<slot />
|
|
|
|
<!-- <a-float-button
|
|
|
|
type="primary"
|
|
|
|
:style="{ height: '50px', width: '50px' }"
|
|
|
|
tooltip="Post a new Story" @click="() => navigateTo('/new-story')"
|
2023-10-02 16:14:59 -04:00
|
|
|
>
|
2023-10-05 01:59:23 -04:00
|
|
|
<template #icon>
|
|
|
|
<icon istyle="regular" name="file-plus" />
|
|
|
|
</template>
|
|
|
|
</a-float-button> -->
|
|
|
|
</a-layout-content>
|
|
|
|
<a-layout-footer style="bottom: 100%">
|
|
|
|
<cfooter />
|
|
|
|
</a-layout-footer>
|
|
|
|
</a-layout>
|
|
|
|
<a-layout-sider
|
2023-10-05 19:56:14 -04:00
|
|
|
:zero-width-trigger-style="{
|
|
|
|
background: '#e92678',
|
|
|
|
padding: '1.2em',
|
|
|
|
position: 'fixed',
|
|
|
|
right: 0,
|
|
|
|
borderRadius: '15%',
|
|
|
|
color: 'white',
|
|
|
|
border: '2.4px solid #fff',
|
|
|
|
top: '75vh',
|
|
|
|
}"
|
2023-10-05 01:59:23 -04:00
|
|
|
:theme="darko ? 'dark' : 'light'"
|
2023-10-05 19:56:14 -04:00
|
|
|
:breakpoint="'lg'"
|
2023-10-05 01:59:23 -04:00
|
|
|
v-model:collapsed="collapsed"
|
|
|
|
:collapsible="true"
|
2023-10-05 19:56:14 -04:00
|
|
|
:collapsed-width="0"
|
2023-10-05 01:59:23 -04:00
|
|
|
:style="{
|
|
|
|
color: col,
|
2023-10-05 19:56:14 -04:00
|
|
|
height: '100%',
|
|
|
|
position: 'fixed',
|
|
|
|
right: '0px',
|
2023-10-05 01:59:23 -04:00
|
|
|
}"
|
|
|
|
>
|
|
|
|
<sidebar-thing />
|
2023-10-05 19:56:14 -04:00
|
|
|
<template #trigger>
|
|
|
|
<div class="outerst" @click="() => (collapsed = !collapsed)">
|
|
|
|
<div :class="sideTriggerVal">
|
|
|
|
<icon istyle="solid" name="chevron-right" :size="30" />
|
|
|
|
</div>
|
2023-10-02 16:14:59 -04:00
|
|
|
</div>
|
2023-10-05 19:56:14 -04:00
|
|
|
</template>
|
2023-10-05 01:59:23 -04:00
|
|
|
</a-layout-sider>
|
2023-10-02 16:14:59 -04:00
|
|
|
</a-layout>
|
2023-10-05 01:59:23 -04:00
|
|
|
<!-- <div class="mlayout">
|
|
|
|
<a-skeleton/>
|
|
|
|
<a-skeleton/>
|
|
|
|
<a-skeleton/>
|
|
|
|
<a-skeleton/>
|
|
|
|
<a-skeleton/>
|
|
|
|
<a-skeleton/>
|
|
|
|
</div> -->
|
2023-10-02 16:14:59 -04:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<style scoped>
|
2023-10-05 01:59:23 -04:00
|
|
|
.stat-block {
|
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
|
2023-10-05 19:56:14 -04:00
|
|
|
.ylayout {
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
2023-10-05 01:59:23 -04:00
|
|
|
.sideWrap {
|
|
|
|
height: 100vh;
|
|
|
|
right: -1rem;
|
|
|
|
width: inherit;
|
|
|
|
/* display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: space-between;
|
|
|
|
height: 100%;
|
|
|
|
padding-bottom: 2em;
|
|
|
|
overflow-x: "clip";
|
|
|
|
height: "100vh";
|
|
|
|
width: 80px !important;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
border-left: 2px solid #ffcbe5; */
|
|
|
|
}
|
|
|
|
|
|
|
|
.sideWrap > * {
|
|
|
|
position: fixed;
|
|
|
|
right: 50;
|
|
|
|
}
|
|
|
|
|
|
|
|
.stat-block > div {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mlayout,
|
|
|
|
footer {
|
|
|
|
padding: 1.5em;
|
|
|
|
}
|
|
|
|
|
|
|
|
@media (min-width: 760px) {
|
|
|
|
.stat-block > div {
|
|
|
|
}
|
|
|
|
|
|
|
|
.mlayout {
|
|
|
|
padding: 3em;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mlayout > footer {
|
|
|
|
padding: 0;
|
|
|
|
/* padding-right: calc(4em + 90px); */
|
|
|
|
}
|
|
|
|
|
|
|
|
.mlayout {
|
|
|
|
/* padding-right: calc(4em + 90px); */
|
|
|
|
background: unset !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
.alayhead {
|
|
|
|
display: inline-block;
|
|
|
|
flex-direction: row;
|
|
|
|
align-items: center;
|
|
|
|
/* background: inherit !important; */
|
|
|
|
height: unset !important;
|
|
|
|
margin-bottom: 1.5em;
|
|
|
|
width: 100%;
|
|
|
|
/* margin-right: auto; */
|
|
|
|
}
|
|
|
|
|
|
|
|
.alayhead > div {
|
|
|
|
width: 100% !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
.siteTitle {
|
|
|
|
display: inline-block;
|
|
|
|
min-width: unset !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
.alayhead > div {
|
|
|
|
flex-direction: row !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-10-02 16:14:59 -04:00
|
|
|
.siteTitle {
|
2023-10-05 01:59:23 -04:00
|
|
|
/* min-width: max-content; */
|
2023-10-02 16:14:59 -04:00
|
|
|
font-weight: normal;
|
2023-10-05 01:59:23 -04:00
|
|
|
color: #ff2883 !important;
|
|
|
|
font-family: "jandles";
|
|
|
|
font-size: 5em;
|
|
|
|
margin: 0;
|
|
|
|
display: block;
|
|
|
|
min-width: 100%;
|
2023-10-02 16:14:59 -04:00
|
|
|
/* float: left; */
|
|
|
|
}
|
|
|
|
|
2023-10-05 01:59:23 -04:00
|
|
|
.sider-trigger {
|
2023-10-05 19:56:14 -04:00
|
|
|
position: relative;
|
2023-10-05 01:59:23 -04:00
|
|
|
/* display: flex; */
|
|
|
|
/* padding-left: 4.8em;
|
|
|
|
padding-right: 1.8em; */
|
|
|
|
}
|
|
|
|
|
2023-10-05 19:56:14 -04:00
|
|
|
.sider-trigger.collapsed {
|
|
|
|
left: 0;
|
|
|
|
}
|
|
|
|
|
2023-10-05 01:59:23 -04:00
|
|
|
.sider-trigger.collapsed i {
|
|
|
|
/* transform: rotate3d(0, 1, 0, 180deg); */
|
2023-10-05 19:56:14 -04:00
|
|
|
position: relative;
|
2023-10-05 01:59:23 -04:00
|
|
|
transform: rotate(540deg);
|
|
|
|
}
|
|
|
|
|
|
|
|
.sider-trigger i,
|
|
|
|
.sider-trigger.collapsed i {
|
|
|
|
transition: all 0.75s ease-in-out;
|
|
|
|
}
|
|
|
|
|
2023-10-02 16:14:59 -04:00
|
|
|
.alayhead {
|
|
|
|
display: flex;
|
2023-10-05 01:59:23 -04:00
|
|
|
flex-direction: column;
|
|
|
|
align-items: baseline;
|
2023-10-02 16:14:59 -04:00
|
|
|
/* background: inherit !important; */
|
|
|
|
height: unset !important;
|
|
|
|
margin-bottom: 1.5em;
|
2023-10-05 01:59:23 -04:00
|
|
|
padding-left: 0.5em;
|
|
|
|
padding-right: 0.5em;
|
|
|
|
width: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
.alayhead > div {
|
|
|
|
flex-direction: column;
|
2023-10-02 16:14:59 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
.alayhead > div > * + * {
|
|
|
|
margin-left: 1.2em;
|
|
|
|
}
|
|
|
|
</style>
|
2023-10-05 01:59:23 -04:00
|
|
|
<style>
|
|
|
|
body[data-theme="dark"] .ant-layout > *,
|
|
|
|
body[data-theme="dark"] .ant-layout {
|
|
|
|
background: #141414 !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
.ant-layout-sider-trigger {
|
|
|
|
background: inherit !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
.ant-menu-light {
|
|
|
|
background: inherit !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
.ant-layout-sider-children {
|
|
|
|
/* display: flex; */
|
|
|
|
flex-direction: column;
|
|
|
|
}
|
|
|
|
</style>
|