From 947771ce1e6c3393c7228787e25cd27cf79458ff Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Sat, 10 Feb 2024 22:54:11 -0800 Subject: [PATCH] finished affiliation descriptions --- .../file1.pdf} | Bin src/app/affiliation/[shortName]/page.tsx | 53 ++++++++++++++++ src/app/author/[author]/page.tsx | 4 +- src/app/db/data.ts | 57 +++++++++++++++++- src/app/document/view/[slug]/page.tsx | 2 +- src/app/globals.css | 4 ++ src/app/layout.tsx | 4 +- src/app/searchBar/SearchBar.tsx | 7 ++- src/app/searchBar/searchBar.module.css | 33 ---------- 9 files changed, 123 insertions(+), 41 deletions(-) rename public/download/{r3/toughbook-1.pdf => toughbook-expense-report/file1.pdf} (100%) create mode 100644 src/app/affiliation/[shortName]/page.tsx delete mode 100644 src/app/searchBar/searchBar.module.css diff --git a/public/download/r3/toughbook-1.pdf b/public/download/toughbook-expense-report/file1.pdf similarity index 100% rename from public/download/r3/toughbook-1.pdf rename to public/download/toughbook-expense-report/file1.pdf diff --git a/src/app/affiliation/[shortName]/page.tsx b/src/app/affiliation/[shortName]/page.tsx new file mode 100644 index 0000000..05d02ae --- /dev/null +++ b/src/app/affiliation/[shortName]/page.tsx @@ -0,0 +1,53 @@ +import { affiliations } from '@/app/db/data' +import { notFound } from 'next/navigation' +import { Zilla_Slab } from 'next/font/google' +import { Fragment } from 'react' + +const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] }) + +export default function Page({ + params, +}: Readonly<{ params: { shortName: string } }>) { + const { shortName } = params + const { name, short, image, description } = affiliations[shortName] + if (!name) { + notFound() + } + + const Description = () => { + return ( + <> + {description.split('[linebreak]').map((d, i) => ( + <> +
+ {d} +
+
+ + ))} + + ) + } + + return ( +
+
+
+ profile picture +
+ + {name} + +
{short}
+
+
+
+ +
+
+ ) +} diff --git a/src/app/author/[author]/page.tsx b/src/app/author/[author]/page.tsx index 74e7544..26dd27c 100644 --- a/src/app/author/[author]/page.tsx +++ b/src/app/author/[author]/page.tsx @@ -117,8 +117,8 @@ export default function Page({ return (
-
-
+
+
profile picture -
diff --git a/src/app/searchBar/searchBar.module.css b/src/app/searchBar/searchBar.module.css deleted file mode 100644 index 7825dad..0000000 --- a/src/app/searchBar/searchBar.module.css +++ /dev/null @@ -1,33 +0,0 @@ -.searchBox, -.searchButton { - display: inline; -} - -.search { - position: absolute; - top: 175px; - right: 0; - width: 40vw; -} - -.searchBox { - height: 45px; - border: 3px solid #0c5198; - border-radius: 10px; - padding: 22px; - /* color: inherit; */ -} - -.searchButton { - background-color: #0c5198; - color: white; - border: 3px solid white; - padding: 10px; - border-radius: 10px; - margin-left: 10px; -} - -.searchButton:hover { - background-color: white; - color: #0c5198; -}