looks okish on start page

This commit is contained in:
2019-11-02 22:29:06 +01:00
commit 035640a086
36 changed files with 2297 additions and 0 deletions

10
layouts/404.html Normal file
View File

@@ -0,0 +1,10 @@
{{ partial "header" . }}
<main>
<div class="intro">
<h1>¯\_(ツ)_/¯</h1>
<h2>Nothing here</h2>
</div>
</main>
{{ partial "footer" . }}

View File

@@ -0,0 +1,12 @@
{{ partial "header" . }}
<main>
<h2>{{ .Title }}</h2>
{{ range (.Paginator 5).Pages }} {{ partial "list-item" . }} {{ end }}
</main>
{{ partial "paginator" . }}
{{ partial "footer" . }}

View File

@@ -0,0 +1,15 @@
{{ partial "header" . }}
<main>
<div>
<h2>{{ .Title }}</h2>
<h5>{{ .Description }}</h5>
{{ partial "tags" . }}
</div>
<div align="start" class="content">{{ .Content }}</div>
</main>
{{ partial "footer" . }}

View File

@@ -0,0 +1,12 @@
{{ partial "header" . }}
<main>
<h2>{{ .Title }}</h2>
{{ range (.Paginator 5).Pages }} {{ partial "list-item" . }} {{ end }}
</main>
{{ partial "paginator" . }}
{{ partial "footer" . }}

12
layouts/index.html Normal file
View File

@@ -0,0 +1,12 @@
{{ partial "header" . }}
<main>
<div class="intro">
{{ with .Site.Params.profilePic }} <img class="profile" src="{{ . }}"> {{ end }}
<h1>{{ .Site.Title }}</h1>
<h2>{{ markdownify .Site.Params.Description }}</h2>
{{ with .Content }} <div class="homepage-content text-justify">{{ . }}</div> {{ end }}
</div>
</main>
{{ partial "footer" . }}

View File

@@ -0,0 +1,5 @@
<!--
This partial has been intentionally left empty.
Override this in your site to insert code just before the closing <body> tag.
For example, to install an analytics tracking package.
-->

View File

@@ -0,0 +1,5 @@
<!--
This partial has been intentionally left empty.
Override this in your site to insert code just after the opening <body> tag.
For example, to install an analytics tracking package.
-->

16
layouts/partials/css.html Normal file
View File

@@ -0,0 +1,16 @@
<style>
html body {
font-family: '{{ .Site.Params.font }}', sans-serif;
background-color: {{ .Site.Params.backgroundColor | default "white" }};
}
:root {
--accent: {{ .Site.Params.accent | default "#2196F3" }};
--border-width: {{ if .Site.Params.showBorder | default false }} 2px {{ else }} 0 {{ end }};
}
</style>
<!-- main -->
<link rel="stylesheet" href="{{ "css/main.css" | absURL }}">

View File

@@ -0,0 +1,9 @@
<footer>
<p>{{ .Site.Params.copyright | default "&copy; All rights reserved. Powered by [Hugo](https://gohugo.io) and [Minimal](https://github.com/calintat/minimal)." | markdownify }}</p>
</footer>
{{ partial "body-close" . }}
</body>
</html>

View File

@@ -0,0 +1,5 @@
<!--
This partial has been intentionally left empty.
Override this in your site to insert code just before the closing <head> tag.
For example, to install an analytics tracking package.
-->

View File

@@ -0,0 +1,5 @@
<!--
This partial has been intentionally left empty.
Override this in your site to insert code just after the opening <head> tag.
For example, to install an analytics tracking package.
-->

View File

