diff --git a/assets/gear-icon-72a7cf.svg b/assets/gear-icon-72a7cf.svg
new file mode 100644
index 0000000..e20d7b8
--- /dev/null
+++ b/assets/gear-icon-72a7cf.svg
@@ -0,0 +1,4 @@
+
+
diff --git a/components/ContentHeader/index.tsx b/components/ContentHeader/index.tsx
index 073e2eb..74a3df5 100644
--- a/components/ContentHeader/index.tsx
+++ b/components/ContentHeader/index.tsx
@@ -4,9 +4,12 @@ import HamburgerIcon from 'assets/icons/hamburger.svg';
import UnionIcon from 'assets/icons/union.svg';
import Dropdown from 'components/Dropdown';
import usePods from 'hooks/usePods';
+import { useRouter } from 'next/router';
const ContentHeader = () => {
const { pods } = usePods();
+ const router = useRouter();
+ const { slug = '/' } = router.query;
return (
@@ -15,7 +18,7 @@ const ContentHeader = () => {
- Pod 2 / Folder 111
+ {slug[0]} {slug[1] && `/ ${slug[1]}`}
diff --git a/components/DirsGrid/index.tsx b/components/DirsGrid/index.tsx
new file mode 100644
index 0000000..dc4caae
--- /dev/null
+++ b/components/DirsGrid/index.tsx
@@ -0,0 +1,34 @@
+import { PodDir } from 'contexts/Dirs';
+import Link from 'next/link';
+
+interface Props {
+ pod: string;
+ dirs: PodDir[];
+}
+
+const DirsGrid = ({ pod, dirs }: Props) => {
+ return (
+
+ {dirs &&
+ dirs.map((dir, key: number) => (
+
+
+
+
+
+
+ ))}
+
+ );
+};
+
+export default DirsGrid;
diff --git a/components/Dropdown/index.tsx b/components/Dropdown/index.tsx
index 31aa241..9919f76 100644
--- a/components/Dropdown/index.tsx
+++ b/components/Dropdown/index.tsx
@@ -6,7 +6,7 @@ import useOnClickOutside from 'use-onclickoutside';
export interface DropdownItem {
title: string;
- href?: string;
+ slug?: string;
}
type Props = {
@@ -44,13 +44,16 @@ const Dropdown = ({
{children}
{show && (
-
+
{options.map((option: DropdownItem, ix: number) => (
-
- {option.href ? (
-
-
+ {option.slug ? (
+
+ setShow(false)}
+ >
{option.title}
diff --git a/components/ImageGrid/ImageGrid.module.scss b/components/ImageGrid/ImageGrid.module.scss
new file mode 100644
index 0000000..de169b4
--- /dev/null
+++ b/components/ImageGrid/ImageGrid.module.scss
@@ -0,0 +1,4 @@
+.imageGridItem {
+ height: 180px;
+ padding: 6px;
+}
diff --git a/components/ImageGrid/index.tsx b/components/ImageGrid/index.tsx
new file mode 100644
index 0000000..51db2de
--- /dev/null
+++ b/components/ImageGrid/index.tsx
@@ -0,0 +1,27 @@
+import classes from './ImageGrid.module.scss';
+
+interface Props {
+ images: string[];
+ className?: string;
+}
+
+const ImageGrid = ({ images }: Props) => {
+ return (
+
+
+ {images && !!images.length
+ ? images.map((file, key: number) => (
+
+ ))
+ : 'No photos'}
+
+
+ );
+};
+
+export default ImageGrid;
diff --git a/components/Sidebar/Sidebar.module.scss b/components/Sidebar/Sidebar.module.scss
index 286ea0b..1303b50 100644
--- a/components/Sidebar/Sidebar.module.scss
+++ b/components/Sidebar/Sidebar.module.scss
@@ -1,5 +1,15 @@
.root {
- // display: flex;
+ @apply absolute;
+ @apply left-0;
+ @apply top-0;
+ @apply z-0;
+ @apply w-48;
+ @apply lg:w-72;
+ @apply px-6;
+ @apply py-20;
+ @apply bg-white;
+ @apply shadow-xl;
+ @apply min-h-full;
}
.list {
diff --git a/components/Sidebar/index.tsx b/components/Sidebar/index.tsx
index d2d17bf..28d359d 100644
--- a/components/Sidebar/index.tsx
+++ b/components/Sidebar/index.tsx
@@ -12,9 +12,7 @@ const Sidebar = () => {
const { slug = '/' } = router.query;
return (
-
- {JSON.stringify(files)}
+ {isPodLoading && (
+
+
+
+ )}
+
+
+
+
+
+
+
+
)
);
diff --git a/pages/login.tsx b/pages/login.tsx
index 69c6e29..f7750f0 100644
--- a/pages/login.tsx
+++ b/pages/login.tsx
@@ -35,7 +35,6 @@ const Login: NextPage = () => {
const onSubmitHandler = async (event: SyntheticEvent) => {
event.preventDefault();
- console.log('onSubmitHandler');
const { data } = await login({
username,
diff --git a/pages/pods/[slug].tsx b/pages/pods/[...slug].tsx
similarity index 100%
rename from pages/pods/[slug].tsx
rename to pages/pods/[...slug].tsx
diff --git a/styles/theme.scss b/styles/theme.scss
index d80809f..b7405e6 100644
--- a/styles/theme.scss
+++ b/styles/theme.scss
@@ -1,3 +1,3 @@
$color-purple: #434d7e;
-$color-gray: #e2e8f8;
+$color-gray: #e2e5ed;
$color-blue: #e2e8f8;
diff --git a/tailwind.config.js b/tailwind.config.js
index 77a218b..510d6a6 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -1,11 +1,11 @@
module.exports = {
- content: [
- // Example content paths...
- './public/**/*.html',
- './**/*.{ts,tsx}',
- ],
+ content: ['./public/**/*.html', './**/*.{ts,tsx}'],
theme: {
- extend: {},
+ extend: {
+ animation: {
+ 'spin-slow': 'spin 3s linear infinite',
+ },
+ },
},
plugins: [require('@tailwindcss/aspect-ratio')],
};
diff --git a/typings.d.ts b/typings.d.ts
new file mode 100644
index 0000000..e69de29