Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/frontend/src/App.vue
diff options
context:
space:
mode:
authorLeitwolf2026-10-18 02:22:48 +0300
committerGitHub2026-10-18 02:22:48 +0300
commitc2eb3d208b37826167496cfdf657ffca33fef703 (patch)
tree7e459be0fa4ac04c126413e405c3939e26cb86bc /frontend/src/App.vue
parent7190d8a0911b4cea07cc502a1e471f0889b6d20b (diff)
parent43c431a793affe2fa41ead816268d6af760f72d0 (diff)
downloadwebsite-c2eb3d208b37826167496cfdf657ffca33fef703.tar.gz
Merge pull request #40 from Progmasoft/design/landing-pages
Give each site a calm landing page with a "Why" section
Diffstat (limited to 'frontend/src/App.vue')
-rw-r--r--frontend/src/App.vue20
1 files changed, 17 insertions, 3 deletions
diff --git a/frontend/src/App.vue b/frontend/src/App.vue
index 0f2ae03..79a418b 100644
--- a/frontend/src/App.vue
+++ b/frontend/src/App.vue
@@ -6,7 +6,8 @@ import { computed } from "vue";
import { RouterLink, RouterView } from "vue-router";
import { localeLabels } from "./locales";
import { locale, supportedLocales, theme } from "./preferences";
-import { forumUrl, site, siteHome, siteUrl, type Site } from "./site";
+import { contentRoutes } from "./content/routes";
+import { forumUrl, site, siteHome, siteTopics, siteUrl, type Site } from "./site";
const labels = {
"en-US": {
@@ -70,6 +71,14 @@ const siblings = (["language", "talac", "tazel"] as const)
href: siteUrl(other, siteHome[other], hostname),
}));
+// Talac and Tazel list their documentation topics in the header, by the names their sidebars use.
+const topicLinks = computed(() =>
+ siteTopics[site].map((path) => {
+ const route = contentRoutes[site].find((candidate) => candidate.path === path);
+ return { path, label: route ? route.topic[locale.value].nav : path };
+ }),
+);
+
function toggleTheme() {
theme.value = theme.value === "dark" ? "light" : "dark";
}
@@ -79,17 +88,22 @@ function toggleTheme() {
<a class="skip-link" href="#main">Skip to content</a>
<div class="site-shell">
<header class="site-header">
- <RouterLink class="brand" :to="siteHome[site]" :aria-label="`${brand} ${copy.home}`">
+ <RouterLink class="brand" to="/" :aria-label="`${brand} ${copy.home}`">
<img src="/tala-mark.svg" width="31" height="31" alt="" />
<span>{{ brand }}</span>
</RouterLink>
+ <span class="status-badge">{{ copy.status }}</span>
<nav class="primary-nav" aria-label="Primary navigation">
<template v-if="site === 'language'">
- <RouterLink to="/">{{ copy.home }}</RouterLink>
<RouterLink to="/docs/overview">{{ copy.overview }}</RouterLink>
<RouterLink to="/docs/getting-started">{{ copy.start }}</RouterLink>
<RouterLink to="/docs/syntax">{{ copy.syntax }}</RouterLink>
</template>
+ <template v-else>
+ <RouterLink v-for="topic in topicLinks" :key="topic.path" :to="topic.path">{{
+ topic.label
+ }}</RouterLink>
+ </template>
<a v-for="sibling in siblings" :key="sibling.href" :href="sibling.href">{{
sibling.label
}}</a>