infidel-cupper-theme/layouts/shortcodes/colors.html

12 lines
360 B
HTML
Raw Permalink Normal View History

2022-11-14 11:16:26 -05:00
{{ $colorString := replace (.Get 0) " " "" | upper }}
{{ $colors := split $colorString "," }}
<div class="colors-container">
<ul class="colors">
{{ range $colors }}
<li style="background-color: {{ . }};{{ if or (eq . "#FFFFFF") (eq . "#FFF")}} border: 1px solid #111{{ end }}">
<span>{{ . }}</span>
</li>
{{ end }}
</ul>
</div>