mirror of
https://github.com/wah-su/wahs.wah.su.git
synced 2025-09-14 18:33:50 +05:00
add Header
This commit is contained in:
parent
236246a83f
commit
0c3130e95f
7 changed files with 203 additions and 4 deletions
|
@ -28,7 +28,7 @@ export default function head(props: {
|
|||
<meta property="og:url" content={`${props.url}${props.path}`} />
|
||||
{props.preload ? props.preload.map((item) => <link key={`preload_${item}`} rel="preload" href={item} as="fetch"></link>) : ""}
|
||||
{props.dns ? props.dns.map((item) => <link key={`dns_${item}`} rel="dns-prefetch" href={item} />) : ""}
|
||||
{/* <meta property="og:logo" content="<%- baseUrl %><%= path %>/static/images/logo-1x.png" /> */}
|
||||
<meta property="og:logo" content={`${props.url}/static/logo-1x.png`} />
|
||||
{props.environment == "dev" ? (
|
||||
<script src="./static/dev/hotreload.js"></script>
|
||||
) : (
|
||||
|
|
19
src/templates/Components/Header.tsx
Normal file
19
src/templates/Components/Header.tsx
Normal file
|
@ -0,0 +1,19 @@
|
|||
export default function Header(props: {path: string}) {
|
||||
return (
|
||||
<header className="sticky top-0 left-0 right-0 dark:bg-orange-950 text-[#f9ebeb] rounded-b-lg z-10">
|
||||
<div className="container flex items-center justify-between gap-4 px-8 py-4 mx-auto min-h-16">
|
||||
<a href="/">
|
||||
<img
|
||||
className="h-6 sm:h-10"
|
||||
src="/static/logo.svg"
|
||||
alt="index page"
|
||||
/>
|
||||
</a>
|
||||
<div className="flex items-center gap-4">
|
||||
<a href="/images/" className={`${props.path == "/images/" ? "underline" : ""} lg:text-xl`}>Images</a>
|
||||
<a href="/videos/" className={`${props.path == "/videos/" ? "underline" : ""} lg:text-xl`}>Videos</a>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue