fix favicon and add zustand

This commit is contained in:
Youwen Wu 2024-02-09 23:07:46 -08:00
parent 9425304ba5
commit 8914d83166
4 changed files with 124 additions and 95 deletions

46
package-lock.json generated
View file

@ -10,7 +10,8 @@
"dependencies": {
"next": "14.1.0",
"react": "^18",
"react-dom": "^18"
"react-dom": "^18",
"zustand": "^4.5.0"
},
"devDependencies": {
"@types/node": "^20",
@ -465,13 +466,13 @@
"version": "15.7.11",
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz",
"integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==",
"dev": true
"devOptional": true
},
"node_modules/@types/react": {
"version": "18.2.55",
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.55.tgz",
"integrity": "sha512-Y2Tz5P4yz23brwm2d7jNon39qoAtMMmalOQv6+fEFt1mT+FcM3D841wDpoUvFXhaYenuROCy3FZYqdTjM7qVyA==",
"dev": true,
"devOptional": true,
"dependencies": {
"@types/prop-types": "*",
"@types/scheduler": "*",
@ -491,7 +492,7 @@
"version": "0.16.8",
"resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz",
"integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==",
"dev": true
"devOptional": true
},
"node_modules/@typescript-eslint/parser": {
"version": "6.21.0",
@ -1217,7 +1218,7 @@
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
"integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==",
"dev": true
"devOptional": true
},
"node_modules/damerau-levenshtein": {
"version": "1.0.8",
@ -4569,6 +4570,14 @@
"punycode": "^2.1.0"
}
},
"node_modules/use-sync-external-store": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz",
"integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==",
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
}
},
"node_modules/util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
@ -4792,6 +4801,33 @@
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/zustand": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/zustand/-/zustand-4.5.0.tgz",
"integrity": "sha512-zlVFqS5TQ21nwijjhJlx4f9iGrXSL0o/+Dpy4txAP22miJ8Ti6c1Ol1RLNN98BMib83lmDH/2KmLwaNXpjrO1A==",
"dependencies": {
"use-sync-external-store": "1.2.0"
},
"engines": {
"node": ">=12.7.0"
},
"peerDependencies": {
"@types/react": ">=16.8",
"immer": ">=9.0.6",
"react": ">=16.8"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
},
"immer": {
"optional": true
},
"react": {
"optional": true
}
}
}
}
}

View file

@ -9,19 +9,20 @@
"lint": "next lint"
},
"dependencies": {
"next": "14.1.0",
"react": "^18",
"react-dom": "^18",
"next": "14.1.0"
"zustand": "^4.5.0"
},
"devDependencies": {
"typescript": "^5",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"autoprefixer": "^10.0.1",
"eslint": "^8",
"eslint-config-next": "14.1.0",
"postcss": "^8",
"tailwindcss": "^3.3.0",
"eslint": "^8",
"eslint-config-next": "14.1.0"
"typescript": "^5"
}
}

View file

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View file

@ -8,95 +8,87 @@ const inter = Inter({ subsets: ['latin'] })
const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500', '700'] })
export const metadata: Metadata = {
title: 'eeXiv^2',
description: 'eeXiv just got better',
title: 'eeXiv^2',
description: 'eeXiv just got better',
}
export default function RootLayout({
children,
children,
}: Readonly<{
children: React.ReactNode
children: React.ReactNode
}>) {
return (
<html lang="en">
<body className={inter.className}>
<div className={styles.header}>
<img className={styles.wordmark} src="/eecs-wordmark.png" />
<p className={styles.contributions}>
We gratefully acknowledge support from our volunteer
peer reviewers, member institutions, and all{' '}
<Link
href="https://github.com/Team-1280/eeXiv/graphs/contributors"
target="_blank"
>
open-source contributors
</Link>
.
</p>
</div>
<div className={styles.banner}>
<h1
className={[styles.title, zillaSlab.className].join(
' '
)}
>
<Link href="./">
eeXiv<sup>2</sup>
</Link>
</h1>
<div className={styles.search}>
<input
type="text"
className={styles.searchBox}
name="q"
placeholder="Search..."
/>
<button type="submit" className={styles.searchButton}>
Search
</button>
</div>
</div>
{children}
<footer>
<div className={styles.footerContent}>
<ul>
<li>
<Link href="/about">About</Link>
</li>
<li>
<Link href="/help">Help</Link>
</li>
<li>
<Link href="/contact">Contact</Link>
</li>
<li>
<Link href="/subscribe">Subscribe</Link>
</li>
<li>
<Link href="/legal/copyright">Copyright</Link>
</li>
<li>
<Link href="/legal/privacy">
Privacy Policy
</Link>
</li>
<li>
<Link href="/help/accessibility">
Accessibility
</Link>
</li>
<li>
<Link href="/status">eeXiv status</Link>
</li>
<li>
<Link href="/status/notifications">
Get status notifications
</Link>
</li>
</ul>
</div>
</footer>
</body>
</html>
)
return (
<html lang='en'>
<body className={inter.className}>
<div className={styles.header}>
<img className={styles.wordmark} src='/eecs-wordmark.png' />
<p className={styles.contributions}>
We gratefully acknowledge support from our volunteer peer reviewers,
member institutions, and all{' '}
<Link
href='https://github.com/Team-1280/eeXiv/graphs/contributors'
target='_blank'
>
open-source contributors
</Link>
.
</p>
</div>
<div className={styles.banner}>
<h1 className={[styles.title, zillaSlab.className].join(' ')}>
<Link href='./'>
eeXiv<sup>2</sup>
</Link>
</h1>
<div className={styles.search}>
<input
type='text'
className={styles.searchBox}
name='q'
placeholder='Search...'
/>
<button type='submit' className={styles.searchButton}>
Search
</button>
</div>
</div>
{children}
<footer>
<div className={styles.footerContent}>
<ul>
<li>
<Link href='/about'>About</Link>
</li>
<li>
<Link href='/help'>Help</Link>
</li>
<li>
<Link href='/contact'>Contact</Link>
</li>
<li>
<Link href='/subscribe'>Subscribe</Link>
</li>
<li>
<Link href='/legal/copyright'>Copyright</Link>
</li>
<li>
<Link href='/legal/privacy'>Privacy Policy</Link>
</li>
<li>
<Link href='/help/accessibility'>Accessibility</Link>
</li>
<li>
<Link href='/status'>eeXiv status</Link>
</li>
<li>
<Link href='/status/notifications'>
Get status notifications
</Link>
</li>
</ul>
</div>
</footer>
</body>
</html>
)
}