diff options
author | Sébastien Dailly <sebastien@dailly.me> | 2022-02-07 15:38:37 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@dailly.me> | 2022-02-07 16:01:12 +0100 |
commit | 77544bdfad2af41514ec1435f706fee87ea2969e (patch) | |
tree | 4de23870e08711da25ff92e9670370fc0a74e459 /blog/sidebar.ml | |
parent | ad526111f0dd619ae9e0e98ef2253146b58a068f (diff) |
Added viz.js code
Diffstat (limited to 'blog/sidebar.ml')
-rwxr-xr-x | blog/sidebar.ml | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/blog/sidebar.ml b/blog/sidebar.ml deleted file mode 100755 index 1df0f1a..0000000 --- a/blog/sidebar.ml +++ /dev/null @@ -1,23 +0,0 @@ -open StdLabels -open Brr - -(** Return the sidebar *) -let get - : unit -> El.t option - = fun () -> - - List.find_opt (El.children @@ Document.body G.document) - ~f:(fun t -> El.has_tag_name El.Name.aside t) - -let rec clean - : El.t -> unit - = fun el -> - List.iter (El.children el) - ~f:(fun el -> - (* Remove the links from the sidebar, keep h1 and other stuff *) - if (El.has_tag_name (Jstr.v "nav") el) - || (El.has_tag_name (Jstr.v "ul") el) then - El.remove el - else - clean el - ) |