-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ccaecad
commit c4c6a37
Showing
4 changed files
with
27 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
|
@@ -3,14 +3,11 @@ import ImgLogo from "~/assets/images/logo.svg?jsx"; | |
|
||
export const Navbar = component$(() => { | ||
return ( | ||
<nav class="dark:bg-yellow-900 fixed start-0 top-0 z-20 hidden w-full bg-yellow"> | ||
<nav class="dark:bg-yellow-900 fixed start-0 top-0 z-20 w-full bg-yellow"> | ||
<div class="mx-auto flex flex-wrap items-center justify-between p-4"> | ||
<a title="homepage" href="/" class="flex items-center"> | ||
<ImgLogo /> | ||
</a> | ||
{/* <div class="flex space-x-3 md:order-2 md:space-x-0"> | ||
<a href="mailto:[email protected]">Contattaci</a> | ||
</div> */} | ||
</div> | ||
</nav> | ||
); | ||
|
This file contains 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 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,25 @@ | ||
import { component$, Slot } from "@builder.io/qwik"; | ||
import type { RequestHandler } from "@builder.io/qwik-city"; | ||
import { Navbar } from "~/components/navbar/navbar"; | ||
|
||
export const onGet: RequestHandler = async ({ cacheControl }) => { | ||
// Control caching for this request for best performance and to reduce hosting costs: | ||
// https://qwik.builder.io/docs/caching/ | ||
cacheControl({ | ||
// Always serve a cached response by default, up to a week stale | ||
staleWhileRevalidate: 60 * 60 * 24 * 7, | ||
// Max once every 5 seconds, revalidate on the server to get a fresh version of this page | ||
maxAge: 5, | ||
}); | ||
}; | ||
|
||
export default component$(() => { | ||
return ( | ||
<> | ||
<Navbar /> | ||
<main class="mt-16"> | ||
<Slot /> | ||
</main> | ||
</> | ||
); | ||
}); |