mirror of
https://github.com/zadam/trilium.git
synced 2025-10-21 07:38:53 +02:00
feat(website): add link to documentation
This commit is contained in:
parent
10f7837a7f
commit
4954fa89b5
@ -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 />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user