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

Video Block Component [Learn Area Redesign] #1480

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions src/ocamlorg_frontend/components/learn_components.eml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,38 @@ latest_version
<%s! install_card latest_version %>
<%s! standard_lib_card %>
</div>

let video
~video_url
~thumbnail_url
~title
~description
=
<div class="flex flex-col gap-x-6 lg:grid lg:grid-cols-2">
<div class="lg:order-1">
<a href="<%s video_url %>" class="block w-full h-auto">
<img src="<%s thumbnail_url %>" alt="<%s title %>" class="w-full h-auto lg:h-44 object-cover" />
</a>
</div>
<div class="lg:order-2 mt-4 lg:mt-0">
<h3 class="text-lg font-semibold mb-2"><%s title %></h3>
<p class="text-gray-600"><%s description %></p>
</div>
</div>


let video_block
~video_url
~thumbnail_url
~title
~description
=
<div class="w-full h-[42rem] bg-[#040113] md:w-1/2 md:pr-24">
<div class="pt-4 text-white text-sm text-left font-medium leading-7 tracking-widest"> VIDEO </div>
<h2 class="mt-2 text-white text-2xl text-left font-normal leading-7"> Recommended Videos </h2>
<%s! video ~video_url ~thumbnail_url ~title ~description %>
<a href="https://watch.ocaml.org/" class="flex gap-4 mt-4 text-white text-lg font-bold inline-flex items-center underline leading-10">
See more videos
<%s! Icons.arrow_small_right "h-6 w-6" %>
</a>
</div>
4 changes: 4 additions & 0 deletions src/ocamlorg_frontend/pages/learn.eml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ Learn_layout.render
</a>
</div>

<div>
<%s! Learn_components.video_block ~video_url:"" ~thumbnail_url:"" ~title:"" ~description:"" %>
</div>

<div class="mt-10 lg:mt-20">
<h3 class="font-bold">Recommended Books</h3>
<div class="mt-6 text-lighter mb-12 text-lg">
Expand Down