Factor out and clean up site-header

This commit is contained in:
Nathan McCarty 2025-02-07 02:44:35 -05:00
parent 72bd2a238c
commit 87e18dbf60
3 changed files with 37 additions and 58 deletions

View file

@ -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"))
}