From 8dd7a7d0ed90c827d906af931c9278ce65d8a8fc Mon Sep 17 00:00:00 2001 From: saysayo Date: Wed, 9 Aug 2023 12:49:26 +0100 Subject: [PATCH] fixed layout --- .../components/learn_components.eml | 29 ++++++++++--------- src/ocamlorg_frontend/pages/learn.eml | 5 ++++ src/ocamlorg_frontend/pages/outreachy.eml | 3 -- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/src/ocamlorg_frontend/components/learn_components.eml b/src/ocamlorg_frontend/components/learn_components.eml index 3cd1dab6d1..902fc570b0 100644 --- a/src/ocamlorg_frontend/components/learn_components.eml +++ b/src/ocamlorg_frontend/components/learn_components.eml @@ -17,31 +17,34 @@ class_ let book_tile books = -
+
<% books |> List.rev |> List.iteri (fun index (item : Data.Book.t) -> if (index < 2) then ( %>
<%s! skill_tag item.difficulty "mt-2 grow-0 w-28" %> -

<%s item.title %>

-

Suitable for complete beginners to programming

+

<%s item.title %>

+

Suitable for complete beginners to programming

<% ) else %> <% ); %>
- +type link = {href : string; name : string} let books_content_block books +~(link : link ) = -
-
Books
-

Recommended Books

- <%s! book_tile books %> - - See all books - <%s! Icons.arrow_small_right "h-6 w-6" %> - +
+
+
BOOK
+

Recommended Books

+ <%s! book_tile books %> + + <%s link.name %> + <%s! Icons.arrow_small_right "h-6 w-6" %> + +
\ No newline at end of file diff --git a/src/ocamlorg_frontend/pages/learn.eml b/src/ocamlorg_frontend/pages/learn.eml index f714f56094..508f1aaf93 100644 --- a/src/ocamlorg_frontend/pages/learn.eml +++ b/src/ocamlorg_frontend/pages/learn.eml @@ -53,6 +53,11 @@ Learn_layout.render
+
+ <%s! Learn_components.books_content_block Data.Book.featured ~link:{href = Url.books; name = "See All Books"} %> +
+
+

Papers

diff --git a/src/ocamlorg_frontend/pages/outreachy.eml b/src/ocamlorg_frontend/pages/outreachy.eml index 22e4389166..489fb10fac 100644 --- a/src/ocamlorg_frontend/pages/outreachy.eml +++ b/src/ocamlorg_frontend/pages/outreachy.eml @@ -44,7 +44,4 @@ Layout.render
<% ); %>
- -
-<%s! Learn_components.books_content_block Data.Book.featured %>
\ No newline at end of file