hugo-theme-relearn/exampleSite/content/configuration/appearance/generator/_index.en.md

40 lines
2.6 KiB
Markdown
Raw Normal View History

+++
2024-09-29 21:48:56 +00:00
description = "An interactive tool to generate color variant stylesheets"
mermaid.force = true
options = ["themeVariant"]
2024-09-21 11:05:58 +00:00
title = "Stylesheet Generator"
2024-09-29 21:48:56 +00:00
weight = 9
+++
This interactive tool may help you to generate your own color variant stylesheet.
{{% expand "Show usage instructions" %}}
2023-11-20 23:53:33 +00:00
To get started, first select a color variant from the variant selector in the lower left sidebar that fits you best as a starting point.
The graph is interactive and reflect the current colors. You can click on any of the colored boxes to adjust the respective color. The graph **and the page** will update accordingly.
2024-04-12 15:30:16 +00:00
The arrowed lines reflect how colors are inherited through different parts of the theme if the descendent isn't overwritten. If you want to delete a color and let it inherit from its parent, just delete the value from the input field.
2022-10-31 11:10:36 +00:00
To better understand this select the `neon` variant and modify the different heading colors. There, colors for the heading `h2`, `h3` and `h4` are explicitly set. `h5` is not set and inherits its value from `h4`. `h6` is also not set and inherits its value from `h5`.
2023-11-20 23:53:33 +00:00
Once you've changed a color, the variant selector will show a "My custom variant" entry and your changes are stored in the browser. You can **browse to other pages** and even close the browser **without losing your changes**.
Once you are satisfied, you can download the new variants file and copy it into your site's `assets/css` directory. Afterwards you have to adjust the `params.themeVariant` option in your `hugo.toml` to your chosen file name.
Eg. if your new variants file is named `theme-my-custom-variant.css`, you have to set `params.themeVariant='my-custom-variant'` to use it.
2024-04-18 22:53:23 +00:00
2024-09-29 21:48:56 +00:00
See the docs for [further configuration options](configuration/appearance/branding)
{{% /expand %}}
2022-11-28 17:42:51 +00:00
{{% button style="secondary" icon="download" href="javascript:window.variants&&variants.getStylesheet();this.blur();" %}}Download variant{{% /button %}}
{{% button style="warning" icon="trash" href="javascript:window.variants&&variants.resetVariant();this.blur();" %}}Reset variant{{% /button %}}
<div id="R-vargenerator" class="mermaid zoomable" style="background-color: var(--INTERNAL-MAIN-TEXT-color);">Graph</div>
2022-11-28 17:42:51 +00:00
{{% button style="secondary" icon="download" href="javascript:window.variants&&variants.getStylesheet();this.blur();" %}}Download variant{{% /button %}}
{{% button style="warning" icon="trash" href="javascript:window.variants&&variants.resetVariant();this.blur();" %}}Reset variant{{% /button %}}
<script>
window.variants && variants.generator( '#R-vargenerator' );
</script>