Candy Database · Documentation

Style and theme A database can decide how it looks. Two parts, which a reader can turn off separately:
CoversSet with
StyleThe page: background, text, link and [code] colors, background image, the header's and footer's backgrounds, and the page's scroll bar.style
ThemeThe whole tab: top bar, sidebar, page list, buttons and menus.theme_name and theme
Using a theme that exists Name it, and the database is shown with it, whatever the reader chose:
{ "theme_name": "Candy_Arts" }
Themes are found by the name of their file: Standard and Candy_Arts come with Candy Database. Adjusting it Add a theme block for the parts you want to change. It goes over the theme in use. The keys are in Theme keys.
{ "theme_name": "Standard", "theme": { "accent_color": "#c0468f", "sidebar_color": "#241a2e" } }
The page style sets the colors of the page. Anything you leave out is the reader's (or the theme's).
{ "style": { "background_color": "#fffdf5", "text_color": "#222222" } }
Which one wins For the page colors, the last of these that sets a value wins:
  1. The theme's own colors.
  2. The reader's colors from the settings.
  3. The database's style.
For the look of the tab: the theme the database names (or else the reader's), then the database's theme block on top. A reader can turn either off for a database. Then they get their own theme or colors instead. See Settings. Fonts A database's own theme can use fonts: font, bold_font and mono_font (for [code] text; the editor's code font when left out) are files of the database folder (TTF or OTF), and font_size sets the size of the tab's text. Fonts are not available in theme files.