Add first-tag colour to blog posts
This commit is contained in:
parent
52498e1cfa
commit
9b52848707
1 changed files with 3 additions and 1 deletions
|
@ -1,9 +1,11 @@
|
|||
rgbstr = require 'rgbstr'
|
||||
slots, json = select 1, ...
|
||||
posts = require 'posts'
|
||||
tags = require 'tags'
|
||||
|
||||
post = =>
|
||||
flexColumn
|
||||
color = table.concat({rgbstr.bytes(@head.tags[1], 16, .3, .5)}, " ")
|
||||
flexColumn class: "info box", style: "--color: rgb(#{color})"
|
||||
* h2 a(@head.title, href: @head.uri), style: "view-transition-name: #{@head.slug}"
|
||||
* tags(@head.tags)
|
||||
* time is: 'local-date', datetime: @head.date, @head.date
|
||||
|
|
Loading…
Reference in a new issue