From d98353d5af5020fca6eceb2a9970624547ce5be6 Mon Sep 17 00:00:00 2001 From: wukko Date: Wed, 4 Sep 2024 20:59:05 +0600 Subject: [PATCH] web/about: about page routing & navigation --- web/i18n/en/about.json | 11 +++ web/src/lib/subnav.ts | 11 +++ web/src/routes/about/+layout.svelte | 90 +++++++++++++++++++++ web/src/routes/about/+page.svelte | 17 +--- web/src/routes/about/community/+page.svelte | 1 + web/src/routes/about/credits/+page.svelte | 1 + web/src/routes/about/faq/+page.svelte | 1 + web/src/routes/about/general/+page.svelte | 1 + web/src/routes/about/help/+page.svelte | 1 + web/src/routes/about/privacy/+page.svelte | 1 + web/src/routes/about/terms/+page.svelte | 1 + web/src/routes/settings/+page.svelte | 6 +- 12 files changed, 127 insertions(+), 15 deletions(-) create mode 100644 web/i18n/en/about.json create mode 100644 web/src/routes/about/+layout.svelte create mode 100644 web/src/routes/about/community/+page.svelte create mode 100644 web/src/routes/about/credits/+page.svelte create mode 100644 web/src/routes/about/faq/+page.svelte create mode 100644 web/src/routes/about/general/+page.svelte create mode 100644 web/src/routes/about/help/+page.svelte create mode 100644 web/src/routes/about/privacy/+page.svelte create mode 100644 web/src/routes/about/terms/+page.svelte diff --git a/web/i18n/en/about.json b/web/i18n/en/about.json new file mode 100644 index 00000000..2ef546de --- /dev/null +++ b/web/i18n/en/about.json @@ -0,0 +1,11 @@ +{ + "page.general": "what's cobalt?", + "page.faq": "FAQ", + + "page.community": "community", + "page.help": "get support", + + "page.privacy": "privacy policy", + "page.terms": "terms and ethics", + "page.credits": "thanks & licenses" +} diff --git a/web/src/lib/subnav.ts b/web/src/lib/subnav.ts index c664160b..0e6bbc6c 100644 --- a/web/src/lib/subnav.ts +++ b/web/src/lib/subnav.ts @@ -10,6 +10,17 @@ const defaultSettingsPage = () => { return "/settings/appearance"; } +const defaultAboutPage = () => { + if (browser) { + if (window.innerWidth <= 750) { + return "/about"; + } + } + + return "/about/general"; +} + export { defaultSettingsPage, + defaultAboutPage } diff --git a/web/src/routes/about/+layout.svelte b/web/src/routes/about/+layout.svelte new file mode 100644 index 00000000..c730fa9d --- /dev/null +++ b/web/src/routes/about/+layout.svelte @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/web/src/routes/about/+page.svelte b/web/src/routes/about/+page.svelte index 3c135053..ae86083d 100644 --- a/web/src/routes/about/+page.svelte +++ b/web/src/routes/about/+page.svelte @@ -1,13 +1,4 @@ - - - - - {$t("tabs.about")} ~ {$t("general.cobalt")} - - - - + diff --git a/web/src/routes/about/community/+page.svelte b/web/src/routes/about/community/+page.svelte new file mode 100644 index 00000000..07d06ff0 --- /dev/null +++ b/web/src/routes/about/community/+page.svelte @@ -0,0 +1 @@ +
community links
diff --git a/web/src/routes/about/credits/+page.svelte b/web/src/routes/about/credits/+page.svelte new file mode 100644 index 00000000..392529e0 --- /dev/null +++ b/web/src/routes/about/credits/+page.svelte @@ -0,0 +1 @@ +
thanks :3
diff --git a/web/src/routes/about/faq/+page.svelte b/web/src/routes/about/faq/+page.svelte new file mode 100644 index 00000000..1985c495 --- /dev/null +++ b/web/src/routes/about/faq/+page.svelte @@ -0,0 +1 @@ +
frequently asked questions
diff --git a/web/src/routes/about/general/+page.svelte b/web/src/routes/about/general/+page.svelte new file mode 100644 index 00000000..e0209f40 --- /dev/null +++ b/web/src/routes/about/general/+page.svelte @@ -0,0 +1 @@ +
what's cobalt?
diff --git a/web/src/routes/about/help/+page.svelte b/web/src/routes/about/help/+page.svelte new file mode 100644 index 00000000..e58ad660 --- /dev/null +++ b/web/src/routes/about/help/+page.svelte @@ -0,0 +1 @@ +
support methods
diff --git a/web/src/routes/about/privacy/+page.svelte b/web/src/routes/about/privacy/+page.svelte new file mode 100644 index 00000000..a5007527 --- /dev/null +++ b/web/src/routes/about/privacy/+page.svelte @@ -0,0 +1 @@ +
privacy policy
diff --git a/web/src/routes/about/terms/+page.svelte b/web/src/routes/about/terms/+page.svelte new file mode 100644 index 00000000..e45fde1d --- /dev/null +++ b/web/src/routes/about/terms/+page.svelte @@ -0,0 +1 @@ +
terms and ethics here
diff --git a/web/src/routes/settings/+page.svelte b/web/src/routes/settings/+page.svelte index 44b3fa58..ae86083d 100644 --- a/web/src/routes/settings/+page.svelte +++ b/web/src/routes/settings/+page.svelte @@ -1,2 +1,4 @@ - - +