Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add recordings page populated from youtube playlist #63

Merged
merged 7 commits into from
Apr 24, 2024

Conversation

albertchae
Copy link
Contributor

Display content from https://www.youtube.com/playlist?list=PLh1QjGnfC2eTLiadQBo5o_l5aOcYdC6aV in a Recordings page

Recordings page is very similar to https://github.com/nixcon/2023.nixcon.org/blob/main/src/pages/recordings.astro
However, NixCon 2023's page is able to pull their video data from CCC's public API https://github.com/nixcon/2023.nixcon.org/blob/7ff6272e4b7660ebeb9a20b6d9a1048e271500b9/fetch.mjs#L12-L18
and AFAICT youtube's API requires some authentication.

Instead of wiring up all the authentication in this repo, as long as a developer has a google account, it is fairly simple to use their web based API explorer page
https://developers.google.com/youtube/v3/docs/playlistItems/list?apix_params=%7B%22part%22%3A%5B%22snippet%22%5D%2C%22maxResults%22%3A50%2C%22playlistId%22%3A%22PLh1QjGnfC2eTLiadQBo5o_l5aOcYdC6aV%22%7D
to get the JSON and since this JSON is unlikely to change often (maybe one more time to add the missing workshop), we can just manually update it then.

I also arbitrarily adjusted some small visual aspects (mostly due to the differences in data from youtube).

  • Increase line-clamp to 6 so that we can see more of the description returned from youtube
  • Use object-contain so we don't crop the images
  • Use items-center to center the thumbnail with the description text
  • Move the watch link to the video thumbnail

@albertchae albertchae marked this pull request as ready for review April 24, 2024 08:50
@djacu djacu closed this Apr 24, 2024
@djacu djacu reopened this Apr 24, 2024
@djacu djacu requested review from davidnuon and djacu April 24, 2024 15:49
@djacu djacu merged commit 3db000e into nixcon:main Apr 24, 2024
0 of 3 checks passed
@albertchae albertchae deleted the add-recordings-page branch April 24, 2024 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants