Module Arod_component.Sidebar

Sidebar component for entry pages.

Shows contextual information including thumbnail, DOI link, related entries via backlinks, PDF download link for papers, and a container for JS-populated sidenotes.

module Entry = Bushel.Entry
module Paper = Bushel.Paper
module Note = Bushel.Note
module I = Arod.Icons
val meta_line : icon:string -> Htmlit.El.html -> Htmlit.El.html
val meta_line_block : icon:string -> Htmlit.El.html -> Htmlit.El.html

Like meta_line but uses div elements so block-level children (e.g. popover cards) are valid HTML and don't get restructured by the browser.

val contact_initials : string -> string

Resolves forward + backlinks for a slug, renders a compact list with overflow modal. Returns (links_el, modal_el).

val entry_type_icon : ?opacity:string -> ?size:int -> [< `Idea of 'a | `Note of 'b | `Paper of 'c | `Project of 'd | `Video of 'e ] -> string

Icon for an entry's type (note, paper, idea, etc.).

val truncate_str : int -> String.t -> String.t
val entry_links : ctx:Arod.Ctx.t -> string -> Htmlit.El.html * Htmlit.El.html

Activity Stream

Shared rendering for activity rows used by project and paper detail pages.

val ptime_date_short : (int * int * 'a) -> string
val activity_row : ctx:Arod.Ctx.t -> Entry.entry -> Htmlit.El.html

Render a single activity row with type icon, title, date, and detail.

val activity_stream : ctx:Arod.Ctx.t -> title:string -> Entry.entry list -> Htmlit.El.html

Build an activity stream section from a list of entries. Returns El.void if the list is empty.

Unified "Related" section combining bushel entry backlinks and feed backlinks at the very bottom of article pages, using type icons for entries and RSS icons for feed items.

Render a feed backlink as an activity row with RSS icon and contact name.

A unified item for sorting entry backlinks and feed backlinks together.

Build a unified "Related" section combining bushel entry backlinks and feed backlinks, sorted newest-first. Returns El.void if there are no related items.

Contact Popover

Shared hover card for contacts. Shows photo, name, current org, and social links. Reusable from sidebar avatars and sidenotes.

module Contact = Sortal_schema.Contact

Build a matrix.to link and display handle from a Matrix service entry. The service URL is the homeserver domain, handle is the username. Returns (link_url, display_handle).

val contact_popover_card : Contact.t -> thumb:string option -> Htmlit.El.html
val contact_avatar : ctx:Arod.Ctx.t -> Contact.t -> Htmlit.El.html

Inline avatar with hover popover.

val contact_inline : ctx:Arod.Ctx.t -> Contact.t -> Htmlit.El.html

Inline contact row with name + social icons (no popover).

Entry-type Meta Boxes

Build a list of social icon link elements from a social record. ~size controls the icon size (e.g. 12 for sidebar, 16 for inline).

val social_icons_el : Bushel.Types.social option -> Htmlit.El.html
val note_meta : ctx:Arod.Ctx.t -> Note.t -> Htmlit.El.html
module Idea = Bushel.Idea
val idea_meta : ctx:Arod.Ctx.t -> Idea.t -> Htmlit.El.html

Idea-specific metadata for sidebar.

val paper_meta : ctx:Arod.Ctx.t -> Paper.t -> Htmlit.El.html

Paper-specific metadata for sidebar.

module Project = Bushel.Project
val project_meta : ctx:Arod.Ctx.t -> Project.t -> Htmlit.El.html

Project-specific metadata for sidebar.

Socials Box

Renders a sidebar box with the author's social links from Sortal contact data.

val socials_box : ctx:Arod.Ctx.t -> Htmlit.El.html
val for_entry : ctx:Arod.Ctx.t -> ?sidenotes:Arod.Md.sidenote list -> Entry.entry -> Htmlit.El.html