Simple site layout design
This commit is contained in:
14
layouts/_partials/term-link.html
Normal file
14
layouts/_partials/term-link.html
Normal file
@ -0,0 +1,14 @@
|
||||
{{ $name := .name }}
|
||||
{{ $taxonomy := .taxonomy }}
|
||||
|
||||
{{ $hash := md5 $name }}
|
||||
{{ $r := printf "0x%s" (substr $hash 0 2) | int }}
|
||||
{{ $g := printf "0x%s" (substr $hash 2 2) | int }}
|
||||
{{ $b := printf "0x%s" (substr $hash 4 2) | int }}
|
||||
{{ $rgba := printf "rgba(%d,%d,%d,0.2)" $r $g $b }}
|
||||
<a
|
||||
id="{{ $taxonomy | urlize }}_{{ $name | urlize }}"
|
||||
style="background:rgba({{ $r }},{{ $g }},{{ $b }},0.4)"
|
||||
href="{{ "/" | relLangURL}}{{ $taxonomy | urlize }}{{ "/" | relLangURL}}{{ $name | urlize }}">
|
||||
{{ $name }}
|
||||
</a>
|
Reference in New Issue
Block a user