diff --git a/components/Navbar.tsx b/components/Navbar.tsx index e99f95a..6e739da 100644 --- a/components/Navbar.tsx +++ b/components/Navbar.tsx @@ -1,4 +1,5 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { IconName } from '@fortawesome/fontawesome-svg-core' import { Dialog, Transition } from '@headlessui/react' import toast, { Toaster } from 'react-hot-toast' @@ -40,39 +41,34 @@ const Navbar = () => { } return ( -
-
- +
+ +
icon - {siteConfig.title} + {siteConfig.title} -
- - - - - - - - +
+ {siteConfig.links.map(l => ( + + + {l.name} + + ))} + + + + Email {tokenPresent && ( diff --git a/config/site.json b/config/site.json index bae9138..0ed2ff2 100644 --- a/config/site.json +++ b/config/site.json @@ -1,20 +1,26 @@ { "icon": "/icons/128.png", - "title": "spencer's onedrive index", + "title": "Spencer's OneDrive", "maxItems": 100, - "googleFontSans": "Overpass", - "googleFontMono": "Overpass Mono", + "googleFontSans": "Inter", + "googleFontMono": "Fira Mono", "googleFontLinks": [ - "https://fonts.googleapis.com/css2?family=Overpass+Mono&family=Overpass:wght@400;700&display=swap" + "https://fonts.googleapis.com/css2?family=Fira+Mono&family=Inter:wght@400;700&display=swap" ], "footer": "Powered by onedrive-vercel-index. Made with ❤ by SpencerWoo.", "protectedRoutes": [ "/🌞 Private folder/u-need-a-password", "/🥟 Some test files/Protected route" ], - "contact": { - "email": "mailto:spencer.wushangbo@gmail.com", - "telegram": "https://t.me/realSpencerWoo", - "github": "https://github.com/spencerwooo/onedrive-vercel-index" - } + "email": "mailto:spencer.wushangbo@gmail.com", + "links": [ + { + "name": "GitHub", + "link": "https://github.com/spencerwooo/onedrive-vercel-index" + }, + { + "name": "Telegram", + "link": "https://t.me/realSpencerWoo" + } + ] } diff --git a/pages/_app.tsx b/pages/_app.tsx index b0fbc51..c38998d 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -37,11 +37,16 @@ import { faCloud, faChevronCircleDown, } from '@fortawesome/free-solid-svg-icons' -import { faGithub, faMarkdown, faTelegramPlane } from '@fortawesome/free-brands-svg-icons' +import * as Icons from '@fortawesome/free-brands-svg-icons' import type { AppProps } from 'next/app' import NextNProgress from 'nextjs-progressbar' +// import all brand icons with tree-shaking so all icons can be referenced in the app +const iconList = Object.keys(Icons) + .filter(k => k !== 'fab' && k !== 'prefix') + .map(icon => Icons[icon]) + library.add( faFileImage, faFilePdf, @@ -55,8 +60,6 @@ library.add( faFileAlt, faFile, faFolder, - faGithub, - faMarkdown, faMusic, faArrowLeft, faArrowRight, @@ -74,8 +77,8 @@ library.add( faSignOutAlt, faEnvelope, faCloud, - faTelegramPlane, - faChevronCircleDown + faChevronCircleDown, + ...iconList, ) function MyApp({ Component, pageProps }: AppProps) {