(** Ogit's vocabulary of page parts. Where {!Ui} supplies generic building blocks, this module names the parts specific to a Git browser and wires them to {!Routes}, so page modules can describe a page without mentioning HTML or URL strings. Every function returns a {!Ui.node}. Nothing here performs I/O. *) (** {1 Page identity} *) type page = | Summary | Commits | Files (** Which repository page is being shown. Drives the [aria-current] marker in the navigation. *) type site = { user_name : string; root_title : string; nav_logo : string } (** Site-wide presentation settings, resolved once from configuration. *) val site : user_name:string -> root_title:string -> nav_logo:string -> site (** Construct a {!site} record. *) (** {1 Routes as links} *) val url : Routes.t -> string (** Generate the URL path for a route. *) val route_link : ?class_:string -> ?label:string -> Routes.t -> string -> Ui.node (** A link to a route, with the route standing in for a hand-written URL. *) val commits_url : ?filter_type:string -> ?author:string -> ?committer:string -> ?page_number:int -> string -> string (** Build the URL for a commit list page, preserving active filters as query parameters. *) val clone_url : string -> string (** The URL from which a repository can be cloned. *) (** {1 Navigation} *) val site_nav : title:string -> logo:string -> ?home_href:string -> unit -> Ui.node (** Top navigation for the repository list and project directory pages. *) val repo_nav : active:page -> logo:string -> string -> Ui.node (** Top navigation within a repository. *) val compact_repo_nav : active:page -> string -> Ui.node (** Bottom navigation for narrow viewports within a repository. *) (** {1 Toolbar} *) val toolbar : Ui.node list -> Ui.node (** A toolbar container for repository page controls. *) (** {1 Trees} *) val directory : ?modifier:string -> route:Routes.t -> name:string -> Ui.node list -> Ui.node (** A directory row that both expands in place and links to its own page. *) val file_entry : ?modifier:string -> route:Routes.t -> string -> Ui.node (** A file row linking to the blob view. *) val overflow_row : route:Routes.t -> int -> Ui.node (** The row closing a truncated listing, linking to the full contents. *) (** {1 Sections} *) val group : ?expanded:bool -> title:string -> Ui.node list -> Ui.node (** A collapsible group of repositories on the root page. *) (** {1 Inline pieces} *) val commit_type_badge : ?href:string -> string -> Ui.node (** A conventional-commit type badge, coloured per type. *) val inline_readme : ?filename:string -> string -> Ui.node (** A README rendered as semantic documentation. *)