@@ -0,0 +1,40 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
<head>
{{ partial "head-open" . }}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ .Title }}</title>
{{ if .Site.Params.favicon }}
<link rel="icon" href="{{ .Site.Params.favicon | absURL }}">
{{ end }}
{{ partial "css" . }} {{ partial "js" . }} {{ hugo.Generator }}
{{ with .OutputFormats.Get "RSS" }}
<link href="{{ .RelPermalink }}" rel="alternate" type="{{ .MediaType.Type }}" title="{{ $.Site.Title }}" />
<link href="{{ .RelPermalink }}" rel="feed" type="{{ .MediaType.Type }}" title="{{ $.Site.Title }}" />
{{ end }}
{{ partial "head-close" . }}
</head>
<body>
{{ partial "body-open" . }}
<nav>
{{ if .Site.Menus.main }}
<div class="left">
{{ range sort .Site.Menus.main }}
<a href="{{ .URL }}">{{ .Name }}</a> /
{{ end }}
</div>
{{ end }}
<a href="#">{{ .Title }}</a>
{{ if .Site.Menus.icon }}
<div class="right">
{{ range sort .Site.Menus.icon }}
<a href="{{ .URL }}"><i class="fa fa-{{ .Name }}"></i></a>
{{ end }}
</div>
{{ end }}
</div>
</nav>

4
layouts/partials/js.html Normal file
View File

@@ -0,0 +1,4 @@
<!-- custom -->
{{ range .Site.Params.js }} <script src="{{ . | absURL }}"></script> {{ end }}

View File

@@ -0,0 +1,23 @@
<div class="item">
{{ $.Scratch.Set "link" .RelPermalink }}
{{ with .Params.repo }}
{{ $repoHost := default "github" $.Params.repoHost }}
{{ if eq "github" $repoHost }}
{{ printf "https://github.com/%s/%s/" $.Site.Params.githubUsername . | $.Scratch.Set "link" }}
{{ else if eq "gitlab" $repoHost }}
{{ printf "https://gitlab.com/%s/%s/" $.Site.Params.gitlabUsername . | $.Scratch.Set "link" }}
{{ else if eq "bitbucket" $repoHost }}
{{ printf "https://bitbucket.org/%s/%s/" $.Site.Params.bitbucketUsername . | $.Scratch.Set "link" }}
{{ end }}
{{ end }}
{{ with .Params.link }} {{ $.Scratch.Set "link" . }} {{ end }}
{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006") | $.Scratch.Set "subheader" }}
{{ with .Description }} {{ $.Scratch.Set "subheader" . }} {{ end }}
<h4><a href="{{ .Scratch.Get "link" }}">{{ .Title }}</a></h4>
<h5>{{ $.Scratch.Get "subheader" }}</h5>
{{ partial "tags" . }}
</div>

View File

@@ -0,0 +1,19 @@
{{ if or .Paginator.HasPrev .Paginator.HasNext }}
<div class="pages">
{{ if .Paginator.HasPrev }}
<a class="icon pages-icon" href="{{ .Paginator.Prev.URL }}" rel="prev">
<i class="fa fa-arrow-left"></i>
</a>
{{ end }}
{{ if .Paginator.HasNext }}
<a class="icon pages-icon" href="{{ .Paginator.Next.URL }}" rel="next">
<i class="fa fa-arrow-right"></i>
</a>
{{ end }}
</div>
{{ end }}

View File

@@ -0,0 +1,3 @@
{{ range .Params.tags }}
<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}"><kbd class="item-tag">{{ . }}</kbd></a>
{{ end }}

28
layouts/post/single.html Normal file
View File

@@ -0,0 +1,28 @@
{{ partial "header" . }}
<main>
<div>
<h2>{{ .Title }}</h2>
<h5>{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006") }}</h5>
{{ partial "tags" . }}
</div>
<div align="start" class="content">{{ .Content }}</div>
<!-- Related posts -->
{{ $related := first 3 (where (where (where .Site.Pages.ByDate.Reverse ".Type" "==" "post") ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
{{ if $related }}
<h4 class="page-header">Related</h4>
{{ range $related }} {{ partial "list-item" . }} {{ end }}
{{ end }}
<!-- Disquis comments -->
{{ if and .Site.DisqusShortname (not .Params.disableComments) }}
<h4 class="page-header">Comments</h4>
{{ template "_internal/disqus.html" . }}
{{ end }}
</main>
{{ partial "footer" . }}