Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into alpha
  • Loading branch information
frneto96 committed Jan 16, 2025
2 parents e5b2bd1 + 0eb535b commit b04c809
Show file tree
Hide file tree
Showing 12 changed files with 305 additions and 87 deletions.
6 changes: 6 additions & 0 deletions frontend/components/review-2024/Review2024CardGroup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,17 @@ export function Review2024CardGroup({ groupId }: Props) {

const groupCards = allCardsData.filter(card => card._group === groupId);

// If groupId starts with 'terminals', then we need to sort the cards by the number in the header
if (groupId.startsWith('terminals')) {
groupCards.sort((a, b) => Number(b.header.number.replace('%', '')) - Number(a.header.number.replace('%', '')));
}

//
// B. Render components

return (
<div className={styles.container}>
{groupCards[0]._group_title && <h3 className={styles.groupTitle}>{groupCards[0]._group_title}</h3>}
{groupCards.map((cardData, index) => (
<Review2024Card
key={cardData._id}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,11 @@
align-items: flex-start;
justify-content: flex-start;
width: 100%;
}
}

.groupTitle {
color: var(--color-system-text-200);
font-size: var(--font-size-subtitle);
font-weight: var(--font-weight-subtitle);
margin-bottom: var(--size-spacing-5);
}
24 changes: 9 additions & 15 deletions frontend/components/review-2024/Review2024LevelThree/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,19 @@ export function Review2024LevelThree() {

return (
<Surface forceOverflow>
<Grid columns="abc">
<Section withPadding="desktop" withGap>

<Section withPadding="desktop" withGap>
<div className={styles.headingWrapper}>
<h2 className={styles.heading}>{t('terminals.heading')}</h2>
<h5 className={styles.subheading}>{t('terminals.subheading')}</h5>
</div>
<Review2024CardGroup groupId="terminals_1" />
</Section>
<div className={styles.headingWrapper}>
<h2 className={styles.heading}>{t('terminals.heading')}</h2>
<h5 className={styles.subheading}>{t('terminals.subheading')}</h5>
</div>

<Section withPadding="desktop" withGap>
<Grid columns="abc" withGap>
<Review2024CardGroup groupId="terminals_1" />
<Review2024CardGroup groupId="terminals_2" />
</Section>

<Section withPadding="desktop" withGap>
<Review2024CardGroup groupId="terminals_3" />
</Section>

</Grid>
</Grid>
</Section>
</Surface>
);

Expand Down
68 changes: 0 additions & 68 deletions frontend/components/review-2024/Review2024LevelTwo/index.tsx

This file was deleted.

46 changes: 46 additions & 0 deletions frontend/components/review-2024/Review2024LevelTwoA/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
'use client';

/* * */

import { Grid } from '@/components/layout/Grid';
import { Section } from '@/components/layout/Section';
import { Surface } from '@/components/layout/Surface';
import { Review2024CardGroup } from '@/components/review-2024/Review2024CardGroup';
import { useTranslations } from 'next-intl';

import styles from './styles.module.css';

/* * */

export function Review2024LevelTwoA() {
//

//
// A. Setup variables

const t = useTranslations('review-2024.Review2024LevelTwo');

//
// B. Render components

return (
<Surface forceOverflow>
<Section withPadding="desktop" withGap>
<div className={styles.headingWrapper}>
<h2 className={styles.heading}>{t('municipio_growth.heading')}</h2>
<h5 className={styles.subheading}>{t('municipio_growth.subheading')}</h5>
</div>
<Grid columns="abc" withGap>
<Review2024CardGroup groupId="municipio_growth_area_1" />
<div className={styles.cardGroup}>
<Review2024CardGroup groupId="municipio_growth_area_2" />
<Review2024CardGroup groupId="municipio_growth_area_3" />
</div>
<Review2024CardGroup groupId="municipio_growth_area_4" />
</Grid>
</Section>
</Surface>
);

//
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,10 @@
font-size: 14px;
font-weight: var(--font-weight-medium);
color: var(--color-system-text-300);
}

.cardGroup {
display: flex;
flex-direction: column;
gap: var(--size-spacing-10);
}
49 changes: 49 additions & 0 deletions frontend/components/review-2024/Review2024LevelTwoB/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
'use client';

/* * */

import { Grid } from '@/components/layout/Grid';
import { Section } from '@/components/layout/Section';
import { Surface } from '@/components/layout/Surface';
import { Review2024CardGroup } from '@/components/review-2024/Review2024CardGroup';
import { useTranslations } from 'next-intl';

import styles from './styles.module.css';

/* * */

export function Review2024LevelTwoB() {
//

//
// A. Setup variables

const t = useTranslations('review-2024.Review2024LevelTwo');

//
// B. Render components

return (

<Surface>
<Section withPadding="desktop" withGap>
<div className={styles.headingWrapper}>
<h2 className={styles.heading}>{t('municipio_pax.heading')}</h2>
<h5 className={styles.subheading}>{t('municipio_pax.subheading')}</h5>
</div>
<Grid columns="abc" withGap>
<Review2024CardGroup groupId="municipio_pax_area_1" />
<div className={styles.cardGroup}>
<Review2024CardGroup groupId="municipio_pax_area_2" />
<Review2024CardGroup groupId="municipio_pax_area_3" />
</div>
<Review2024CardGroup groupId="municipio_pax_area_4" />
</Grid>
</Section>

</Surface>

);

//
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/* * */
/* HEADINGS */

.headingWrapper {
display: flex;
flex-direction: column;
gap: var(--size-spacing-5);
align-items: flex-start;
justify-content: flex-start;
width: 100%;
}

@media (width <= 650px) {
.headingWrapper {
padding: var(--size-spacing-20);
padding-bottom: 0;
padding-left: var(--size-spacing-25);
}
}

.heading {
font-size: 20px;
font-weight: var(--font-weight-semibold);
color: var(--color-system-text-100);
}

.subheading {
font-size: 14px;
font-weight: var(--font-weight-medium);
color: var(--color-system-text-300);
}

.cardGroup {
display: flex;
flex-direction: column;
gap: var(--size-spacing-10);
}
48 changes: 48 additions & 0 deletions frontend/components/review-2024/Review2024LevelTwoC/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
'use client';

/* * */

import { Grid } from '@/components/layout/Grid';
import { Section } from '@/components/layout/Section';
import { Surface } from '@/components/layout/Surface';
import { Review2024CardGroup } from '@/components/review-2024/Review2024CardGroup';
import { useTranslations } from 'next-intl';

import styles from './styles.module.css';

/* * */

export function Review2024LevelTwoC() {
//

//
// A. Setup variables

const t = useTranslations('review-2024.Review2024LevelTwo');

//
// B. Render components

return (

<Surface>
<Section withPadding="desktop" withGap>
<div className={styles.headingWrapper}>
<h2 className={styles.heading}>{t('municipio_lines.heading')}</h2>
<h5 className={styles.subheading}>{t('municipio_lines.subheading')}</h5>
</div>
<Grid columns="abc" withGap>
<Review2024CardGroup groupId="municipio_lines_area_1" />
<div className={styles.cardGroup}>
<Review2024CardGroup groupId="municipio_lines_area_2" />
<Review2024CardGroup groupId="municipio_lines_area_3" />
</div>
<Review2024CardGroup groupId="municipio_lines_area_4" />
</Grid>
</Section>

</Surface>
);

//
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/* * */
/* HEADINGS */

.headingWrapper {
display: flex;
flex-direction: column;
gap: var(--size-spacing-5);
align-items: flex-start;
justify-content: flex-start;
width: 100%;
}

@media (width <= 650px) {
.headingWrapper {
padding: var(--size-spacing-20);
padding-bottom: 0;
padding-left: var(--size-spacing-25);
}
}

.heading {
font-size: 20px;
font-weight: var(--font-weight-semibold);
color: var(--color-system-text-100);
}

.subheading {
font-size: 14px;
font-weight: var(--font-weight-medium);
color: var(--color-system-text-300);
}

.cardGroup {
display: flex;
flex-direction: column;
gap: var(--size-spacing-10);
}
8 changes: 6 additions & 2 deletions frontend/components/review-2024/Review2024Page/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import { Review2024LevelFour } from '@/components/review-2024/Review2024LevelFou
import { Review2024LevelOne } from '@/components/review-2024/Review2024LevelOne';
import { Review2024LevelSix } from '@/components/review-2024/Review2024LevelSix';
import { Review2024LevelThree } from '@/components/review-2024/Review2024LevelThree';
import { Review2024LevelTwo } from '@/components/review-2024/Review2024LevelTwo';
import { Review2024LevelTwoA } from '@/components/review-2024/Review2024LevelTwoA';
import { Review2024LevelTwoB } from '@/components/review-2024/Review2024LevelTwoB';
import { Review2024LevelTwoC } from '@/components/review-2024/Review2024LevelTwoC';
import { Review2024QuizWrapper } from '@/components/review-2024/Review2024QuizWrapper';
import { Review2024TabSelector } from '@/components/review-2024/Review2024TabSelector';
import { useQueryState } from 'nuqs';
Expand Down Expand Up @@ -43,8 +45,10 @@ export function Review2024Page() {
{selectedTab === 'overview' && (
<>
<Review2024LevelOne />
<Review2024LevelTwo />
<Review2024LevelThree />
<Review2024LevelTwoA />
<Review2024LevelTwoB />
<Review2024LevelTwoC />
<Review2024LevelFour />
<Review2024LevelSix />
</>
Expand Down
Loading

0 comments on commit b04c809

Please sign in to comment.