File tree Expand file tree Collapse file tree 3 files changed +8
-9
lines changed Expand file tree Collapse file tree 3 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 4545module Problem = struct
4646 include Problem
4747
48- let difficulty_to_string = function
49- | `Beginner -> " Beginner"
50- | `Intermediate -> " Intermediate"
51- | `Advanced -> " Advanced"
52-
5348 let filter_tag ?tag =
5449 let f x =
5550 Option. fold ~none: (x.tags = [] ) ~some: (Fun. flip List. mem x.tags) tag
Original file line number Diff line number Diff line change @@ -162,7 +162,6 @@ module Problem : sig
162162 solution : string ;
163163 }
164164
165- val difficulty_to_string : difficulty -> string
166165 val all : t list
167166 val filter_tag : ?tag : string -> t list -> t list
168167end
Original file line number Diff line number Diff line change @@ -26,6 +26,11 @@ let danger = function
2626 | `Intermediate -> "☡"
2727 | `Advanced -> "☡☡"
2828
29+ let difficulty_to_string = function
30+ | `Beginner -> "Beginner"
31+ | `Intermediate -> "Intermediate"
32+ | `Advanced -> "Advanced"
33+
2934let render
3035?(difficulty_level = "All")
3136(problems : Data.Problem.t list)
@@ -76,12 +81,12 @@ Learn_layout.render
7681 <div x-data="{statement: true}" id="<%s" problem.number %>
7782 >
7883 <div class="flex space-y-4 xl:space-y-0 flex-col xl:flex-row xl:justify-between">
79- <span aria-hidden="true" class="danger invisible xl:visible" title="<%s Data.Problem. difficulty_to_string problem.difficulty ^ " difficulty" %>"><%s danger problem.difficulty %></span>
84+ <span aria-hidden="true" class="danger invisible xl:visible" title="<%s difficulty_to_string problem.difficulty ^ " difficulty" %>"><%s danger problem.difficulty %></span>
8085 <h4 class="font-bold text-body-600">
8186 <%s problem.title %>
82- <span aria-hidden="true" class="ml-2 visible xl:invisible" title="<%s Data.Problem. difficulty_to_string problem.difficulty ^ " difficulty" %>"> <%s danger problem.difficulty %></span>
87+ <span aria-hidden="true" class="ml-2 visible xl:invisible" title="<%s difficulty_to_string problem.difficulty ^ " difficulty" %>"> <%s danger problem.difficulty %></span>
8388 </h4>
84- <div class="w-0 h-0 overflow-hidden"><%s Data.Problem. difficulty_to_string problem.difficulty ^ " difficulty" %></div>
89+ <div class="w-0 h-0 overflow-hidden"><%s difficulty_to_string problem.difficulty ^ " difficulty" %></div>
8590 <div class="flex bg-body-600 bg-opacity-5 rounded-md p-1 items-center">
8691 <button
8792 class="px-3.5 h-9 font-medium flex space-x-2 items-center rounded-lg"
You can’t perform that action at this time.
0 commit comments