feat(website): add link to documentation

This commit is contained in:
Elian Doran 2025-09-27 01:16:33 +03:00
parent 10f7837a7f
commit 4954fa89b5
No known key found for this signature in database

View File

@ -2,6 +2,16 @@ import "./Header.css";
import { useLocation } from 'preact-iso'; import { useLocation } from 'preact-iso';
import DownloadButton from './DownloadButton'; import DownloadButton from './DownloadButton';
interface HeaderLink {
url: string;
text: string;
external?: boolean;
}
const HEADER_LINKS: HeaderLink[] = [
{ url: "https://docs.triliumnotes.org/", text: "Documentation", external: true }
]
export function Header() { export function Header() {
const { url } = useLocation(); const { url } = useLocation();
@ -13,9 +23,13 @@ export function Header() {
</a> </a>
<nav> <nav>
<a href="/404" class={url == '/404' && 'active'}> {HEADER_LINKS.map(link => (
404 <a
</a> href={link.url}
className={url === link.url && 'active'}
target={link.external && "_blank"}
>{link.text}</a>
))}
</nav> </nav>
<DownloadButton /> <DownloadButton />