From feacb9b754754be980c4525690d31267da304894 Mon Sep 17 00:00:00 2001 From: Benjamin Singleton <19498453+tetrogem@users.noreply.github.com> Date: Fri, 13 Feb 2026 23:55:39 -0600 Subject: [PATCH] wip: Discord Server Rules page, fixed ESLint restriction on link components, added linking to specific element ids on internal routes --- apps/vdn-static/eslint.config.js | 7 +- apps/vdn-static/index.html | 28 ++- apps/vdn-static/src/App.vue | 19 +- apps/vdn-static/src/assets/style.scss | 14 +- .../src/components/organisms/SmartLink.vue | 39 ++- apps/vdn-static/src/i18n/locale.ts | 27 ++ apps/vdn-static/src/locales/en_US.ts | 9 + apps/vdn-static/src/pages/discord/rules.vue | 238 +++++++++++++++++- apps/vdn-static/src/pages/resources.vue | 4 +- apps/vdn-static/src/utils/css.ts | 2 +- apps/vdn-static/src/utils/smart-dest.ts | 5 +- 11 files changed, 350 insertions(+), 42 deletions(-) diff --git a/apps/vdn-static/eslint.config.js b/apps/vdn-static/eslint.config.js index a65c215..166fff0 100644 --- a/apps/vdn-static/eslint.config.js +++ b/apps/vdn-static/eslint.config.js @@ -14,6 +14,7 @@ export default defineConfig([ ...vue.configs["flat/essential"], ], files: ["./src/**/*.{js,ts,vue}"], + plugins: { vue }, languageOptions: { ecmaVersion: "latest", sourceType: "module", @@ -27,11 +28,11 @@ export default defineConfig([ }, }, rules: { - "vue/no-restricted-component-names": [ + "vue/no-restricted-html-elements": [ "error", { - name: "RouterLink", - message: "Use SmartLink instead of RouterLink.", + element: ["a", "RouterLink"], + message: "Use instead", }, ], // allow interfaces to only extend another interface without adding properties diff --git a/apps/vdn-static/index.html b/apps/vdn-static/index.html index 0dc687b..f968c16 100644 --- a/apps/vdn-static/index.html +++ b/apps/vdn-static/index.html @@ -1,15 +1,19 @@ - - - - - - - Viossa.net - - -
- - + + + + + + + + Viossa.net + + + +
+ + + diff --git a/apps/vdn-static/src/App.vue b/apps/vdn-static/src/App.vue index e86c762..6b6ae2d 100644 --- a/apps/vdn-static/src/App.vue +++ b/apps/vdn-static/src/App.vue @@ -4,7 +4,7 @@ import { computed, ref, type Ref } from "vue"; import LocalePicker from "./components/organisms/LocalePicker.vue"; import { vOnClickOutside } from "@vueuse/components"; import { useLocale } from "./i18n"; -import { RouterLink, useRouter } from "vue-router"; +import { useRouter } from "vue-router"; import SmartLink from "./components/organisms/SmartLink.vue"; import type { SmartDest } from "./utils/smart-dest"; import type { Locale } from "./i18n/locale"; @@ -44,13 +44,16 @@ const navbarItems = computed(() => const to = ((): SmartDest => { switch (id) { case "whatIsViossa": { - return { type: "internal", internal: "/" }; + return { type: "internal", internal: { route: "/" } }; } case "resources": { - return { type: "internal", internal: "/resources" }; + return { + type: "internal", + internal: { route: "/resources" }, + }; } case "kotoba": { - return { type: "internal", internal: "/kotoba" }; + return { type: "internal", internal: { route: "/kotoba" } }; } } })(); @@ -68,9 +71,11 @@ const navbarItems = computed(() => role="navigation" aria-label="main navigation">