From 003a119ea99e53c08d0fea95a87b8f148eed580e Mon Sep 17 00:00:00 2001 From: galenwinsor Date: Mon, 1 Jul 2024 09:02:48 -0700 Subject: [PATCH 1/2] feat: add bios and links for leadership --- src/components/Card.tsx | 37 ++++++++++++------- src/components/CardContainer.astro | 10 ++++- src/content/config.ts | 2 + src/content/people/advisor.md | 2 + src/content/people/co-director-1.md | 2 + src/content/people/co-director.md | 2 + src/content/people/data-entry-specialist.md | 2 + .../professor-and-researcher-sni-nivel-iii.md | 2 + 8 files changed, 44 insertions(+), 15 deletions(-) diff --git a/src/components/Card.tsx b/src/components/Card.tsx index 19426f0..b3b230e 100644 --- a/src/components/Card.tsx +++ b/src/components/Card.tsx @@ -5,27 +5,38 @@ interface CardProps { image?: string title: string name: string + link: string institution: string + bio?: string } -const Card: React.FC = ({ position, image, title, name, institution }) => { +const Card: React.FC = ({ link, image, title, name, institution, bio }) => { // strip 'public/' from the avatar string since astro's public folder is available without this in the link - const link = image?.replace("/public", "") + const imageURL = image?.replace("/public", "") return ( -
+
{image && ( -
- {name} +
+ {name}
)} -
- - {name} - -

{title}

-

{institution}

+
+
+ + {name} + +

{title}

+

{institution}

+
+

{bio}

) diff --git a/src/components/CardContainer.astro b/src/components/CardContainer.astro index 0c1cb2e..bf82d46 100644 --- a/src/components/CardContainer.astro +++ b/src/components/CardContainer.astro @@ -6,14 +6,18 @@ interface PersonProps { data: { title: string name: string + link: string avatar?: string institution: string + bio: string } } --- -
-

{title}

+
+

+ {title} +

{ people.map((person: PersonProps, i: number) => { @@ -24,8 +28,10 @@ interface PersonProps { position={i} title={person.data.title} name={person.data.name} + link={person.data.link} image={person.data.avatar} institution={person.data.institution} + bio={person.data.bio} /> ) diff --git a/src/content/config.ts b/src/content/config.ts index 488de75..73e2a2f 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -28,9 +28,11 @@ const people = defineCollection({ schema: z.object({ type: z.string(), name: z.string(), + link: z.string(), title: z.string(), avatar: z.string().optional(), institution: z.string(), + bio: z.string(), }), }) export const collections = { news: news, data: files, people: people } diff --git a/src/content/people/advisor.md b/src/content/people/advisor.md index 317bbc4..2a70381 100644 --- a/src/content/people/advisor.md +++ b/src/content/people/advisor.md @@ -1,9 +1,11 @@ --- type: Leadership name: David Lindstrom +link: https://www.brown.edu/academics/sociology/people/david-lindstrom title: Advisor avatar: /public/images/david-lindstrom-1-.jpg institution: Brown University startDate: "2024" endDate: "2024" +bio: Lindstrom's research examines the determinants and consequences of migration in economically developing societies, the transition into adulthood, and the changing dynamics of reproductive health and behavior. In Mexico and Guatemala, Lindstrom studies the interrelationship between migration and stages of the family life cycle, and the role of migration in the diffusion of urban reproductive norms and behavior back to rural places of origin. In Ethiopia, he examines the social and demographic determinants of fertility, and the influence of the social and cultural context on early life course transitions. Lindstrom teaches undergraduate and graduate courses on statistics, population and development, migration, and adolescent transitions into adulthood. --- diff --git a/src/content/people/co-director-1.md b/src/content/people/co-director-1.md index 701dcc7..af0d3d1 100644 --- a/src/content/people/co-director-1.md +++ b/src/content/people/co-director-1.md @@ -1,9 +1,11 @@ --- type: Leadership name: Douglas S. Massey +link: https://sociology.princeton.edu/people/doug-massey title: Co-Director avatar: /public/images/douglasmassey.jpeg institution: Princeton University startDate: "2024" endDate: "2024" +bio: "Doug Massey is Henry G. Bryant Professor of Sociology and Public Affairs, with a joint appointment in The Princeton School of Public and International Affairs. A member of the National Academy of Sciences, the American Academy of Arts and Sciences, and the American Philosophical Society, he is the current president of the American Academy of Political and Social Science and is a member of the Council of the National Academy of Sciences and co-editor of the Annual Review of Sociology. Massey’s research focuses on international migration, race and housing, discrimination, education, urban poverty, stratification, and Latin America, especially Mexico. He is the author, most recently, of Brokered Boundaries: Constructing Immigrant Identity in Anti-Immigrant Times, coauthored with Magaly Sanchez and Published by the Russell Sage Foundation." --- diff --git a/src/content/people/co-director.md b/src/content/people/co-director.md index 79ce962..6e0fdab 100644 --- a/src/content/people/co-director.md +++ b/src/content/people/co-director.md @@ -2,8 +2,10 @@ type: Leadership name: Jorge Durand Arp-Nisen title: Co-Director +link: https://en.wikipedia.org/wiki/Jorge_G._Durand avatar: /public/images/jorgedurand.jpg institution: Universidad de Guadalajara startDate: "2024" endDate: "2024" +bio: Jorge Guillermo Durand Arp-Nisen (born 1949 in Lima, Peru) is a research professor of anthropology at the University of Guadalajara and the Center for Economic Research and Teaching (CIDE). He is co-director with Douglas S. Massey on the Mexican Migration Project (since 1987) and the Latin American Migration Project (since 1996), sponsored by the universities of Princeton and Guadalajara. He is a member of the American Philosophical Society, National Academy of Sciences, and the American Academy of Arts and Sciences. In Mexico, he is a member of the National System of Researchers (Level III) of the Mexican Academy of Sciences. Further, he has been granted the Guggenheim Fellowship for Social Sciences award in the Latin American & Caribbean Competition, as well as the Bronislaw Malinowski Award by the Society for Applied Anthropology. --- diff --git a/src/content/people/data-entry-specialist.md b/src/content/people/data-entry-specialist.md index 1ef7321..3df3666 100644 --- a/src/content/people/data-entry-specialist.md +++ b/src/content/people/data-entry-specialist.md @@ -2,8 +2,10 @@ type: Supporting Staff name: Verónica Lozano title: Data Entry Specialist +link: \# avatar: /public/images/vero.jpg institution: Universidad de Guadalajara startDate: "2024" endDate: "2024" +bio: About --- diff --git a/src/content/people/professor-and-researcher-sni-nivel-iii.md b/src/content/people/professor-and-researcher-sni-nivel-iii.md index bd5ef35..ba1ebd6 100644 --- a/src/content/people/professor-and-researcher-sni-nivel-iii.md +++ b/src/content/people/professor-and-researcher-sni-nivel-iii.md @@ -1,9 +1,11 @@ --- type: Advisors name: M. Patricia Arias +link: \# title: Professor and Researcher (SNI nivel III) avatar: /public/images/patricia-arias.jpg institution: Universidad de Guadalajara startDate: "2024" endDate: "2024" +bio: AboutLL --- From f25e5eee63599465a894ced796e724d26dbb2846 Mon Sep 17 00:00:00 2001 From: galenwinsor Date: Tue, 2 Jul 2024 12:55:19 -0700 Subject: [PATCH 2/2] refactor: make link optional for people --- src/content/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/config.ts b/src/content/config.ts index 73e2a2f..e33d009 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -28,7 +28,7 @@ const people = defineCollection({ schema: z.object({ type: z.string(), name: z.string(), - link: z.string(), + link: z.string().optional(), title: z.string(), avatar: z.string().optional(), institution: z.string(),