[default theme] Add the ability to pass a custom css file & add custom links

This commit is contained in:
Your Name 2024-06-08 22:17:52 +02:00
parent b6608e04b1
commit 27072a80b7
2 changed files with 12 additions and 3 deletions

View file

@ -4,4 +4,5 @@ export interface Branding {
export default interface Config { export default interface Config {
branding: Branding; branding: Branding;
theme: string; theme: string;
themeOpts: any;
} }

View file

@ -1,9 +1,17 @@
<title><%= config.branding.title %></title>
<link rel="stylesheet" href="/static/custom.css">
<div id="header-content"> <div id="header-content">
<h1><%= config.branding.title %></h1> <h1><%= config.branding.title %></h1>
<hr> <hr>
<div id="link-container"> <div id="link-container">
<a href="/">home</a> <% if(config.themeOpts.links) { %>
<a href="/post/about.md">about</a> <% for(const link of config.themeOpts.links) { %>
<a href="/post/contact.md">contact</a> <a href="<%= link.url %>"><%= link.title %></a>
<% } %>
<% } else { %>
<a href="/">home</a>
<a href="/post/about.md">about</a>
<a href="/post/contact.md">contact</a>
<% } %>
</div> </div>
</div> </div>