diff options
author | polwex <polwex@sortug.com> | 2025-06-27 16:34:09 +0700 |
---|---|---|
committer | polwex <polwex@sortug.com> | 2025-06-27 16:34:09 +0700 |
commit | 645e815ebe11dbb86781c3eb645d3d67cd62cf7c (patch) | |
tree | 347b03391a5245de8a43198c9646719c2e892373 /lib/pages/components/Navbar.mlx | |
parent | 8be9a806a93b02eada372f3993c34bc6b2f26fea (diff) |
nice nice. lsp still doesnt work tho
Diffstat (limited to 'lib/pages/components/Navbar.mlx')
-rw-r--r-- | lib/pages/components/Navbar.mlx | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/pages/components/Navbar.mlx b/lib/pages/components/Navbar.mlx new file mode 100644 index 0000000..68003fe --- /dev/null +++ b/lib/pages/components/Navbar.mlx @@ -0,0 +1,34 @@ +module Link = struct + let[@react.component] make ~children ~href ?(className = "") = + let base_class = "hover:text-gray-300 transition-colors" in + let clas = Printf.sprintf "%s %s" base_class className in + <a className=clas href>children</a> + ;; +end + +let rs = React.string + +let[@react.component] make () = + <header className="bg-black text-white"> + <div className="flex items-center space-x-6 justify-between py-2 px-4"> + <Link href="/"> + <img className="w-[60px]" src="https://s3.spandrell.ch/assets/icons/tianming.svg" + /> + </Link> + <nav className="flex items-center space-x-6 text-sm font-medium"> + <Link href="/blog">(rs "BLOG")</Link> + <Link href="/chat">(rs "CHAT")</Link> + <Link href="/board">(rs "BOARD")</Link> + <Link href="#">(rs "FEED")</Link> + <Link href="/tv">(rs "TV")</Link> + <Link href="#">(rs "WIKI")</Link> + <Link href="#">(rs "BOOKS")</Link> + <Link href="#">(rs "ABOUT")</Link> + </nav> + <div className="flex items-center space-x-6 text-sm font-medium"> + <Link href="/search"><span>(rs "SEARCH")</span></Link> + <Link href="/login"><span>(rs "LOGIN")</span></Link> + </div> + </div> + </header> +;; |