diff --git a/components/navbar.tsx b/components/navbar.tsx new file mode 100644 index 0000000..dfee8e8 --- /dev/null +++ b/components/navbar.tsx @@ -0,0 +1,49 @@ +import { h, tw } from "../deps.ts"; + +const NavBar = ( + props: { + size?: "small" | "large"; + theme?: "light" | "dark"; + }, +) => { + const { size = "large", theme = "light" } = props; + let bgColor, textColor, padding, imageSize, textSize; + if (theme === "light") { + bgColor = "bg-white"; + textColor = "text-black"; + } else { + bgColor = "bg-black"; + textColor = "text-white"; + } + if (size === "small") { + padding = "p-5"; + imageSize = "h-16"; + textSize = "text-4xl"; + } else { + padding = "p-6"; + imageSize = "h-20"; + textSize = "text-5xl"; + } + + return ( +
+ +

+ Harmony{" "} +

+

+ by Example +

+
+ ); +}; + +export default NavBar; diff --git a/images/harmony.png b/images/harmony.png new file mode 100755 index 0000000..9a0d68e Binary files /dev/null and b/images/harmony.png differ diff --git a/pages/index.tsx b/pages/index.tsx index fa13a4a..c6435e0 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -2,13 +2,15 @@ import { h, html, Page, ssr, tw } from "./common.ts"; import { examples, parseExample } from "../examples/mod.ts"; +import NavBar from "../components/navbar.tsx"; let cached: string | null; function Index() { return ssr(() => [ Harmony by Example, -
+
+

Harmony by Example