infidel-cupper-theme/layouts/shortcodes/colors.html
2022-11-14 23:16:26 +07:00

12 lines
360 B
HTML

{{ $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>