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

enable opening workshops and directories in github #25

Merged
merged 3 commits into from
May 25, 2022
Merged

Conversation

duanwilliam
Copy link
Contributor

@duanwilliam duanwilliam commented May 25, 2022

motivation

atm we're linking people to our github repository for information - this is especially relevant since we've got some pretty decked out READMEs for workshops now. This means it's harder to discover this website, though.

This PR makes it so we can provide a link to the website and people who want to check out the GitHub will still be able to go there easily.

Going into the future, we could look into parsing the README of intermediary directories as well and use that as the page contents instead of the children grid (as the sidebar provides navigation anyway), and only use the children grid as a fallback. Doing this would make the website viewing experience even more integrated and probably round off any major discrepancies between the website and the github repo outside of rendering Jupyter separate cells and outputs (see #7, #9)

what it does

in a similar vein to the "Open in Colab" button, this provides a link for users to navigate directly to the corresponding directory or file in this GitHub repository.

also: proper git usage would mean doing this in a separate pr but i fixed a css bug with displaying the category items here as well

@vercel
Copy link

vercel bot commented May 25, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
acm-ai-workshops ✅ Ready (Inspect) Visit Preview May 25, 2022 at 5:18AM (UTC)

@@ -1,6 +1,6 @@
.grid {
display: grid;
grid-template-columns: repeat(auto-fill, min(100%, minmax(360px , 1fr))); // TODO
grid-template-columns: repeat(auto-fill, minmax(360px , 1fr)); // TODO
Copy link
Member

Choose a reason for hiding this comment

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

fr units 😳

@@ -0,0 +1,39 @@
import { useMemo } from "react"
Copy link
Member

Choose a reason for hiding this comment

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

small nit but we could turn open in X a component in itself. Basically accepts a url generator and icon. But i think we're only ever gonna do github and colab really so it's probably fine.

@duanwilliam duanwilliam merged commit 39ab7e3 into main May 25, 2022
@duanwilliam duanwilliam deleted the open-in-github branch May 25, 2022 05:26
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.

2 participants