Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Sponsor Styling #154

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 16 additions & 19 deletions apps/site/src/app/(home)/sections/Sponsors/Sponsors.module.scss
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
@use "zothacks-theme" as theme;
@use "bootstrap-utils" as utils;

.container {
padding-top: 6rem;
padding-bottom: 6rem;
}
// .container {
// padding-top: 6rem;
// padding-bottom: 6rem;
// }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chore: little value in keeping around old commented code, better to just remove it


.title {
text-align: center;
color: theme.$white;
font-size: 3rem;
font-size: 2rem;
font-weight: bold;
margin-bottom: 3rem;

@include utils.media-breakpoint-down(sm) {
font-size: 2rem;
@include utils.media-breakpoint-up(md) {
font-size: 3rem;
}
}

Expand All @@ -28,7 +28,7 @@
}

.logo {
width: calc(25% - 1.5rem);
width: calc(50% - 1.5rem);
aspect-ratio: 16 / 9;
background-color: theme.$white;
border-radius: 8px;
Expand All @@ -41,12 +41,12 @@
transform: scale(1.05);
}

@include utils.media-breakpoint-down(md) {
@include utils.media-breakpoint-up(sm) {
width: calc(33.333% - 1.5rem);
}

@include utils.media-breakpoint-down(sm) {
width: calc(50% - 1.5rem);
@include utils.media-breakpoint-up(lg) {
width: calc(25% - 1.5rem);
}

img {
Expand All @@ -59,17 +59,14 @@
.placeholderLogo {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
color: theme.$black;
text-align: center;
padding: 1rem;
font-size: 1rem; // Default font size
padding: 0.5rem;
font-size: 0.8rem;

@include utils.media-breakpoint-down(sm) {
font-size: 0.8rem; // Smaller font size for mobile
padding: 0.5rem; // Reduced padding for mobile to accommodate smaller text
@include utils.media-breakpoint-up(md) {
font-size: 1rem;
padding: 1rem;
}
}
5 changes: 3 additions & 2 deletions apps/site/src/app/(home)/sections/Sponsors/Sponsors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { getSponsors } from "./getSponsors";
import styles from "./Sponsors.module.scss";
import { client } from "@/lib/sanity/client";
import imageUrlBuilder from "@sanity/image-url";
import { Container } from "react-bootstrap";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chore: I forget if Next.js handles this well, but to be safe, we'll want to import just the individual component, i.e. import Container from "react-bootstrap/Container"

Import individual components rather than the entire library. Doing so pulls in only the specific components that you use (React Bootstrap, Importing Components)


const builder = imageUrlBuilder(client);

Expand Down Expand Up @@ -31,7 +32,7 @@ const Sponsors = async () => {
const allSponsors = [...sponsors.sponsors, ...fakeSponsorLogos];

return (
<section className={styles.container}>
<Container as="section">
<h2 className={styles.title}>SPONSORS</h2>
<div className={styles.logos}>
{allSponsors.map(({ _key, name, url, logo }) => (
Expand All @@ -53,7 +54,7 @@ const Sponsors = async () => {
</a>
))}
</div>
</section>
</Container>
);
};

Expand Down