Skip to content

Add admonition boxes for tips, notes, warnings.#29

Merged
robguthrie merged 13 commits into
loomio:mainfrom
cooldracula:zach/tip-note-boxes
Jun 5, 2026
Merged

Add admonition boxes for tips, notes, warnings.#29
robguthrie merged 13 commits into
loomio:mainfrom
cooldracula:zach/tip-note-boxes

Conversation

@cooldracula

Copy link
Copy Markdown
Contributor

NOTE! This pr builds off #27 . #27 should be reviewed first. If it is not merged, then this pr can be closed.


This adds a consistent way to indicate tips and notes throughout the docs, using the admonition syntax available in mdbook v0.5+.

Currently, notes and tips are indicated in a few different ways...sometimes as bullet points, sometimes as bolded text,a nd sometimes within quotes. I streamlined them to all use the admonition syntax.

I also added colours for the admonitions, using colours present in the Loomio app. I am not attached to my choices here and happy to use different ones. Is there a theme palette I should be checking for any stuff like this?

The admonition syntax also has notice boxes for "Important" and "Caution". We haven't used either term really in the docs, and so I didn't add theme colours for these. I figured we could decide a colour if and when we decide to use either of them.

This is an optional way to develop. Nix is not required to work on
this.  However, it adds a nice peace of mind if using nix that the
version of mdbook is always the same across development environments,
pinned to an exact commit of the nix pkg repository.
This was made by initiating a fresh theme using mdbook 0.5.0 (mdbook
init --theme) and then porting our major theme changes (notably colour
scheme and some head tags) from our original theme over to this one.
This makes a few changes so that we can have the newest sidebar, with
its folded sections, but also include our logo in the top left.

Used this issue as a guide: rust-lang/mdBook#2490

I also added a custom.css so that we could keep the html succinct,
moving the styling to our own CSS file.
The way the TOC is generated, if you just adjust the innerhtml, it
upsets the procedure for the TOC stack and ends up lacing the active
section above the logo, making it look bad.  This new method, supplied
by maintainer of mdbook, properly prepends the logo above the TOC after
it has already been generated.
I am using the variable pattern of the other themes in mdbook, and used
two colours present in the loomio app itself, to best match the current theme.

Note is the same colour as the "new" indicator in loomio and "tip" is
the brass orange of the notification badge and various buttons across
the app.
@robguthrie robguthrie merged commit 3db243f into loomio:main Jun 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants