diff --git a/src/ocamlorg_frontend/components/learn_components.eml b/src/ocamlorg_frontend/components/learn_components.eml index 998f0319d2..acf69560c5 100644 --- a/src/ocamlorg_frontend/components/learn_components.eml +++ b/src/ocamlorg_frontend/components/learn_components.eml @@ -72,7 +72,6 @@ latest_version let exercise_card title -statement difficulty class_ = @@ -82,26 +81,30 @@ class_ | `Intermediate -> Some "Intermediate" | `Advanced -> Some "Advanced" in -
+

<%s title %>

-

<%s statement %>

<%s skill_tag difficulty_str "" %>
let exercise_block title -statement difficulty +(exercises : Data.Problem.t list) +(num_display : int) class_ = -
+
Exercise

Practice With Exercises

-
- <%s! exercise_card title statement difficulty class_ %> +
+ <% List.iteri (fun index (problem : Data.Problem.t) -> (if index < num_display then ( %> + <%s! exercise_card problem.title problem.difficulty class_ %> + <% ); %> + <% ); %> + <% ) exercises %>
- + See All Exercises <%s! Icons.arrow_small_right "h-6 w-6" %> -
+
\ No newline at end of file diff --git a/src/ocamlorg_frontend/pages/problems.eml b/src/ocamlorg_frontend/pages/problems.eml index d8640518c9..9a72ad3e10 100644 --- a/src/ocamlorg_frontend/pages/problems.eml +++ b/src/ocamlorg_frontend/pages/problems.eml @@ -68,7 +68,7 @@ Learn_layout.render
<% problems |> List.iteri (fun index (problem : Data.Problem.t) -> %> <% if index < 2 then ( %> - <%s! Learn_components.exercise_card problem.title problem.statement problem.difficulty "bg-learn-area-light-blue" %> + <%s! Learn_components.exercise_card problem.title problem.difficulty "bg-learn-area-light-blue" %> <% ) else ( %>
<% ); %>