Skip to content

Commit

Permalink
basic implementation of Sponsors section
Browse files Browse the repository at this point in the history
  • Loading branch information
harryo583 committed Nov 24, 2024
1 parent 082f879 commit 4a06509
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 0 deletions.
65 changes: 65 additions & 0 deletions src/components/Sponsors/Sponsors.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
@use "../../shared/colors";

#sponsors {
padding: 2rem;
background-color: colors.$global-very-dark-green;
text-align: center;

h2 {
font-size: 2rem;
color: colors.$global-light;
margin-bottom: 1.5rem;
font-weight: 900;
}

.sponsors__container {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 1.5rem;
justify-content: center;
align-items: center;
max-width: 1200px;
margin: 0 auto;

.sponsors__card:nth-child(1),
.sponsors__card:nth-child(5) {
grid-column: span 2;
}

.sponsors__card:nth-child(3) {
grid-row: span 2;
}
}

.sponsors__card {
text-decoration: none;
text-align: center;
background-color: colors.$global-light;
border-radius: 0.5rem;
padding: 1rem;
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
transition: transform 0.3s ease, box-shadow 0.3s ease;

&:hover {
transform: translateY(-5px);
box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.3);
}

.sponsors__logo {
max-width: 100%;
max-height: 6rem;
margin-bottom: 0.5rem;
object-fit: contain;
}
}
}

@media (max-width: 800px) {
#sponsors {
padding: 1rem;

.sponsors__container {
grid-template-columns: repeat(2, 1fr);
}
}
}
40 changes: 40 additions & 0 deletions src/components/Sponsors/Sponsors.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import React from 'react';
import './Sponsors.scss';

const Sponsors: React.FC = () => {
const sponsors = [
{ name: 'Sponsor 1', logo: '/sponsor1.png', link: 'https://sponsor1.com' },
{ name: 'Sponsor 2', logo: '/sponsor2.png', link: 'https://sponsor2.com' },
{ name: 'Sponsor 3', logo: '/sponsor3.png', link: 'https://sponsor3.com' },
{ name: 'Sponsor 4', logo: '/sponsor4.png', link: 'https://sponsor4.com' },
{ name: 'Sponsor 5', logo: '/sponsor5.png', link: 'https://sponsor5.com' },
{ name: 'Sponsor 6', logo: '/sponsor6.png', link: 'https://sponsor6.com' },
{ name: 'Sponsor 7', logo: '/sponsor7.png', link: 'https://sponsor7.com' },
{ name: 'Sponsor 8', logo: '/sponsor8.png', link: 'https://sponsor8.com' },
];

return (
<section id="sponsors">
<h2>Sponsors</h2>
<div className="sponsors__container">
{sponsors.map((sponsor, index) => (
<a
key={index}
href={sponsor.link}
target="_blank"
rel="noopener noreferrer"
className="sponsors__card"
>
<img
src={sponsor.logo}
alt={`${sponsor.name} logo`}
className="sponsors__logo"
/>
</a>
))}
</div>
</section>
);
};

export default Sponsors;

0 comments on commit 4a06509

Please sign in to comment.