Skip to content

Commit

Permalink
Merge pull request #47 from include-davis/fix/image-sizing
Browse files Browse the repository at this point in the history
Fix/image sizing
  • Loading branch information
Austin2Shih authored Sep 21, 2024
2 parents 92e0fe6 + 49a3807 commit 03764a9
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 23 deletions.
5 changes: 4 additions & 1 deletion src/components/cabinetCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ export function CabinetCard({ position, description, key }) {
</div>

{isOpened && (
<div dangerouslySetInnerHTML={{ __html: description }}></div>
<div
className={styles.description_list}
dangerouslySetInnerHTML={{ __html: description }}
></div>
)}
</div>
);
Expand Down
5 changes: 4 additions & 1 deletion src/components/eventsCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ export function EventsCard({ title, description, photo }) {
</div>
<div className={styles.cardInfo}>
<h1 className={styles.cardTitle}>{title}</h1>
<p className={styles.cardDescription}>{description}</p>
<div
className={styles.cardDescription}
dangerouslySetInnerHTML={{ __html: description }}
></div>
</div>
</div>
);
Expand Down
7 changes: 4 additions & 3 deletions src/components/whoWeAre.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ const button = {

export function InfoCard({ text }) {
return (
<div className={styles.card}>
<p className={styles.cardText}>{text}</p>
</div>
<div
className={styles.card}
dangerouslySetInnerHTML={{ __html: text }}
></div>
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/pages/api/revalidate.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ export default async function handler(_, res) {
try {
await res.revalidate('/');
await res.revalidate('/calendar');
await res.revalidate('/meet-us');
await res.revalidate('/join-us');
await res.revalidate('/meet-us');
return res.json({ ok: true, error: null });
} catch (err) {
return res.status(500).json({ ok: false, error: err });
Expand Down
2 changes: 1 addition & 1 deletion src/pages/calendar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import styles from '@/styles/pages/calendar/calendar.module.scss';

export async function getStaticProps() {
const calendar_res = await fetch(
`${process.env.HEARTH_CONNECTION_STRING}/calendar`
`${process.env.HEARTH_CONNECTION_STRING}/calendar?_published=true`
);
const calendar_json = await calendar_res.json();

Expand Down
4 changes: 2 additions & 2 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { WhoWeAre } from '@/components/whoWeAre';

export async function getStaticProps() {
const home_res = await fetch(
`${process.env.HEARTH_CONNECTION_STRING}/home`
`${process.env.HEARTH_CONNECTION_STRING}/home?_published=true`
);
const home_json = await home_res.json();

const event_res = await fetch(
`${process.env.HEARTH_CONNECTION_STRING}/event`
`${process.env.HEARTH_CONNECTION_STRING}/event?_published=true`
);
const event_json = await event_res.json();

Expand Down
4 changes: 2 additions & 2 deletions src/pages/join-us/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { Fragment } from 'react';

export async function getStaticProps() {
const join_us_res = await fetch(
`${process.env.HEARTH_CONNECTION_STRING}/join-us`
`${process.env.HEARTH_CONNECTION_STRING}/join-us?_published=true`
);
const join_us_json = await join_us_res.json();

const cabinet_positions_res = await fetch(
`${process.env.HEARTH_CONNECTION_STRING}/cabinet-position`
`${process.env.HEARTH_CONNECTION_STRING}/cabinet-position?_published=true`
);
const cabinet_positions_json = await cabinet_positions_res.json();

Expand Down
4 changes: 2 additions & 2 deletions src/pages/meet-us/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import Image from 'next/image';

export async function getStaticProps() {
const cabinet_res = await fetch(
`${process.env.HEARTH_CONNECTION_STRING}/cabinet-member`
`${process.env.HEARTH_CONNECTION_STRING}/cabinet-member?_published=true`
);
const cabinet_json = await cabinet_res.json();

const meet_us_res = await fetch(
`${process.env.HEARTH_CONNECTION_STRING}/meet-us`
`${process.env.HEARTH_CONNECTION_STRING}/meet-us?_published=true`
);
const meet_us_json = await meet_us_res.json();

Expand Down
18 changes: 9 additions & 9 deletions src/styles/components/whoweare/whoweare.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,16 @@
min-height: 497px;
min-width: 100%;
}
}

.cardText {
font-size: 1.5rem;
font-style: normal;
font-weight: 400;
line-height: 125%; /* 30px */

@include mixins.tablet {
font-size: 1.1rem;
p {
font-size: 1.5rem;
font-style: normal;
font-weight: 400;
line-height: 125%; /* 30px */

@include mixins.tablet {
font-size: 1.1rem;
}
}
}

Expand Down
6 changes: 5 additions & 1 deletion src/styles/pages/joinus/joincab.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
justify-content: space-between;
align-items: center;
text-align: left;

> p {
font-size: 1.375rem;
}
Expand All @@ -19,12 +18,17 @@
}
}

.description_list {
padding-left: 24px;
}

.card {
padding: 17px;
background-color: white;
border-radius: 8px;
width: calc(calc(100% - 24px) / 2);
max-width: 500px;
cursor: pointer;

text-align: left;
flex-direction: column;
Expand Down

0 comments on commit 03764a9

Please sign in to comment.