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
|
@ -40,3 +40,29 @@ sub generate-head(BlogMeta:D $meta, $title?, $description?) is export {
|
|||
:href</resources/code.css>;
|
||||
]
|
||||
}
|
||||
|
||||
sub site-header(BlogMeta:D $meta) is export {
|
||||
sub header-link($name, $path, $icon) {
|
||||
a :href("$path"), [
|
||||
icon $icon;
|
||||
' ';
|
||||
span $name;
|
||||
]
|
||||
}
|
||||
header :class<site-header>, [
|
||||
div :class<site-logo>, [
|
||||
# TODO: Use a real image here
|
||||
$meta.title
|
||||
];
|
||||
div :class<site-tagline>, [
|
||||
$meta.tagline
|
||||
];
|
||||
div :class<header-links>, [
|
||||
header-link 'Index', '/index.html', 'home';
|
||||
header-link 'Archive', '/archive.html', 'archive';
|
||||
header-link 'Tags', '/tags.html', 'purchase-tag-alt';
|
||||
header-link 'About', '/about.html', 'info-circle';
|
||||
header-link 'Feed', '/atom.xml', 'rss';
|
||||
];
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue