From b451f09aeb7185d42317b1d10f69a32f25fa8e3f Mon Sep 17 00:00:00 2001 From: spencerwooo Date: Thu, 6 Jan 2022 21:10:16 +0800 Subject: [PATCH] a flat design with narrower lists --- components/Breadcrumb.tsx | 8 +++---- components/FileListing.tsx | 36 +++++++++++++++++------------- components/Footer.tsx | 2 +- components/Navbar.tsx | 6 ++--- components/previews/Containers.tsx | 4 ++-- pages/[...path].tsx | 2 +- pages/index.tsx | 2 +- tailwind.config.js | 2 +- 8 files changed, 33 insertions(+), 29 deletions(-) diff --git a/components/Breadcrumb.tsx b/components/Breadcrumb.tsx index a952d7e..13386e5 100644 --- a/components/Breadcrumb.tsx +++ b/components/Breadcrumb.tsx @@ -7,14 +7,14 @@ const Breadcrumb: React.FC<{ query?: ParsedUrlQuery }> = ({ query }) => { const { path } = query if (Array.isArray(path)) { return ( -
-
+
+
🚩 Home
{path.map((q: string, i: number) => (
/
-
+
= ({ query }) => { return (
-
+
🚩 Home
diff --git a/components/FileListing.tsx b/components/FileListing.tsx index 31200f3..62be03a 100644 --- a/components/FileListing.tsx +++ b/components/FileListing.tsx @@ -76,7 +76,7 @@ const FileListItem: FC<{ const renderEmoji = emojiIcon && !emojiIcon.index return ( -
+
{/*
{c.file ? c.file.mimeType : 'folder'}
*/}
@@ -342,14 +342,18 @@ const FileListing: FC<{ query?: ParsedUrlQuery }> = ({ query }) => { return ( <> -
-
-
Name
-
Last Modified
-
Size
-
Actions
-
-
+
+
+
+ Name +
+
+ Last Modified +
+
Size
+
Actions
+
+
= ({ query }) => { disabled={totalSelected === 0} onClick={handleSelectedDownload} > - + )}
@@ -429,10 +433,10 @@ const FileListing: FC<{ query?: ParsedUrlQuery }> = ({ query }) => {
{c.folder ? ( -
+
{ clipboard.copy(`${getBaseUrl()}${path === '/' ? '' : path}/${encodeURIComponent(c.name)}`) toast('Copied folder permalink.', { icon: '👌' }) @@ -445,7 +449,7 @@ const FileListing: FC<{ query?: ParsedUrlQuery }> = ({ query }) => { ) : ( { const p = `${path === '/' ? '' : path}/${encodeURIComponent(c.name)}` handleFolderDownload(p, c.id, c.name)() @@ -456,10 +460,10 @@ const FileListing: FC<{ query?: ParsedUrlQuery }> = ({ query }) => { )}
) : ( -
+
{ clipboard.copy( `${getBaseUrl()}/api?path=${path === '/' ? '' : path}/${encodeURIComponent(c.name)}&raw=true` @@ -471,7 +475,7 @@ const FileListing: FC<{ query?: ParsedUrlQuery }> = ({ query }) => { diff --git a/components/Footer.tsx b/components/Footer.tsx index 36d8165..df251fc 100644 --- a/components/Footer.tsx +++ b/components/Footer.tsx @@ -9,7 +9,7 @@ const createFooterMarkup = () => { const Footer = () => { return (
) diff --git a/components/Navbar.tsx b/components/Navbar.tsx index 22bb1c6..955e7cf 100644 --- a/components/Navbar.tsx +++ b/components/Navbar.tsx @@ -41,11 +41,11 @@ const Navbar = () => { } return ( -
+
-
- +
+ icon {siteConfig.title} diff --git a/components/previews/Containers.tsx b/components/previews/Containers.tsx index d24ff39..277a945 100644 --- a/components/previews/Containers.tsx +++ b/components/previews/Containers.tsx @@ -1,10 +1,10 @@ export function PreviewContainer({ children }): JSX.Element { - return
{children}
+ return
{children}
} export function DownloadBtnContainer({ children }): JSX.Element { return ( -
+
{children}
) diff --git a/pages/[...path].tsx b/pages/[...path].tsx index f4a1a81..44810e9 100644 --- a/pages/[...path].tsx +++ b/pages/[...path].tsx @@ -16,7 +16,7 @@ export default function Folders() { {siteConfig.title} -
+
diff --git a/pages/index.tsx b/pages/index.tsx index 40e62a1..e5b7d71 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -13,7 +13,7 @@ export default function Home() { {siteConfig.title} -
+
diff --git a/tailwind.config.js b/tailwind.config.js index c88d993..b06616c 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -30,7 +30,7 @@ module.exports = { }, colors: { gray: { - 850: '#2E2E34' + 850: '#222226' } } }