You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
107 lines
3.0 KiB
107 lines
3.0 KiB
{{ define "head" }}
|
|
<head>
|
|
<title>{{if .Title}}{{.Title}}{{end}} - {{ .Site.Other.Title }}</title>
|
|
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
|
|
<meta name="author" content="{{ html .Site.Other.Author }}" />
|
|
<meta name="description" content="A personal blog by VnPower. I write blogs about code and stuff." />
|
|
<link rel="preload" as="image" href="/static/clearday.webp" />
|
|
<link rel="preconnect" href="https://fonts.bunny.net" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<link rel="alternate" type="application/atom+xml" title="{{ html .Site.Other.Title }} feed" href="/blog.atom" />
|
|
<link href="/static/style.css" rel="stylesheet" media="all" rel="preload" />
|
|
<meta name="robots" value="all" />
|
|
<link rel="icon" href="/favicon.jpg" />
|
|
<meta property="og:title" content="VnPower's Website" />
|
|
<meta property="og:image" content="/favicon.jpg" />
|
|
<meta property="og:url" content="https://vnpower.ml" />
|
|
<meta name="theme-color" content="#6c7086">
|
|
<script defer="defer" src="/static/global.js"></script>
|
|
<script defer="defer" src="/static/main.js"></script>
|
|
</head>
|
|
{{ end }}
|
|
|
|
{{ define "header" }}
|
|
<header class="center-flex">
|
|
<h1>VnPower</h1>
|
|
</header>
|
|
{{ end }}
|
|
|
|
{{ define "nav" }}
|
|
<nav>
|
|
<div class="buttons-list hr inline">
|
|
<a href="/">
|
|
Home
|
|
</a>
|
|
<a href="/blog">
|
|
Blog
|
|
</a>
|
|
<a href="/settings">
|
|
Settings
|
|
</a>
|
|
</div>
|
|
</nav>
|
|
{{ end }}
|
|
|
|
{{ define "footer" }}
|
|
<footer class="center-text">
|
|
<p>VnPower</p>
|
|
<!--
|
|
<div class="inline">
|
|
GitHub
|
|
076's Gitea
|
|
Discord
|
|
</div>
|
|
-->
|
|
<small>Still working</small>
|
|
</footer>
|
|
{{ end }}
|
|
|
|
{{ define "base" }}
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
{{ template "head" . }}
|
|
<body class="mocha">
|
|
{{ template "header" . }}
|
|
<main>
|
|
<section class="front-content clear">
|
|
{{ template "nav" . }}
|
|
{{ .Content }}
|
|
</section>
|
|
</main>
|
|
{{ template "footer" . }}
|
|
</body>
|
|
</html>
|
|
{{ end }}
|
|
|
|
{{ define "date" }}{{ .Format "02/01/2006" }}{{ end }}
|
|
|
|
{{ define "post" }}
|
|
<article>
|
|
<a href="/blog"><small>Back to index</small></a>
|
|
<h1 class="title no-margin">{{ .Title }}</h1>
|
|
<small class="metadata subtext">by {{ .Other.Author }} in {{ template "date" .Date }}</small>
|
|
<p>
|
|
Tags:
|
|
{{ range $i, $t := .Tags }}{{ if $i }},{{ end }}
|
|
<a href="/tags/{{ $t }}/">{{ $t }}</a>{{ end }}
|
|
</p>
|
|
<div class="content">
|
|
<p>{{ .Content }}</p>
|
|
</div>
|
|
</article>
|
|
{{ end }}
|
|
|
|
{{ define "articleList" }}
|
|
<section class="article-list">
|
|
<ul>
|
|
{{ range . }}
|
|
<li>{{ template "date" .Date }} — <a href="/{{ .Url }}">{{ .Title }}</a></li>
|
|
{{ end }}
|
|
</ul>
|
|
</section>
|
|
{{ end }}
|
|
|
|
{{ define "tag" }} <h1>`{{ .Title }}` tagged posts</h1>
|
|
{{ template "articleList" .Site.Pages.WithTag .Title }}{{ end }}
|