add authors
This commit is contained in:
parent
7d047560e8
commit
fdf319eab2
8 changed files with 427 additions and 23 deletions
BIN
public/img/profiles/wlin.jpg
Normal file
BIN
public/img/profiles/wlin.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 66 KiB |
BIN
public/img/profiles/ywu.webp
Normal file
BIN
public/img/profiles/ywu.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 42 KiB |
159
src/app/author/[author]/page.tsx
Normal file
159
src/app/author/[author]/page.tsx
Normal file
|
@ -0,0 +1,159 @@
|
|||
import { authors, affiliations, nationalities } from '../../db/data'
|
||||
import { navigate } from '../../actions'
|
||||
import { Zilla_Slab } from 'next/font/google'
|
||||
import Link from 'next/link'
|
||||
|
||||
const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] })
|
||||
|
||||
export default function Page({
|
||||
params,
|
||||
}: Readonly<{
|
||||
params: { author: string }
|
||||
}>) {
|
||||
const authorData = authors[params.author]
|
||||
console.log(authorData)
|
||||
if (!authorData) {
|
||||
navigate('/404')
|
||||
return
|
||||
}
|
||||
|
||||
const { name, affiliation, image, nationality, formerAffiliations } =
|
||||
authorData
|
||||
|
||||
const MainPosition = () => {
|
||||
const mainAffiliationShort = affiliation[0].split('@')[1]
|
||||
const mainPosition = affiliation[0].split('@')[0]
|
||||
const mainAffiliation = affiliations[mainAffiliationShort]
|
||||
return (
|
||||
<>
|
||||
<span>{mainPosition} at </span>
|
||||
<Link href={`/affiliation/${mainAffiliationShort}`}>
|
||||
{mainAffiliation.name}
|
||||
</Link>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
const OtherPositions = () => {
|
||||
if (affiliation.length === 1) return
|
||||
return (
|
||||
<>
|
||||
<h1 className='text-3xl md:my-6 my-4 font-serif'>Other Positions:</h1>
|
||||
{affiliation.slice(1).map((a: string, i: number) => {
|
||||
const position = a.split('@')[0]
|
||||
const affiliation = affiliations[a.split('@')[1]].name
|
||||
return (
|
||||
<>
|
||||
<span className='text-slate-500 text-lg'>
|
||||
{position} at{' '}
|
||||
<Link href={`/affiliation/${a.split('@')[1]}`}>
|
||||
{affiliation}
|
||||
</Link>
|
||||
</span>
|
||||
</>
|
||||
)
|
||||
})}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
const FormerPositions = () => {
|
||||
if (!formerAffiliations) return null
|
||||
return (
|
||||
<>
|
||||
{formerAffiliations?.map((a: string, i: number) => {
|
||||
const position = a.split('@')[0]
|
||||
const affiliation = affiliations[a.split('@')[1]].name
|
||||
|
||||
return (
|
||||
<>
|
||||
<h1 className='text-3xl md:my-6 my-4 font-serif'>
|
||||
Former Positions:
|
||||
</h1>
|
||||
<span className='text-slate-500 text-lg'>
|
||||
{position} at{' '}
|
||||
<Link href={`/affiliation/${a.split('@')[1]}`}>
|
||||
{affiliation}
|
||||
</Link>
|
||||
</span>
|
||||
</>
|
||||
)
|
||||
})}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
const NationalityDisplay = ({
|
||||
nationality,
|
||||
}: Readonly<{ nationality: string }>) => {
|
||||
const nationalityData = nationalities[nationality]
|
||||
const { demonym, flag } = nationalityData
|
||||
return (
|
||||
<>
|
||||
<div className='flex items-center'>
|
||||
<img src={flag} className='w-10 border-2 border-slate-200' />
|
||||
<span className='mx-3 font-semibold'>{demonym}</span>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
const Bio = () => {
|
||||
const { bio } = authorData
|
||||
if (!bio) return null
|
||||
|
||||
return (
|
||||
<>
|
||||
<h1 className='text-3xl md:my-6 my-4 font-serif'>Bio:</h1>
|
||||
{authorData.website ? (
|
||||
<h2 className='mb-4 text-lg'>
|
||||
You can visit me at:{' '}
|
||||
<a href={authorData.website}>{authorData.website}</a>
|
||||
</h2>
|
||||
) : null}
|
||||
<p>{authorData.bio}</p>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className='grid grid-cols-1 md:grid-cols-2 items-center max-w-3xl mx-auto'>
|
||||
<div className='aspect-square w-[60vw] md:w-[30vw] lg:w-[20vw] 2xl:w-[15vw] overflow-hidden mx-auto mb-4'>
|
||||
<img
|
||||
alt='profile picture'
|
||||
className='rounded-full mx-auto object-cover w-full h-full border-slate-800 border-4'
|
||||
src={image}
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<div className='grid grid-cols-1 grid-rows-2 mx-auto gap-y-3 sm:max-w-[60vw]'>
|
||||
<span
|
||||
className={`${zillaSlab.className} font-bold text-5xl text-center md:text-left`}
|
||||
>
|
||||
{name.first}
|
||||
{name.nickname ? ` "${name.nickname}"` : null} {name.last}
|
||||
</span>
|
||||
<div className='text-slate-600 text-md sm:text-lg'>
|
||||
<MainPosition />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className='max-w-3xl mx-auto grid grid-cols-1 justify-center'>
|
||||
<hr className='mx-auto w-full h-1 border-0 bg-slate-200 my-2 rounded-md' />
|
||||
<OtherPositions />
|
||||
<FormerPositions />
|
||||
<h1 className='text-3xl md:my-6 my-4 font-serif'>
|
||||
Ethnicity and Nationality:
|
||||
</h1>
|
||||
<div className='flex gap-2 flex-wrap'>
|
||||
{nationality.map((n: string) => (
|
||||
<NationalityDisplay nationality={n} />
|
||||
))}
|
||||
</div>
|
||||
<Bio />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
|
@ -20,7 +20,7 @@ documents {
|
|||
}
|
||||
}
|
||||
*/
|
||||
export type FileType = 'pdf' | 'docx' | 'pptx' | 'targz' | 'other'
|
||||
export type FileType = 'pdf' | 'docx' | 'pptx' | 'tar.gz' | 'other'
|
||||
export type DocumentType = 'presentation' | 'report' | 'white paper' | 'other'
|
||||
export interface DocumentDB {
|
||||
[key: string]: {
|
||||
|
@ -33,6 +33,7 @@ export interface DocumentDB {
|
|||
code?: string[]
|
||||
type: DocumentType
|
||||
latest: number
|
||||
keywords?: string[]
|
||||
}
|
||||
abstract: string
|
||||
file: FileType
|
||||
|
@ -47,11 +48,135 @@ export const documents: DocumentDB = {
|
|||
dates: [1707281608],
|
||||
type: 'presentation',
|
||||
latest: 1,
|
||||
keywords: [
|
||||
'torque and speed',
|
||||
'gear ratio',
|
||||
'rotational speed',
|
||||
'driven torque',
|
||||
'power',
|
||||
],
|
||||
},
|
||||
abstract:
|
||||
'This guide to mechanical engineering covers gears and gear ratios, gear types, gear diagrams and measurements and sprockets and chains. It also introduces a discussion of power in the context of gears and mechanical engineering specific to FRC robotics.',
|
||||
file: 'pdf',
|
||||
},
|
||||
'2024-controls-programming-dwm': {
|
||||
manifest: {
|
||||
title: '2024 Controls/Programming DWM',
|
||||
authors: ['mbohsali', 'avenkatesh', 'ywu'],
|
||||
topics: ['frc', 'eecs'],
|
||||
dates: [1706080618],
|
||||
type: 'report',
|
||||
latest: 1,
|
||||
keywords: [
|
||||
'team 1280/identity and branding',
|
||||
'servo mount for lidar',
|
||||
'rgb gamer lights',
|
||||
'quick access apps',
|
||||
'fully documented code',
|
||||
'field oriented swerve',
|
||||
'rotating servo mount',
|
||||
'specific autonomous routine',
|
||||
'media player',
|
||||
'massive dejankification',
|
||||
'github projects',
|
||||
'dwm programming',
|
||||
'swerve controls',
|
||||
'lidar subsystem',
|
||||
'branding guidelines',
|
||||
'jankboard performance',
|
||||
'electrical underglow',
|
||||
'crescendo prototype',
|
||||
'jankboard',
|
||||
'limelight',
|
||||
'lidar',
|
||||
],
|
||||
code: [
|
||||
'https://github.com/Team-1280/Swerve',
|
||||
'https://github.com/Team-1280/Jankboard',
|
||||
'https://github.com/Team-1280/identity',
|
||||
],
|
||||
},
|
||||
abstract:
|
||||
'This document outlines the first two weeks of prototyping conducted by the EECS subteam for Team 1280. Action items are presented in a doing/working/moving format to keep track of new developments related to EECS projects.',
|
||||
file: 'pdf',
|
||||
},
|
||||
'deepbozo-report': {
|
||||
manifest: {
|
||||
title: 'The DeepBozo Report',
|
||||
authors: ['ywu', 'avenkatesh'],
|
||||
keywords: [
|
||||
'feature description feasibility',
|
||||
'rog zephyrus',
|
||||
'pre planned path',
|
||||
'autonomous mode',
|
||||
'coral tpu',
|
||||
'allocative efficiency',
|
||||
'depth model',
|
||||
'driver station laptop',
|
||||
'suboptimal performance',
|
||||
'difficult to implement features',
|
||||
'teleoperated period',
|
||||
'intelligent path planning',
|
||||
'deepbozo analysis',
|
||||
'limelight',
|
||||
'large language model',
|
||||
'deepbozo subroutines',
|
||||
'occupancy network',
|
||||
'decision making',
|
||||
'autonomous mode',
|
||||
'planned features',
|
||||
'grunt work',
|
||||
'vision',
|
||||
],
|
||||
topics: ['frc', 'eecs', 'ai'],
|
||||
dates: [1706513504],
|
||||
code: ['https://github.com/Team-1280/DeepBozo'],
|
||||
type: 'report',
|
||||
latest: 1,
|
||||
},
|
||||
file: 'pdf',
|
||||
abstract:
|
||||
'DeepBozo is designed to incorporate various AI-enhanced driver assistance features and autonomous technologies. In order to meet our 1 month deadline for a prototype that’s ready to scrimmage and train with, Team 1280 EECS needs to conduct a thorough analysis of the goals and limitations of DeepBozo and its various subroutines. In this report, we explore the various possible capabilities of DeepBozo and the feasibility of each.',
|
||||
},
|
||||
'toughbook-expense-report': {
|
||||
manifest: {
|
||||
title: 'Toughbook Expense Report',
|
||||
authors: ['avenkatesh'],
|
||||
dates: [1697265104],
|
||||
keywords: [
|
||||
'programming team',
|
||||
'robotics team',
|
||||
'toughbook cost',
|
||||
'external fan array',
|
||||
'programming investments',
|
||||
'software modifications',
|
||||
'cooling system',
|
||||
'high performance',
|
||||
'opportunity cost',
|
||||
'hardware',
|
||||
'battery',
|
||||
'software',
|
||||
'damages',
|
||||
'overheating',
|
||||
'dogecoin',
|
||||
'power',
|
||||
'computer',
|
||||
'bloatware',
|
||||
'upgrade',
|
||||
'thinkpad',
|
||||
'windows',
|
||||
'distribution',
|
||||
'purchasing',
|
||||
],
|
||||
type: 'report',
|
||||
topics: ['frc', 'eecs', 'econ'],
|
||||
latest: 1,
|
||||
},
|
||||
abstract:
|
||||
'The toughbook is a rugged, industrial computer intended for low-performance, scalable, and cheap computational operations. The robotics storage cabinet contained a Lenovo ThinkPad toughbook which was, at the time of its discovery, severely damaged, both internally (software) and externally (hardware). The programming team invested significant time, energy, resources, and capital into the revival of this storied piece of digital infrastructure, thus restoring the ThinkPad and, by extension, the robotics team, to its former glory.',
|
||||
file: 'pdf',
|
||||
},
|
||||
}
|
||||
|
||||
export interface Topics {
|
||||
|
@ -99,10 +224,14 @@ export interface Authors {
|
|||
name: {
|
||||
first: string
|
||||
last: string
|
||||
nickname?: string
|
||||
}
|
||||
affiliation: string[]
|
||||
image: string
|
||||
nationality: string[]
|
||||
formerAffiliations?: string[]
|
||||
bio?: string
|
||||
website?: string
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -112,12 +241,10 @@ export const authors: Authors = {
|
|||
first: 'Saim',
|
||||
last: 'Hasan',
|
||||
},
|
||||
affiliation: [
|
||||
'Lead Mechanical Engineer @1280-mech',
|
||||
'Undergraduate @usc-viterbi',
|
||||
],
|
||||
affiliation: ['Undergraduate@usc-viterbi'],
|
||||
formerAffiliations: ['Lead Mechanical Engineer @1280-mech'],
|
||||
image: 'https://team-1280.vercel.app/assets/img/gallery6.jpg',
|
||||
nationality: ['pak'],
|
||||
nationality: ['pak', 'usa'],
|
||||
},
|
||||
mbohsali: {
|
||||
name: {
|
||||
|
@ -126,19 +253,18 @@ export const authors: Authors = {
|
|||
},
|
||||
affiliation: ['Lead Programming Engineer@1280-eecs'],
|
||||
image: 'https://cdn-icons-png.freepik.com/512/3177/3177440.png',
|
||||
nationality: ['lbn'],
|
||||
nationality: ['lbn', 'usa'],
|
||||
},
|
||||
avenkatesh: {
|
||||
name: {
|
||||
first: 'Ananth',
|
||||
last: 'Venkatesh',
|
||||
},
|
||||
affiliation: [
|
||||
'Programming Lead @1280-programming',
|
||||
'Lead Controls Engineer @1280-eecs',
|
||||
],
|
||||
affiliation: ['Lead Controls Engineer@1280-eecs'],
|
||||
formerAffiliations: ['Programming Lead @1280-programming'],
|
||||
image: 'https://cdn-icons-png.freepik.com/512/3177/3177440.png',
|
||||
nationality: ['ind', 'eth'],
|
||||
nationality: ['ind', 'eth', 'usa'],
|
||||
bio: 'The king of jank.',
|
||||
},
|
||||
ywu: {
|
||||
name: {
|
||||
|
@ -146,8 +272,115 @@ export const authors: Authors = {
|
|||
last: 'Wu',
|
||||
},
|
||||
affiliation: ['Artificial Intelligence Lead@1280-eecs'],
|
||||
image:
|
||||
'https://static.wikia.nocookie.net/discoelysium_gamepedia_en/images/9/95/Portrait_evrart.png/revision/latest?cb=20191028100247',
|
||||
image: '/img/profiles/ywu.webp',
|
||||
nationality: ['chn'],
|
||||
},
|
||||
wlin: {
|
||||
name: {
|
||||
first: 'Warren',
|
||||
last: 'Lin',
|
||||
nickname: 'Ren',
|
||||
},
|
||||
affiliation: [
|
||||
'Electrical Engineer@1280-eecs',
|
||||
'General Affairs@1280-business',
|
||||
],
|
||||
image: '/img/profiles/wlin.jpg',
|
||||
nationality: ['twn', 'chn', 'usa'],
|
||||
formerAffiliations: ['Intern@raid-zero'],
|
||||
bio: 'Hi, I am Kaito or Warren. I am a Self-taught programmer and engineer. I go around doing dumb things such as my projects. I have a dream of building a community. I am currently part of many projects.',
|
||||
website: 'https://kaitotlex.carrd.co/',
|
||||
},
|
||||
}
|
||||
|
||||
export interface Affiliations {
|
||||
[key: string]: {
|
||||
name: string
|
||||
short: string
|
||||
image: string
|
||||
}
|
||||
}
|
||||
|
||||
export const affiliations: Affiliations = {
|
||||
'1280-mech': {
|
||||
name: "Team 1280, the Ragin' C Biscuits, Mechanical Subteam",
|
||||
short: '1280 Mech',
|
||||
image:
|
||||
'https://raw.githubusercontent.com/Team-1280/identity/main/assets/img/figurehead/figurehead-primary.png',
|
||||
},
|
||||
'1280-eecs': {
|
||||
name: "Team 1280, the Ragin' C Biscuits, Electrical Engineering and Computer Science Subteam",
|
||||
short: '1280 EECS',
|
||||
image:
|
||||
'https://raw.githubusercontent.com/Team-1280/identity/main/assets/img/eecs/eecs.png',
|
||||
},
|
||||
'1280-programming': {
|
||||
name: "Team 1280, the Ragin' C Biscuits, Programming Subteam (now defunct)",
|
||||
short: '1280 Programming',
|
||||
image:
|
||||
'https://raw.githubusercontent.com/Team-1280/identity/main/assets/img/eecs/eecs.png',
|
||||
},
|
||||
'usc-viterbi': {
|
||||
name: 'University of Southern California, Viterbi School of Engineering',
|
||||
short: 'USC Viterbi',
|
||||
image:
|
||||
'https://pbs.twimg.com/profile_images/1006996145212551169/HaqpwHNY_400x400.jpg',
|
||||
},
|
||||
'1280-business': {
|
||||
name: "Team 1280, the Ragin' C Biscuits, Business Subteam",
|
||||
short: '1280 Business',
|
||||
image:
|
||||
'https://raw.githubusercontent.com/Team-1280/identity/main/assets/img/figurehead/figurehead-primary.png',
|
||||
},
|
||||
'raid-zero': {
|
||||
name: 'Team 4253 - Raid Zero',
|
||||
short: 'Raid 0',
|
||||
image:
|
||||
'https://scontent-sjc3-1.xx.fbcdn.net/v/t39.30808-6/299113446_475020107964742_4855015622304877578_n.png?_nc_cat=101&ccb=1-7&_nc_sid=efb6e6&_nc_ohc=f-tZdWsVEzQAX_9HeIZ&_nc_ht=scontent-sjc3-1.xx&oh=00_AfDRrS-nRH8uMBH9tpG7g8RNEO1AEtNso5EQMgJ5NaneaQ&oe=65CD858E',
|
||||
},
|
||||
}
|
||||
|
||||
export interface Nationalities {
|
||||
[key: string]: {
|
||||
name: string
|
||||
demonym: string
|
||||
flag: string
|
||||
}
|
||||
}
|
||||
export const nationalities: Nationalities = {
|
||||
pak: {
|
||||
name: 'Pakistan',
|
||||
demonym: 'Pakistani',
|
||||
flag: 'https://upload.wikimedia.org/wikipedia/commons/thumb/3/32/Flag_of_Pakistan.svg/510px-Flag_of_Pakistan.svg.png',
|
||||
},
|
||||
lbn: {
|
||||
name: 'Lebanon',
|
||||
demonym: 'Lebanese',
|
||||
flag: 'https://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Flag_of_Lebanon.svg/510px-Flag_of_Lebanon.svg.png',
|
||||
},
|
||||
ind: {
|
||||
name: 'India',
|
||||
demonym: 'Indian',
|
||||
flag: 'https://upload.wikimedia.org/wikipedia/en/thumb/4/41/Flag_of_India.svg/1200px-Flag_of_India.svg.png',
|
||||
},
|
||||
eth: {
|
||||
name: 'Ethiopia',
|
||||
demonym: 'Ethiopian',
|
||||
flag: 'https://upload.wikimedia.org/wikipedia/commons/thumb/7/71/Flag_of_Ethiopia.svg/2560px-Flag_of_Ethiopia.svg.png',
|
||||
},
|
||||
chn: {
|
||||
name: 'China',
|
||||
demonym: 'Chinese',
|
||||
flag: 'https://upload.wikimedia.org/wikipedia/commons/f/fa/Flag_of_the_People%27s_Republic_of_China.svg',
|
||||
},
|
||||
usa: {
|
||||
name: 'United States of America',
|
||||
demonym: 'American',
|
||||
flag: 'https://upload.wikimedia.org/wikipedia/commons/thumb/d/de/Flag_of_the_United_States.png/800px-Flag_of_the_United_States.png?20110131151900',
|
||||
},
|
||||
twn: {
|
||||
name: 'Republic of China (Taiwan)',
|
||||
demonym: 'Taiwanese',
|
||||
flag: 'https://upload.wikimedia.org/wikipedia/commons/thumb/7/72/Flag_of_the_Republic_of_China.svg/1280px-Flag_of_the_Republic_of_China.svg.png',
|
||||
},
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import {
|
|||
topics as topicList,
|
||||
authors as authorList,
|
||||
} from '../../../db/data'
|
||||
import { navigate } from './actions'
|
||||
import { navigate } from '../../../actions'
|
||||
import Link from 'next/link'
|
||||
|
||||
const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] })
|
||||
|
@ -41,7 +41,7 @@ export default function Page({
|
|||
|
||||
const handleDownloadLatest = () => {
|
||||
saveAs(
|
||||
`/download/${params.slug}/file${latest}.pdf`,
|
||||
`/download/${params.slug}/file${latest}.${file}`,
|
||||
`${params.slug}-rev-${latest}.pdf`
|
||||
)
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ export default function Page({
|
|||
}
|
||||
|
||||
const generateItemBadge = (itemName: DocumentType) => {
|
||||
let itemStyle: string = 'px-3 py-1 rounded inline-block w-fit mr-2 mt-4 '
|
||||
let itemStyle: string = 'px-3 py-1.5 rounded inline-block w-fit mr-2 mt-4 '
|
||||
switch (itemName) {
|
||||
case 'report':
|
||||
itemStyle += 'bg-green-400 text-slate-50'
|
||||
|
@ -139,9 +139,11 @@ export default function Page({
|
|||
{epoch2datestring(dates[dates.length - 1])}
|
||||
</span>
|
||||
</p>
|
||||
{generateItemBadge('report')}
|
||||
<p className='inline-block'>Revision {latest}</p>
|
||||
<hr className='w-10/12 my-4' />
|
||||
{generateItemBadge(type)}
|
||||
<p className='inline-block border-gray-200 border-2 rounded px-2 py-1'>
|
||||
Revision {latest}
|
||||
</p>
|
||||
<hr className='my-4' />
|
||||
<h4 className='text-2xl mt-5 font-serif font-semibold'>Abstract</h4>
|
||||
<p className='my-4 text-xl text-slate-600 font-serif '>{abstract}</p>
|
||||
<p className='my-2'>{generateTopics()}</p>
|
||||
|
@ -150,7 +152,17 @@ export default function Page({
|
|||
className='bg-blue-600 text-slate-100 hover:bg-blue-400 font-semibold rounded py-2 px-4 my-2'
|
||||
onClick={handleDownloadLatest}
|
||||
>
|
||||
Download {file !== 'other' ? file.toUpperCase() : null}
|
||||
Download{' '}
|
||||
{(() => {
|
||||
switch (file) {
|
||||
case 'other':
|
||||
return <></>
|
||||
case 'tar.gz':
|
||||
return 'Tarball'
|
||||
default:
|
||||
return file.toUpperCase()
|
||||
}
|
||||
})()}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue