diff --git a/web/assets/file.tsx b/web/assets/file.tsx new file mode 100644 index 0000000..a8699dc --- /dev/null +++ b/web/assets/file.tsx @@ -0,0 +1,23 @@ +import { CSSProperties } from "react"; + +export function FileIcon({ + className, + style, +}: { + className?: string; + style?: CSSProperties; +}) { + return ( + + + + ); +} diff --git a/web/assets/folder.tsx b/web/assets/folder.tsx new file mode 100644 index 0000000..ffeda21 --- /dev/null +++ b/web/assets/folder.tsx @@ -0,0 +1,24 @@ +import { CSSProperties } from "react"; + +export function FolderIcon({ + className, + style, +}: { + className?: string; + style?: CSSProperties; +}) { + return ( + + + + + ); +} diff --git a/web/assets/home.tsx b/web/assets/home.tsx index 04ba93b..bfe6029 100644 --- a/web/assets/home.tsx +++ b/web/assets/home.tsx @@ -1,4 +1,12 @@ -export function HomeIcon({ className }: { className: string | undefined }) { +import { CSSProperties } from "react"; + +export function HomeIcon({ + className, + style, +}: { + className?: string; + style?: CSSProperties; +}) { return ( diff --git a/web/assets/index.ts b/web/assets/index.ts index 84d36cd..147c4a7 100644 --- a/web/assets/index.ts +++ b/web/assets/index.ts @@ -1 +1,4 @@ export * from "./home"; +export * from "./file"; +export * from "./folder"; +export * from "./search"; diff --git a/web/assets/search.tsx b/web/assets/search.tsx new file mode 100644 index 0000000..2db09ce --- /dev/null +++ b/web/assets/search.tsx @@ -0,0 +1,23 @@ +import { CSSProperties } from "react"; + +export function SearchIcon({ + className, + style, +}: { + className?: string; + style?: CSSProperties; +}) { + return ( + + + + ); +} diff --git a/web/src/index.css b/web/src/index.css index f8518e0..2d09f7b 100644 --- a/web/src/index.css +++ b/web/src/index.css @@ -2,6 +2,18 @@ @tailwind components; @tailwind utilities; +input { + border: none; + background: none; + padding: 0; + margin: 0; + outline: none; + box-shadow: none; + appearance: none; + -webkit-appearance: none; + -moz-appearance: none; +} + @layer utilities { .text-vertical { writing-mode: vertical-lr; diff --git a/web/src/main.tsx b/web/src/main.tsx index ae9dc3b..a52d6ea 100644 --- a/web/src/main.tsx +++ b/web/src/main.tsx @@ -4,6 +4,7 @@ import "./index.css"; import { createBrowserRouter, RouterProvider } from "react-router-dom"; import { Root } from "./routes/root"; import { Home } from "./routes/home/home"; +import { Media } from "./routes/media/media"; const router = createBrowserRouter([ { @@ -14,6 +15,10 @@ const router = createBrowserRouter([ path: "home", element: , }, + { + path: "media/*", + element: , + }, ], }, ]); diff --git a/web/src/routes/media/media.tsx b/web/src/routes/media/media.tsx new file mode 100644 index 0000000..7accdea --- /dev/null +++ b/web/src/routes/media/media.tsx @@ -0,0 +1,81 @@ +import { useParams } from "react-router-dom"; +import { FolderIcon, SearchIcon } from "../../../assets"; +import { Large, Small } from "../../utils/react_responsive"; + +export function Media() { + const { "*": mediaPath } = useParams(); + + return ( + <> + +
+
+ +
+

Media

+

/media/{mediaPath}

+
+
+
+ +
+
+
+
+ +
+
+
+

Media

+

/media/{mediaPath}

+
+ +
+
+
+ +
+
+
+
+
+ + ); +} + +type FolderProp = { + name: string; + subtitle: { + present: number; + total: number; + }; +}; + +function Folder({ name, subtitle }: FolderProp) { + return ( +
+ +
+

{name}

+
+

Subtitle

+

+ {subtitle.present}/{subtitle.total} +

+
+
+
+ ); +} + +function SearchBar() { + return ( +
+ + +
+ ); +} diff --git a/web/src/routes/root.tsx b/web/src/routes/root.tsx index e3c5c51..35e8f98 100644 --- a/web/src/routes/root.tsx +++ b/web/src/routes/root.tsx @@ -1,8 +1,10 @@ -import { Link, Outlet } from "react-router-dom"; -import { HomeIcon } from "../../assets"; +import { Link, Outlet, useLocation } from "react-router-dom"; +import { FileIcon, HomeIcon } from "../../assets"; import { Desktop, Mobile, Tablet } from "../utils/react_responsive"; export function Root() { + let location = useLocation(); + return ( <> @@ -15,22 +17,24 @@ export function Root() {
  • - - -
  • -
  • - - - -
  • -
  • - - +
  • - - + +
@@ -45,26 +49,28 @@ export function Root() {
-