generated from taylorbryant/gatsby-starter-tailwind
-
-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add financial contributors (#1001)
fix: simplify hero banner
- Loading branch information
Showing
7 changed files
with
62 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { getSummaryReport } from '@/js/graphql/opencollective' | ||
import { FinancialBackerAccountType } from '@/js/types' | ||
import { DonateButton } from './LandingCTA' | ||
|
||
/** | ||
* List financial contributors | ||
*/ | ||
export const FinancialContributors: React.FC = async () => { | ||
const { donors, totalRaised } = await getSummaryReport() | ||
|
||
return ( | ||
<div className='rounded-box bg-accent/80 block w-full p-4 xl:p-10 mx-auto max-w-5xl xl:max-w-7xl'> | ||
<div className='flex items-center gap-6'> | ||
<h2>Financial Contributors</h2> | ||
<span className='mt-0.5 text-sm'>Total: {new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(totalRaised)}</span> | ||
</div> | ||
<hr className='mb-6 border-2 border-base-content' /> | ||
<div className='columns-3xs'> | ||
{donors.map(donor => <Donor key={donor.account.id} donor={donor} />)} | ||
</div> | ||
|
||
<div className='mt-6'><DonateButton /></div> | ||
</div> | ||
) | ||
} | ||
|
||
const Donor: React.FC<{ donor: FinancialBackerAccountType }> = ({ donor }) => { | ||
const { name } = donor.account | ||
return (<div className='text-sm uppercase'>{name}</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
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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
export const LandingHero: React.FC = () => { | ||
return ( | ||
<section className='w-full rounded-box pt-12 pb-24 px-16 text-center'> | ||
<h1 className='text-2xl md:text-5xl tracking-tighter font-semibold'>Share your climbing route knowledge!</h1> | ||
<p className=''>Join OpenBeta and help build a community resource for climbers</p> | ||
<section className='w-full px-6'> | ||
<h1 className='text-2xl tracking-tighter font-semibold'>Share your climbing route knowledge!</h1> | ||
<div className='font-medium text-neutral/80'>Join OpenBeta and help build a community resource for climbers</div> | ||
<hr className='mt-3 border-2 border-base-content w-full' /> | ||
</section> | ||
) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ import { Suspense } from 'react' | |
import { LandingCTA } from './components/LandingCTA' | ||
import { LandingHero } from './components/LandingHero' | ||
import { RecentEdits, RecentEditsSkeleton } from './components/RecentEdits' | ||
import { FinancialContributors } from './components/FinancialContributors' | ||
import { RecentTags } from './components/RecentTags' | ||
import { USAToC } from './components/USAToC' | ||
|
||
|
@@ -20,16 +21,23 @@ export default async function Home (): Promise<any> { | |
<div className='col-span-2 pb-10 rounded-box'> | ||
<LandingHero /> | ||
<LandingCTA /> | ||
<p className='mt-12 px-10 text-center text-sm'>Our website is undergoing a facelift. Visit the <a href='/classic' className='underline'>old home</a>. <br /><span className='text-base-content/60'>Questions or comments? <a href='mailto:[email protected]'>[email protected]</a></span></p> | ||
<Annoucement /> | ||
</div> | ||
<div className='mt-8 lg:mt-0 lg:overflow-y-auto lg:h-[800px] w-full'> | ||
<div className='mt-8 lg:mt-0 lg:overflow-y-auto lg:h-[800px] w-full border-2 rounded-box'> | ||
<Suspense fallback={<RecentEditsSkeleton />}> | ||
<RecentEdits /> | ||
</Suspense> | ||
</div> | ||
</div> | ||
<RecentTags /> | ||
<USAToC /> | ||
<FinancialContributors /> | ||
</div> | ||
) | ||
} | ||
|
||
const Annoucement: React.FC = () => ( | ||
<p className='mt-12 px-10 text-center text-sm'> | ||
Our website is undergoing a facelift. Visit the <a href='/classic' className='underline'>old home</a>. <br /> | ||
<span className='text-base-content/60'>Questions or comments? <a href='mailto:[email protected]'>[email protected]</a></span> | ||
</p>) |
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
e394b6e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
open-tacos – ./
openclimbmap.com
open-tacos-openbeta-dev.vercel.app
open-tacos-git-develop-openbeta-dev.vercel.app
tacos.openbeta.io
openbeta.io
www.openbeta.io