diff --git a/package.json b/package.json index 76dfde7..3cb35ee 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,6 @@ "eslint-plugin-promise": "^6.0.0", "eslint-plugin-react": "^7.33.2", "prettier": "^3.1.1", - "sass": "^1.69.6" + "sass": "^1.70.0" } } diff --git a/src/app/[lang]/page.js b/src/app/[lang]/page.js index 1c4d2a2..86639c8 100644 --- a/src/app/[lang]/page.js +++ b/src/app/[lang]/page.js @@ -1,9 +1,5 @@ import React from 'react'; export default async function Page({ lang }) { - return ( - <> - - - ); + return

PyCon Colombia

; } diff --git a/src/app/[lang]/team/[uniquepage]/page.js b/src/app/[lang]/team/[uniquepage]/page.js new file mode 100644 index 0000000..d6451be --- /dev/null +++ b/src/app/[lang]/team/[uniquepage]/page.js @@ -0,0 +1,64 @@ +import React from 'react'; +import propTypes from 'prop-types'; +import Image from 'next/image'; +import Link from 'next/link'; +import teamlist from '@/data/team.json'; +import Avatar from '@/app/[lang]/speakers/images/avatar.jpeg'; + +export async function generateStaticParams() { + return teamlist.map((p) => ({ + uniquepage: p.id.toString() + })); +} + +const Team = ({ params: { uniquepage, lang } }) => { + const teamMember = teamlist.find((p) => p.id.toString() === uniquepage); + + return ( + <> + Picture of the author +

+ {teamMember.first_name} {teamMember.last_name} +

+

{teamMember.affiliation}

+

{teamMember.country_residence}

+ + {teamMember.biography ?

{teamMember.biography[lang]}

: null} + + ); +}; + +Team.propTypes = { + params: propTypes.shape({ + uniquepage: propTypes.string, + lang: propTypes.string + }) +}; + +export default Team; diff --git a/src/app/[lang]/team/images/avatar.jpeg b/src/app/[lang]/team/images/avatar.jpeg new file mode 100644 index 0000000..00f7cda Binary files /dev/null and b/src/app/[lang]/team/images/avatar.jpeg differ diff --git a/src/app/[lang]/team/page.js b/src/app/[lang]/team/page.js new file mode 100644 index 0000000..8391e3b --- /dev/null +++ b/src/app/[lang]/team/page.js @@ -0,0 +1,46 @@ +'use client'; + +import React from 'react'; +import propTypes from 'prop-types'; +import Row from 'react-bootstrap/Row'; +import Col from 'react-bootstrap/Col'; +import Image from 'next/image'; +import Link from 'next/link'; +import teamList from '@/data/team.json'; + +import Avatar from '@/app/[lang]/team/images/avatar.jpeg'; + +const Speakers = ({ params: { lang } }) => { + return ( + <> + {teamList.map((team) => ( + + + + Picture of the author + + + + +

+ {team.first_name} {team.last_name} +

+

{team.affiliation}

+ + + {team.twitter} + + +
+ ))} + + ); +}; + +Speakers.propTypes = { + params: propTypes.shape({ + lang: propTypes.string.isRequired + }).isRequired +}; + +export default Speakers; diff --git a/src/data/team.json b/src/data/team.json new file mode 100644 index 0000000..4cf8e28 --- /dev/null +++ b/src/data/team.json @@ -0,0 +1,20 @@ +[ + { + "id": "john-doe", + "team": "website", + "first_name": "John", + "last_name": "Doe", + "email": "bYQJ9@example.com", + "photo": "https://i.pravatar.cc/300", + "biography": { + "en": "I am John Doe. I am an amazing speaker.", + "es": "Yo soy John Doe. Soy un gran orador." + }, + "affiliation": "Acme Inc.", + "facebook": "https://www.facebook.com/johndoe", + "twitter": "@johndoe", + "linkedin": "https://www.linkedin.com/in/johndoe", + "github": "https://github.com/johndoe", + "website": "https://johndoe.com" + } +]