2023-05-18 11:55:48 +00:00
<div>
<layout:Container>
<h2>Signal colors</h2>
<p>Colors can be set via special color classes:</p>
<ul>
<li><view:CodeInline>d3c-color-layer-0</view:CodeInline> This is the default color scheme.</li>
<li><view:CodeInline>d3c-color-layer-1</view:CodeInline></li>
<li><view:CodeInline>d3c-color-layer-2</view:CodeInline></li>
2023-05-25 17:41:42 +00:00
<li><view:CodeInline>d3c-color-accent</view:CodeInline></li>
2023-05-18 11:55:48 +00:00
<li><view:CodeInline>d3c-color-success</view:CodeInline></li>
<li><view:CodeInline>d3c-color-success-faded</view:CodeInline></li>
<li><view:CodeInline>d3c-color-attention</view:CodeInline></li>
<li><view:CodeInline>d3c-color-attention-faded</view:CodeInline></li>
<li><view:CodeInline>d3c-color-caution</view:CodeInline></li>
<li><view:CodeInline>d3c-color-caution-faded</view:CodeInline></li>
<li><view:CodeInline>d3c-color-critical</view:CodeInline></li>
<li><view:CodeInline>d3c-color-critical-faded</view:CodeInline></li>
</ul>
<h2>Buttons</h2>
<view:Code>
<pre vg-content='"<input:Button class=\"d3c-color-success\">\n" +
2023-05-25 13:59:13 +00:00
" <vg-slot name=\"IconSlot\"><icons:LPlus></icons:LPlus></vg-slot>\n" +
2023-05-18 11:55:48 +00:00
" <vg-slot name=\"DefaultSlot\">Successful action</vg-slot>\n" +
"</input:Button>"' style="margin: 0;"></pre>
</view:Code>
2023-05-28 11:52:21 +00:00
<layout:ContainerHorizontal>
2023-05-18 11:55:48 +00:00
<input:Button class="d3c-color-success">
2023-05-25 13:59:13 +00:00
<vg-slot name="IconSlot"><icons:LPlus></icons:LPlus></vg-slot>
2023-05-18 11:55:48 +00:00
<vg-slot name="DefaultSlot">Successful action</vg-slot>
</input:Button>
<input:Button class="d3c-color-attention">
2023-05-25 13:59:13 +00:00
<vg-slot name="IconSlot"><icons:LGlobe></icons:LGlobe></vg-slot>
2023-05-18 11:55:48 +00:00
<vg-slot name="DefaultSlot">Highlighted action</vg-slot>
</input:Button>
<input:Button class="d3c-color-caution">
2023-05-25 13:59:13 +00:00
<vg-slot name="IconSlot"><icons:LInfoCircle></icons:LInfoCircle></vg-slot>
2023-05-18 11:55:48 +00:00
<vg-slot name="DefaultSlot">Press with caution</vg-slot>
</input:Button>
<input:Button class="d3c-color-critical">
2023-05-25 13:59:13 +00:00
<vg-slot name="IconSlot"><icons:LWarning></icons:LWarning></vg-slot>
2023-05-18 11:55:48 +00:00
<vg-slot name="DefaultSlot">Dangerous action</vg-slot>
</input:Button>
2023-05-28 11:52:21 +00:00
</layout:ContainerHorizontal>
<layout:ContainerHorizontal>
2023-05-18 11:55:48 +00:00
<input:Button class="d3c-color-success-faded">
2023-05-25 13:59:13 +00:00
<vg-slot name="IconSlot"><icons:LPlus></icons:LPlus></vg-slot>
2023-05-18 11:55:48 +00:00
<vg-slot name="DefaultSlot">Successful action</vg-slot>
</input:Button>
<input:Button class="d3c-color-attention-faded">
2023-05-25 13:59:13 +00:00
<vg-slot name="IconSlot"><icons:LGlobe></icons:LGlobe></vg-slot>
2023-05-18 11:55:48 +00:00
<vg-slot name="DefaultSlot">Highlighted action</vg-slot>
</input:Button>
<input:Button class="d3c-color-caution-faded">
2023-05-25 13:59:13 +00:00
<vg-slot name="IconSlot"><icons:LInfoCircle></icons:LInfoCircle></vg-slot>
2023-05-18 11:55:48 +00:00
<vg-slot name="DefaultSlot">Press with caution</vg-slot>
</input:Button>
<input:Button class="d3c-color-critical-faded">
2023-05-25 13:59:13 +00:00
<vg-slot name="IconSlot"><icons:LWarning></icons:LWarning></vg-slot>
2023-05-18 11:55:48 +00:00
<vg-slot name="DefaultSlot">Dangerous action</vg-slot>
</input:Button>
2023-05-28 11:52:21 +00:00
</layout:ContainerHorizontal>
2023-05-18 11:55:48 +00:00
<h2>Tags</h2>
<view:Code>
<pre vg-content='"<view:Tag class=\"d3c-color-success\">This was a success</view:Tag>"' style="margin: 0;"></pre>
</view:Code>
2023-05-28 11:52:21 +00:00
<layout:ContainerHorizontal>
2023-05-18 11:55:48 +00:00
<view:Tag class="d3c-color-success">This was a success</view:Tag>
<view:Tag class="d3c-color-attention">Attention needed</view:Tag>
<view:Tag class="d3c-color-caution">Warning</view:Tag>
<view:Tag class="d3c-color-critical">Something went wrong</view:Tag>
2023-05-28 11:52:21 +00:00
</layout:ContainerHorizontal>
<layout:ContainerHorizontal>
2023-05-18 11:55:48 +00:00
<view:Tag class="d3c-color-success-faded">This was a success</view:Tag>
<view:Tag class="d3c-color-attention-faded">Attention needed</view:Tag>
<view:Tag class="d3c-color-caution-faded">Warning</view:Tag>
<view:Tag class="d3c-color-critical-faded">Something went wrong</view:Tag>
2023-05-28 11:52:21 +00:00
</layout:ContainerHorizontal>
2023-05-18 11:55:48 +00:00
<h2>Icons</h2>
<p>Icons will use the text color by default, if you need to change their stroke/fill coloring, use the <view:CodeInline>d3c-icon-use-color</view:CodeInline> class.</p>
<view:Code>
<pre vg-content='"<icons:LInfoCircle class=\"d3c-color-attention d3c-icon-use-color\"></icons:LInfoCircle>"' style="margin: 0;"></pre>
</view:Code>
2023-05-28 11:52:21 +00:00
<layout:ContainerHorizontal style="font-size: 2em;">
2023-05-18 11:55:48 +00:00
<icons:LInfoCircle class="d3c-color-attention d3c-icon-use-color"></icons:LInfoCircle>
<icons:LWarning class="d3c-color-critical d3c-icon-use-color"></icons:LWarning>
2023-05-28 11:52:21 +00:00
</layout:ContainerHorizontal>
2023-05-18 11:55:48 +00:00
<h2>Containers</h2>
<layout:LayerContainer class="d3c-color-layer-1">
<span>This container uses the <view:CodeInline class="d3c-color-layer-2">d3c-color-layer-1</view:CodeInline> class. All child elements inherit the color scheme.</span>
2023-05-28 11:52:21 +00:00
<layout:ContainerHorizontal>
<input:Button>
<vg-slot name="IconSlot"><icons:LPlus></icons:LPlus></vg-slot>
<vg-slot name="DefaultSlot">Does inherit color</vg-slot>
</input:Button>
<input:Button class="d3c-color-layer-0">
<vg-slot name="IconSlot"><icons:LPlus></icons:LPlus></vg-slot>
<vg-slot name="DefaultSlot">Doesn't inherit color</vg-slot>
</input:Button>
</layout:ContainerHorizontal>
2023-05-18 11:55:48 +00:00
</layout:LayerContainer>
<layout:LayerContainer class="d3c-color-critical-faded">
<icons:LWarning></icons:LWarning> <span>Something bad happened!</span>
</layout:LayerContainer>
</layout:Container>
</div>
<style>
.flex-container {
margin: 0.5em 0;
display: flex;
flex-wrap: wrap;
gap: 0.5em;
}
</style>
<script type="application/x-go">
import (
"git.d3nexus.de/Dadido3/D3vugu-components/components/layout"
"git.d3nexus.de/Dadido3/D3vugu-components/components/view"
"git.d3nexus.de/Dadido3/D3vugu-components/components/input"
"git.d3nexus.de/Dadido3/D3vugu-components/icons"
)
type PageColors struct {}
</script>