hminsky2002 / WNYU

Typescript and Next.js website for WNYU
https://wnyu.vercel.app
MIT License
0 stars 0 forks source link

Add Video Cards to home page #54

Closed hminsky2002 closed 1 month ago

hminsky2002 commented 3 months ago

We want to be able to have some up to date videos and images on the front-page of the site, as seen in the mobile mockup here

Card for an announcement image up top

Image

For the scope of this issue, we just want to add a single new component to the top of the home page, which receives data from sanity.

This will require adding a new schema to the sanity schema types, adding a query for fetching the image, generating new typescript types for the schema and query

(As per the guide, the commands 'npx sanity@latest schema extract' and 'npx sanity@latest typegen generate' create (or update) the schema.json and sanity.types.ts files which are then used to type components that fetch from sanity.) See PR https://github.com/hminsky2002/WNYU/pull/41 for more details

And then implementing a new component, say "Announcement", which ingests the image from sanity.

For the schema specifications, it should at minimum have a field for the image being uploaded, and a field for a caption for the image.

hminsky2002 commented 1 month ago

Boy this is an out of date description. In actuality, what we now want are content embed links to youtube videos, as depicted below:

Screenshot 2024-09-18 at 10 00 03 PM
hminsky2002 commented 1 month ago

Actually, since these are explicitly videos and not any other type of media, we should rename these to video cards. Content cards could reasonably be links to articles, shows, or podcasts in the future.