Link styling tweaks

This commit is contained in:
Nathan McCarty 2025-02-09 17:10:46 -05:00
parent 5ad9ff656f
commit 972b73f665
3 changed files with 31 additions and 11 deletions

View file

@ -47,7 +47,6 @@ sub site-header(BlogMeta:D $meta) is export {
sub header-link($name, $path, $icon) {
a :href("$path"), [
icon $icon;
' ';
span $name;
]
}

View file

@ -10,7 +10,8 @@ sub show-html($html) is export {
# Work around HTML::Functional automatically putting newlines between tags
$out ~~ s:g/'</i>' \v+ '<span>'/<\/i><span>/;
$out ~~ s:g/\v+ '</a>'/<\/a>/;
$out ~~ s:g/',' \v+ '<span'/,<span/;
$out ~~ s:g/\s+ ',' \s+ '<span'/, <span/;
# TODO: Deal with the nbsps in the header
$out
}