-
Notifications
You must be signed in to change notification settings - Fork 5
feat: redesign about page #474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
salmad3
wants to merge
13
commits into
main
Choose a base branch
from
feat/about-page-redesign
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
b55c85c
add about page i18n keys
salmad3 8d55fd2
hide filters on about page
salmad3 2823b49
redesign about page
salmad3 d7147b4
add typebox deps to optimizedeps
salmad3 5fc991c
add seo meta tags to about page
salmad3 0debe60
about page layout and copy
salmad3 330055a
refactor external links to key-based
salmad3 e2959d3
fix button variant
salmad3 f4f4dfb
sleek protocol docs link
salmad3 54e9167
fix rebase conflicts and build errors
salmad3 8f19cac
fix tma typescript errors
salmad3 bcbac2d
fix tma initdata type
salmad3 3e1dbd0
refactor: replace useExternalLink with anchor tags for accessibility
salmad3 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| // TODO: Consider migrating to @unhead/vue for reactivity-first SEO management | ||
| // See: https://unhead.unjs.io/ | ||
| // This would provide better SSR support and reactive composables that could be extended to other pages. | ||
|
|
||
| interface SeoOptions { | ||
| title?: string; | ||
| description?: string; | ||
| ogTitle?: string; | ||
| ogDescription?: string; | ||
| ogUrl?: string; | ||
| } | ||
|
|
||
| function upsertMeta( | ||
| attributes: Record<string, string>, | ||
| ) { | ||
| if (typeof document === 'undefined') return; | ||
|
|
||
| const selectorParts = Object.entries(attributes) | ||
| .filter(([key]) => key === 'name' || key === 'property') | ||
| .map(([key, value]) => `[${key}="${value}"]`); | ||
|
|
||
| const selector = selectorParts.join(''); | ||
| let element = selector ? document.head.querySelector<HTMLMetaElement>(`meta${selector}`) : null; | ||
|
|
||
| if (!element) { | ||
| element = document.createElement('meta'); | ||
| document.head.appendChild(element); | ||
| } | ||
|
|
||
| Object.entries(attributes).forEach(([key, value]) => { | ||
| element?.setAttribute(key, value); | ||
| }); | ||
| } | ||
|
|
||
| export function useSEO(options: SeoOptions) { | ||
| if (typeof document === 'undefined') return; | ||
|
|
||
| if (options.title) { | ||
| document.title = options.title; | ||
| upsertMeta({ property: 'og:title', content: options.ogTitle ?? options.title }); | ||
| } | ||
|
|
||
| if (options.description) { | ||
| upsertMeta({ name: 'description', content: options.description }); | ||
| } | ||
|
|
||
| if (options.ogDescription || options.description) { | ||
| upsertMeta({ | ||
| property: 'og:description', | ||
| content: options.ogDescription ?? options.description ?? '', | ||
| }); | ||
| } | ||
|
|
||
| if (options.ogUrl) { | ||
| upsertMeta({ property: 'og:url', content: options.ogUrl }); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| export const externalLinks = { | ||
| siteUrl: 'https://dither.chat', | ||
| protocolDocs: 'https://docs.dither.chat', | ||
| docsHome: 'https://docs.dither.chat', | ||
| privacyPolicy: 'https://docs.dither.chat/policies/privacy-policy', | ||
| termsOfService: 'https://docs.dither.chat/policies/terms-of-service', | ||
| telegramBot: 'https://t.me/dither_chat_bot', | ||
| githubRepo: 'https://github.com/allinbits/dither.chat', | ||
| atomoneWebsite: 'https://atom.one/', | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,20 @@ | ||
| <script setup lang="ts"> | ||
| import { useRouter } from 'vue-router'; | ||
|
|
||
| import FilterPhoton from '@/components/ui/filter/FilterPhoton.vue'; | ||
| import { SearchInput } from '@/components/ui/search'; | ||
| import ColorModeSwitch from '@/components/ui/switch/ColorModeSwitch.vue'; | ||
| import { routesNames } from '@/router'; | ||
|
|
||
| const router = useRouter(); | ||
| </script> | ||
|
|
||
| <template> | ||
| <aside class="flex flex-col h-full w-full max-w-[358px] gap-8 p-6"> | ||
| <ColorModeSwitch /> | ||
| <FilterPhoton /> | ||
| <SearchInput /> | ||
|
|
||
| <FilterPhoton v-if="router.currentRoute.value.name !== routesNames.about" /> | ||
|
|
||
| <SearchInput v-if="router.currentRoute.value.name !== routesNames.about" /> | ||
| </aside> | ||
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.