-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Resources title and section title component (#177)
* Added resources title svg and changed title in Resources landing * Created Heading Card * Added island button svgs * Removed island svgs * Updated font weights for card * Updated import order for Landing.tsx and ApiResources.tsx * Fixed resources title and text padding for mobile * Used relative sizes for padding instead of px for FAQ and HeadingCard * Added visually hidden title for resources landing * Replaced all section heading cards in resources * Changed import order for resource sections, changed heading pixel size to rem
- Loading branch information
1 parent
68f70a3
commit 7e895de
Showing
13 changed files
with
159 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
apps/site/src/views/Resources/components/HeadingCard/HeadingCard.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
@use "zothacks-theme" as theme; | ||
@use "bootstrap-utils" as utils; | ||
|
||
$mobile-item-padding-y: 1.6rem; | ||
$mobile-item-padding-x: 2rem; | ||
|
||
$item-padding-y: 2rem; | ||
$item-padding-x: 3rem; | ||
|
||
$heading-font-size: 1.75rem; | ||
|
||
.card { | ||
background-color: theme.$white; | ||
border: 6px solid theme.$white; | ||
box-shadow: inset 0 0 0 6px theme.$black; | ||
border-radius: 16px; | ||
|
||
padding: $mobile-item-padding-y $mobile-item-padding-x; | ||
|
||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.bang { | ||
margin-right: $mobile-item-padding-x - 0.4375; | ||
} | ||
|
||
.title { | ||
font-size: $heading-font-size; | ||
font-weight: 600; | ||
color: theme.$light-blue; | ||
} | ||
|
||
.description { | ||
margin: 0; | ||
font-weight: 500; | ||
} | ||
|
||
@include utils.media-breakpoint-up(md) { | ||
.card { | ||
padding: $item-padding-y $item-padding-x; | ||
} | ||
|
||
.bang { | ||
margin-right: $item-padding-x - 0.4375; | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
apps/site/src/views/Resources/components/HeadingCard/HeadingCard.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import Image from "next/image"; | ||
import resourcesBang from "@/assets/images/resources-bang.svg"; | ||
|
||
import styles from "./HeadingCard.module.scss"; | ||
|
||
interface HeadingCardProps { | ||
title: string; | ||
description: string; | ||
} | ||
|
||
export default function HeadingCard({ title, description }: HeadingCardProps) { | ||
return ( | ||
<div className={styles.card}> | ||
<Image | ||
className={styles.bang} | ||
src={resourcesBang} | ||
alt="exclamation mark" | ||
/> | ||
<div> | ||
<h2 className={styles.title}>{title}</h2> | ||
<p className={styles.description}>{description}</p> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 10 additions & 12 deletions
22
apps/site/src/views/Resources/sections/ApiResources/ApiResources.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters