aboutsummaryrefslogtreecommitdiff
path: root/blog
diff options
context:
space:
mode:
Diffstat (limited to 'blog')
-rwxr-xr-xblog/dune1
-rwxr-xr-xblog/nord.ml1
-rwxr-xr-xblog/sidebar.ml93
3 files changed, 2 insertions, 93 deletions
diff --git a/blog/dune b/blog/dune
index 43b14ed..afbefdb 100755
--- a/blog/dune
+++ b/blog/dune
@@ -3,6 +3,7 @@
(libraries
brr
brr.note
+ color
elements
)
)
diff --git a/blog/nord.ml b/blog/nord.ml
new file mode 100755
index 0000000..78c4c61
--- /dev/null
+++ b/blog/nord.ml
@@ -0,0 +1 @@
+let nord0 = Jstr.v "#2e3440"
diff --git a/blog/sidebar.ml b/blog/sidebar.ml
index 83afb13..a1293de 100755
--- a/blog/sidebar.ml
+++ b/blog/sidebar.ml
@@ -1,7 +1,5 @@
open StdLabels
open Brr
-open Brr_note
-open Note
(** Return the sidebar *)
let get
@@ -24,94 +22,3 @@ let rec clean
clean el
)
-let click_event el =
- Evr.on_el
- Ev.click
- Evr.unit
- el
-
-let show_value = function
- | None -> El.txt' ""
- | Some input ->
- El.txt (Jstr.of_int input)
-
-let add_button
- : El.t -> unit E.t * unit E.t
- = fun element ->
-
- let open El in
-
- let delete =
- button
- [ El.i
- ~at:At.[ class' (Jstr.v "fas")
- ; class' (Jstr.v "fa-times-circle") ]
- []
- ; txt' "Delete "] in
-
- let delete_event = click_event delete in
-
- let export =
- button
- [ El.i
- ~at:At.[ class' (Jstr.v "fas")
- ; class' (Jstr.v "fa-download") ]
- []
- ; txt' "Download"] in
- let export_event = click_event export in
-
-
- let nib_size, value =
- Elements.Input.slider
- ~at:At.[ type' (Jstr.v "range")
- ; v (Jstr.v "min") (Jstr.v "0")
- ; v (Jstr.v "max") (Jstr.v "50")
- ; id (Jstr.v "nib_size")
- ] in
-
- let width = El.div [] in
- Elr.def_children
- width
- (value
- |> S.map (fun v ->
- [ txt' "Width : "
- ; show_value v ]
- )
- );
-
- let input_angle, angle_event =
- Elements.Input.slider
- ~at:At.[ type' (Jstr.v "range")
- ; v (Jstr.v "min") (Jstr.v "0")
- ; v (Jstr.v "max") (Jstr.v "90")] in
- let angle = El.div [] in
- Elr.def_children
- angle
- (angle_event
- |> S.map (fun v ->
- [ txt' "Angle : "
- ; show_value v
- ; txt' "°" ]
- )
- );
-
- let click = Evr.on_el Ev.click Evr.unit delete in
- let _ = click in
-
- let () =
- El.append_children element
- [ hr ()
- ; delete
- ; export
- ; hr ()
-
- ; width
- ; nib_size
- ; El.br ()
-
- ; angle
- ; input_angle
-
- ]
- in
- delete_event, export_event