Skip to content
This repository was archived by the owner on Feb 15, 2022. It is now read-only.

add tutorials to language page and create SplitCard component #485

Merged
merged 1 commit into from
Jul 23, 2021

Conversation

patricoferris
Copy link
Contributor

Changes

  • Added a tutorial call-to-action style component to the language page
  • Added a simple tutorial index page linking to all of the tutorials
  • Implemented a SplitCard component that is used on the language page and the events page (at the moment)

Discussion

This PR adds access to the tutorials we now have in ood. It partially completes #186 but the design is not identical. I was in favour of trying to converge on a common set of components by implementing a SplitCard component which I have then reused over on the events page too (which hopefully proves its usefulness).

The tutorial index page is incredibly simple, and just reuses the CardGrid, we'll probably want to redesign this page (I don't believe we have a design just for it) to make use of the proficiency levels and tags for better organisation. But for now I'm just in favour of getting a "clickable" way to get to any of the tutorials :))

Screenshots

The call to action section of the language page, it just displays the first few tutorials and then links to the index.

Tutorial call to action

The index page for the tutorials, nothing fancy 😅

Tutorial index page

@vercel
Copy link

vercel bot commented Jul 22, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/ocaml/v3-ocaml-org/FoUSkjjqGA6vEUhysChzQ1s3qayP
✅ Preview: https://v3-ocaml-org-git-fork-patricoferris-integrate-tutorials-ocaml.vercel.app

@patricoferris
Copy link
Contributor Author

You can see these changes, plus the changes to the books component at the same time using https://v3-ocaml-org-git-fork-patricoferris-fix-books-ocaml.vercel.app

<Route _to={#resourcesTutorial(tutorial.slug)} lang>
<a className="text-orangedark"> {s("Read more...")} </a>
</Route>
</div>
Copy link

Choose a reason for hiding this comment

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

Feel free to generalize this card as an abstract card in the component library, if you see potential for reuse.

@ghost
Copy link

ghost commented Jul 22, 2021

I'm not sure if you wanted a review or if you wanted me to look into the html or css in depth. I proactively added some comments. I didn't look at the html and css in depth, but the overall structure of the code looks good.

@@ -10,7 +10,7 @@ let make = (~cardData, ~renderCard, ~title=?, ()) => <>
</h2>
| None => <> </>
}}
<div className="grid grid-cols-1 lg:grid-cols-2 gap-x-40 gap-y-4 px-8">
<div className="grid grid-cols-1 lg:grid-cols-2 gap-x-28 gap-y-4 px-8">
Copy link

Choose a reason for hiding this comment

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

Consider introducing a variant with values "Wide | Normal" or similar, to allow the user to select this value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@patricoferris
Copy link
Contributor Author

Your reviews are always more than welcome (and very useful), I've created a couple of follow-up issues. Merging now! :)

@patricoferris patricoferris merged commit 4e9b102 into ocaml:master Jul 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant