Skip to content

Commit

Permalink
Add Sponsorship Section to Homepage (#89)
Browse files Browse the repository at this point in the history
* Add sponsorship section to homepage

* Fix heart icon alignment

* Address PR comments
  • Loading branch information
anyaparekh authored Aug 16, 2023
1 parent c76e82b commit fc4f9ce
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/components/Icon.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@
export let icon: IconType;
export let width: string | number = "100%";
export let height: string | number = "100%";
export let inline = false;
export let color = "currentColor";
</script>

<Icon icon={iconMap[icon].name} {width} {height} {color} />
<Icon icon={iconMap[icon].name} {width} {height} {color} {inline} />
1 change: 1 addition & 0 deletions src/lib/utils/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export type Info = {
applicationBlurb: string;
homepageAbout: Image;
homepagePartnerships: Image;
homepageSponsorships: Image;
homepageBannerText: string;
homepageBannerUrl: string;
};
Expand Down
30 changes: 30 additions & 0 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,32 @@
</Row>
</Section>

<Section id="sponsorships" color="var(--blue)" padding="60px">
<Row gap={84} reverse
><figure>
<img
src={data.info.homepageSponsorships.src}
alt={data.info.homepageSponsorships.alt}
/>
</figure>
<div id="sponsorship-content">
<h2>
We
<Icon icon="heart" width="1em" height="1em" inline />
Our Sponsors
</h2>
<div class="row-center" />
<p>
A sponsorship with Hack4Impact is a lasting relationship that brings us
to your community and, in turn, supports our work.
</p>
<div class="row-center gap">
<Button type="primary-white" href="/join/sponsors">Work With Us</Button>
</div>
</div>
</Row>
</Section>

<style>
a {
text-decoration: none;
Expand Down Expand Up @@ -163,6 +189,10 @@
color: var(--blue-darker);
}
#sponsorship-content {
color: white;
}
figure > img {
width: 100%;
border-radius: 4px;
Expand Down

1 comment on commit fc4f9ce

@vercel
Copy link

@vercel vercel bot commented on fc4f9ce Aug 16, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.