Introduction
A lozenge is nothing but content wrapped in a box with background color. Below are macros for two kinds of content: text only, rendered content.
Macro
Simple lozenge:
## Macro has a body: Yes
## Body processing: None
## @param text:title=Text|string=string
## @param color:title=Color|type=string|required=true|default=#0000ff
## @param textcolor:title=Text Color|type=string|required=true|default=#ffffff
<span style="background-color:$paramcolor; color:$paramtextcolor; border-radius:3px; padding:0px 3px 2px 3px">$paramtext</span>
Make sure to select "No macro body" in the "Macro Body Processing" section.
General lozenge:
## Macro has a body: Yes
## Body processing: Rendered
## @param color:title=Color|type=string|required=true|default=#0000ff
## @param textcolor:title=Text Color|type=string|required=true|default=#ffffff
<span style="background-color:$paramcolor; color:$paramtextcolor; border-radius:3px; padding:0px 3px 2px 3px">$body</span>
Make sure to select "Rendered" in the "Macro Body Processing" section.
Using It
For use in the sidebar, I disable the sidebar links that can be configured using the "Space Tools → Configure sidebar" and customize the space-specific sidebar ("Space tools → Look and Feel"):
pointing to a special page called _sidebar which looks like:
*Because some of the content (e.g., contacts, spaces) in the _sidebar is reused in other spaces, the actual _sidebar page uses the IncludePage macro to pull in separate _contacts and _spaces pages which are in a different space set up for such things.
Result
The result is quite aesthetically pleasing and works as desired:
Using the macro and _sidebar page, the sidebar benefits from a menu like look and feel and can also be tailored more fully than is possible using "Space tools → Configure sidebar".
Although the focus has been on the sidebar, the macro can be used in regular pages and be combined with, e.g., panels and tables, to provide a menu like look and feel.