Files

92 lines
2.2 KiB
Vue
Raw Permalink Normal View History

2021-12-27 13:22:13 -05:00
<template>
2022-04-28 18:15:28 -04:00
<!-- min-height overrides vertical centering from the parent default.vue layout -->
<div
class="width-constraint flex-wrapper"
style="min-height: calc(100vh - 10rem); position: relative"
>
<!-- docs navigation -->
<v-list
class="py-0 mr-3"
2022-01-05 11:30:55 -05:00
style="
background: transparent;
position: sticky;
2022-04-28 18:15:28 -04:00
top: 6rem;
align-self: flex-start;
2022-01-05 11:30:55 -05:00
"
2022-01-04 19:11:33 -05:00
>
2022-04-28 18:15:28 -04:00
<v-list-item
2022-04-29 13:30:06 -04:00
v-for="(link, i) in links"
2022-04-28 18:15:28 -04:00
:key="i"
2022-04-29 13:30:06 -04:00
:to="link.to"
2022-04-28 18:15:28 -04:00
router
class="mb-4"
color="primary"
style="overflow: hidden !important; border-radius: 0.75rem"
>
<v-list-item-title style="text-align: right">
2022-04-29 13:30:06 -04:00
<v-list-item-title
v-text="$vuetify.lang.t(`$vuetify.api.${link.name}.title`)"
/>
2022-04-28 18:15:28 -04:00
</v-list-item-title>
<v-list-item-icon>
2022-04-29 13:30:06 -04:00
<v-icon v-text="link.icon" />
2022-04-28 18:15:28 -04:00
</v-list-item-icon>
</v-list-item>
</v-list>
2021-12-27 13:49:09 -05:00
2022-04-28 18:15:28 -04:00
<!-- docs content -->
2021-12-27 14:39:54 -05:00
<v-card
class="text-left glass pa-6"
2022-01-04 19:11:33 -05:00
style="
2022-04-28 18:15:28 -04:00
flex-grow: 2;
2022-01-04 19:11:33 -05:00
height: max-content;
2022-04-28 18:15:28 -04:00
max-width: 90vw !important;
2022-04-29 13:30:06 -04:00
border-radius: 0.75rem;
2022-01-04 19:11:33 -05:00
"
2021-12-27 14:39:54 -05:00
>
2021-12-27 13:50:31 -05:00
<NuxtChild />
2021-12-27 13:49:09 -05:00
</v-card>
2021-12-27 13:22:13 -05:00
</div>
</template>
2021-12-27 13:49:09 -05:00
<script>
2021-12-27 14:39:54 -05:00
export default {
transition(to, from) {
if (!from) return "swoop-in";
let routes = ["index", "install", "docs", "help", "faq", "donate", "links"];
if (routes.indexOf(to.name) < 0) return "swoop-out";
if (routes.indexOf(from.name) < 0) return "swoop-in";
return routes.indexOf(to.name) > routes.indexOf(from.name)
? "swoop-left"
: "swoop-right";
},
2021-12-27 14:39:54 -05:00
data() {
return {
//--- Links To Generate Above ---//
links: [
{
2022-04-29 13:30:06 -04:00
name: "rights",
2021-12-27 14:39:54 -05:00
icon: "mdi-book-open-variant",
to: "/docs/usage-rights",
2021-12-27 14:39:54 -05:00
},
{
2022-04-29 13:30:06 -04:00
name: "url",
2021-12-27 14:39:54 -05:00
icon: "mdi-web",
to: "/docs/url",
2021-12-27 14:39:54 -05:00
},
{
2022-04-29 13:30:06 -04:00
name: "endpoints",
2021-12-27 14:39:54 -05:00
icon: "mdi-transit-connection-variant",
to: "/docs/endpoints",
2021-12-27 14:39:54 -05:00
},
{
2022-04-29 13:30:06 -04:00
name: "fetching",
2021-12-27 14:39:54 -05:00
icon: "mdi-school",
to: "/docs/fetching",
2021-12-27 14:39:54 -05:00
},
],
};
},
};
2021-12-27 13:49:09 -05:00
</script>