Factor out and clean up site-header
This commit is contained in:
parent
72bd2a238c
commit
87e18dbf60
3 changed files with 37 additions and 58 deletions
|
@ -3,6 +3,8 @@ unit module Render::Util;
|
|||
|
||||
use DB::Post;
|
||||
|
||||
use HTML::Functional;
|
||||
|
||||
sub opt($test, $item) is export {
|
||||
if $test {
|
||||
$item
|
||||
|
@ -29,3 +31,7 @@ sub post-link(Int:D $id, Post:D $post --> Str:D) is export {
|
|||
"/posts/by-id/$id.html"
|
||||
}
|
||||
}
|
||||
|
||||
sub icon($icon) is export {
|
||||
i(:class("bx bx-$icon"))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue