diff --git a/packages/nextjs/app/_components/CompletedGrants.tsx b/packages/nextjs/app/_components/CompletedGrants.tsx index c961fe8..e13bfd2 100644 --- a/packages/nextjs/app/_components/CompletedGrants.tsx +++ b/packages/nextjs/app/_components/CompletedGrants.tsx @@ -32,8 +32,10 @@ const CompletedGrantCard = ({ title, description, askAmount, builder, link, comp ); }; -export const CompletedGrants = async () => { + +export const CompletedGrants = async ({ reducedView = false }) => { const completedGrants = await getAllCompletedGrants(); + const grantsToShow = reducedView ? completedGrants.slice(0, 8) : completedGrants; return (
@@ -42,11 +44,22 @@ export const CompletedGrants = async () => {

Completed grants

sparkle
-
- {completedGrants.map(grant => ( +
+ {grantsToShow.map(grant => ( ))}
+ {reducedView && ( +
+ + See all completed grants ({completedGrants.length}) + +
+ )}
); diff --git a/packages/nextjs/app/completed-grants/page.tsx b/packages/nextjs/app/completed-grants/page.tsx new file mode 100644 index 0000000..79ca808 --- /dev/null +++ b/packages/nextjs/app/completed-grants/page.tsx @@ -0,0 +1,8 @@ +import { CompletedGrants } from "../_components/CompletedGrants"; +import { NextPage } from "next"; + +const SubmitGrant: NextPage = () => { + return ; +}; + +export default SubmitGrant; diff --git a/packages/nextjs/app/page.tsx b/packages/nextjs/app/page.tsx index 9835252..4d45e5d 100644 --- a/packages/nextjs/app/page.tsx +++ b/packages/nextjs/app/page.tsx @@ -12,7 +12,7 @@ const Home = () => { - + ); diff --git a/packages/nextjs/styles/globals.css b/packages/nextjs/styles/globals.css index 3fb55ae..5d9e736 100644 --- a/packages/nextjs/styles/globals.css +++ b/packages/nextjs/styles/globals.css @@ -30,3 +30,24 @@ p { .btn.btn-ghost { @apply shadow-none; } + +/* Hide elements past the 3rd on screens smaller than 768px */ +@media (max-width: 767px) { + .grant-container-rwd > :nth-child(n + 4) { + display: none; + } +} + +/* Hide elements past the 4th on screens between 768px and 1024px */ +@media (min-width: 768px) and (max-width: 1023px) { + .grant-container-rwd > :nth-child(n + 5) { + display: none; + } +} + +/* Hide elements past the 6th on screens between 1024px and 1284px */ +@media (min-width: 1024px) and (max-width: 1284px) { + .grant-container-rwd > :nth-child(n + 7) { + display: none; + } +} diff --git a/packages/nextjs/tailwind.config.js b/packages/nextjs/tailwind.config.js index ac22557..e62eb35 100644 --- a/packages/nextjs/tailwind.config.js +++ b/packages/nextjs/tailwind.config.js @@ -29,7 +29,7 @@ module.exports = { "--tooltip-tail": "6px", }, ".link": { - textUnderlineOffset: "2px", + textUnderlineOffset: "6px", }, ".link:hover": { opacity: "80%",