diff options
Diffstat (limited to 'lib/pages/components')
-rw-r--r-- | lib/pages/components/Navbar.mlx | 34 | ||||
-rw-r--r-- | lib/pages/components/SiteTitle.mlx | 10 |
2 files changed, 44 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> +;; diff --git a/lib/pages/components/SiteTitle.mlx b/lib/pages/components/SiteTitle.mlx new file mode 100644 index 0000000..cfee4f3 --- /dev/null +++ b/lib/pages/components/SiteTitle.mlx @@ -0,0 +1,10 @@ +let[@react.component] make () = + <div className="text-center mb-8"> + <a href="/"> + <h1 className="text-5xl text-gray-900 mb-2 hover:text-gray-700 transition-colors"> + (React.string "BLOODY SHOVEL 5") + </h1> + </a> + <p className="text-gray-600 text-2xl italic">(React.string "Nemo nos Salvabit")</p> + </div> +;; |