Skip to content

Commit

Permalink
Aethestic fixes to StaffCard/leadership
Browse files Browse the repository at this point in the history
  • Loading branch information
Powerlated committed Sep 14, 2024
1 parent 887a41d commit eb8cbc5
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 27 deletions.
42 changes: 20 additions & 22 deletions src/components/widgets/StaffCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -31,34 +31,32 @@ function getImagePath(name) {
let imagePath = getImagePath(name);
if (getImagePath(name) == null) {
imagePath = getImagePath("unknown");
// throw new Error(
// `Staff image not found for ${name} in ${basePath}
// Images considered:
// ${Object.keys(images).join("\n")}
// `,
// );
// throw new Error(
// `Staff image not found for ${name} in ${basePath}
// Images considered:
// ${Object.keys(images).join("\n")}
// `,
// );
}
const image = images[imagePath]();
---

<div class="inline-block">
<div
class="border border-[#ffffff29] bg-page rounded-md p-4 flex flex-col gap-4 shadow-lg m-auto"
>
<Image class="rounded-sm" src={image} alt={name} width="400" />
<div>
<p class="text-primary font-bold text-xl">{name}</p>
<p class="font-bold">{leadershipData.title}</p>

<div class="py-4">
{leadershipData.year && <p>{leadershipData.year}</p>}
{leadershipData.major && <p>{leadershipData.major}</p>}
</div>

{!noSocials && <Socials {...getStaffRecord(name)} />}
<div
class="border border-[#ffffff29] bg-page rounded-md p-4 flex flex-col gap-4 shadow-lg"
>
<Image class="rounded-sm" src={image} alt={name} width="400" />
<div>
<p class="text-primary font-bold text-xl">{name}</p>
<p class="font-bold">{leadershipData.title}</p>

<div class="py-4">
{leadershipData.year && <p>{leadershipData.year}</p>}
{leadershipData.major && <p>{leadershipData.major}</p>}
</div>

{!noSocials && <Socials {...getStaffRecord(name)} />}
</div>
</div>
2 changes: 1 addition & 1 deletion src/components/widgets/WeAreBsli.astro
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const {
subtitle: 'max-w-3xl mx-auto sm:text-center text-xl text-muted dark:text-slate-400',
}}
/>
<div class="mx-auto max-w-7xl p-4 md:px-8">
<div class="mx-auto max-w-7xl ">
<div class={`md:flex ${isReversed ? 'md:flex-row-reverse' : ''} md:gap-16`}>
<div class="md:basis-1/2 self-center">
{content && <div class="text-lg" set:html={content} />}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/leadership.astro
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ for (let { sectionShort, sectionId } of leadershipPageLayout) {
leadershipPageLayout.map(({ section, sectionId, staff }) => (
<WidgetWrapper containerClass={`max-w-6xl`}`>
<div id={sectionId}>
<Headline title={section} classes={{ title: "text-primary" }} />
<h2 class="text-primary text-3xl text-center font-bold mb-4">{section}</h2>

<div class="flex flex-wrap items-center justify-center gap-4">
<div class="flex flex-wrap items-stretch justify-center gap-4">
{staff.map((name) => (
<StaffCard name={name} />
))}
Expand Down
4 changes: 3 additions & 1 deletion src/pages/sponsor.astro
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ const title = "Sponsor us";
</div>
</div>
<div class="mt-10 md:mt-0 md:min-w-96">
<StaffCard name="Hana Winchester" />
<div class="inline-block">
<StaffCard name="Hana Winchester" />
</div>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/staffData.csv
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Finance Director,Youssef Erraki,,,,https://www.linkedin.com/in/youssef-erraki-50
Business Ops Director,Marc Chow,,,chow.205@osu.edu,https://www.linkedin.com/in/marcchow2/
Community Outreach Chair,Waleed Chaudhary,,,,
Recruitment & Involvement Chair,Junchen Wu,Sophomore,,,https://www.linkedin.com/in/junchen-wu-35215924b/
Alumni & Sponsorship Chair,Hana Winchester,Sophomore,,,https://www.linkedin.com/in/hana-winchester-988282258/
Alumni & Sponsorship Chair,Hana Winchester,Sophomore,Computer Science and Engineering,,https://www.linkedin.com/in/hana-winchester-988282258/
Merchandise Chair,Grayson Ullman,,,,
Social Media Chair,Anastasia Anikina,,,,https://www.linkedin.com/in/anistanika/
Webmaster,Brian Jia,Sophomore,Electrical and Computer Engineering,jia.659@osu.edu,https://www.linkedin.com/in/brian-jia-411629225/
Expand Down
1 change: 1 addition & 0 deletions src/staffData.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-ignore TSC doesn't know that we have a Vite plugin for csv
import staffData from "./staffData.csv";

export interface StaffData {
Expand Down

0 comments on commit eb8cbc5

Please sign in to comment.