diff --git a/.eslintrc.json b/.eslintrc.json index f0f3abe..a9213c7 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,6 +1,6 @@ { "extends": "next/core-web-vitals", "rules": { - "@next/next/no-img-element": "off" + "@next/next/no-img-element": "error" } } diff --git a/next.config.mjs b/next.config.mjs index b53664a..bdf4010 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,7 +1,15 @@ /** @type {import('next').NextConfig} */ const nextConfig = { images: { - unoptimized: true, + unoptimized: false, + remotePatterns: [ + { + protocol: 'https', + hostname: 'upload.wikimedia.org', + port: '', + pathname: '/**', + }, + ], }, } diff --git a/public/img/profiles/cbordalo.jpg b/public/img/profiles/cbordalo.jpg index 75b32ad..3d0d08a 100644 Binary files a/public/img/profiles/cbordalo.jpg and b/public/img/profiles/cbordalo.jpg differ diff --git a/public/img/profiles/jzhang.jpg b/public/img/profiles/jzhang.jpg index eac1fb0..32609b4 100644 Binary files a/public/img/profiles/jzhang.jpg and b/public/img/profiles/jzhang.jpg differ diff --git a/public/img/profiles/sxu.jpg b/public/img/profiles/sxu.jpg index 2b86e50..74ce427 100644 Binary files a/public/img/profiles/sxu.jpg and b/public/img/profiles/sxu.jpg differ diff --git a/public/img/profiles/vchaudhary.jpg b/public/img/profiles/vchaudhary.jpg index 370f579..739961b 100644 Binary files a/public/img/profiles/vchaudhary.jpg and b/public/img/profiles/vchaudhary.jpg differ diff --git a/public/img/profiles/wlin.jpg b/public/img/profiles/wlin.jpg index b3cc735..f803b21 100644 Binary files a/public/img/profiles/wlin.jpg and b/public/img/profiles/wlin.jpg differ diff --git a/public/img/profiles/ywu.webp b/public/img/profiles/ywu.webp index cb48828..be03d34 100644 Binary files a/public/img/profiles/ywu.webp and b/public/img/profiles/ywu.webp differ diff --git a/public/img/profiles/zliu.jpg b/public/img/profiles/zliu.jpg index eddf877..53aff65 100644 Binary files a/public/img/profiles/zliu.jpg and b/public/img/profiles/zliu.jpg differ diff --git a/src/app/affiliation/[shortName]/page.tsx b/src/app/affiliation/[shortName]/page.tsx index 66f8d26..a25e1c4 100644 --- a/src/app/affiliation/[shortName]/page.tsx +++ b/src/app/affiliation/[shortName]/page.tsx @@ -4,6 +4,7 @@ import { Zilla_Slab } from 'next/font/google' import findDocumentsByAffiliation from './findDocumentsByAffiliation' import { Fragment } from 'react' import DocumentCard from '@/app/components/DocumentCard' +import Image from 'next/image' const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] }) @@ -12,6 +13,21 @@ export function generateStaticParams() { return affiliationsList.map((shortName) => ({ shortName })) } +const Description = ({ + description +}: Readonly<{ description: string }>) => { + return ( + <> + {description.split('[linebreak]').map((d, i) => ( + <> +
{bio}
+ > + ) +} + export default function AuthorDisplay({ author, }: Readonly<{ author: string }>) { @@ -18,112 +136,10 @@ export default function AuthorDisplay({ notFound() } - const { name, affiliation, image, nationality, formerAffiliations } = data + const { name, image, nationality } = data const authorsDocuments = findDocumentsByAuthor(author) - const MainPosition = () => { - const mainAffiliationShort = affiliation[0].split('@')[1] - const mainPosition = affiliation[0].split('@')[0] - const mainAffiliation = affiliations[mainAffiliationShort] - const { website } = data - - return ( - <> - {mainPosition} at - - {mainAffiliation.name} - - {website ? ( -{bio}
- > - ) - } - return ( <>@@ -34,7 +33,7 @@ const DocumentCard = ({ doc, href }: { doc: Document; href: string }) => {
{abstract.substring(0, 500) + (abstract.length > 500 ? '...' : '')}
-@@ -101,7 +100,7 @@ export default function Home() {
@@ -66,7 +66,7 @@ const SearchResult = ({
{abstract.substring(0, 500) + (abstract.length > 500 ? '...' : '')}
-