diff --git a/www/components/DocsHeader.tsx b/www/components/DocsHeader.tsx deleted file mode 100644 index 3bd65fba..00000000 --- a/www/components/DocsHeader.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import DocsTitle from "./DocsTitle.tsx"; - -export default function DocsHeader(props: { title: string }) { - return ( -
-
-
- -
- -
-
- -
-
- ); -} - -function Logo() { - return ( - - Fresh logo - - ); -} diff --git a/www/components/DocsTitle.tsx b/www/components/DocsTitle.tsx index 1486599f..35df7f5c 100644 --- a/www/components/DocsTitle.tsx +++ b/www/components/DocsTitle.tsx @@ -3,7 +3,7 @@ export default function DocsTitle(props: { title: string }) { <> - {props.title} -

The next-gen web framework.

); } diff --git a/www/components/Header.tsx b/www/components/Header.tsx new file mode 100644 index 00000000..08fe92fe --- /dev/null +++ b/www/components/Header.tsx @@ -0,0 +1,37 @@ +import DocsTitle from "./DocsTitle.tsx"; +import NavigationBar from "./NavigationBar.tsx"; + +export default function Header(props: { title: string; active: string }) { + const isHome = props.active == "/"; + return ( +
+
+ {!isHome && + ( +
+ + +
+ )} +
+ +
+ ); +} + +function Logo() { + return ( + + Fresh logo + + ); +} diff --git a/www/components/NavigationBar.tsx b/www/components/NavigationBar.tsx index e330ede1..661c3bd5 100644 --- a/www/components/NavigationBar.tsx +++ b/www/components/NavigationBar.tsx @@ -1,9 +1,7 @@ -export default function NavigationBar(props: { active: string }) { +export default function NavigationBar( + props: { active: string; class?: string }, +) { const items = [ - { - name: "Home", - href: "/", - }, { name: "Docs", href: "/docs", @@ -17,15 +15,17 @@ export default function NavigationBar(props: { active: string }) { href: "/components", }, ]; - + const isHome = props.active == "/"; return ( -