move theme to its own folder
This commit is contained in:
parent
29dfb041db
commit
b52f01f8b5
@ -3,10 +3,18 @@ languageCode = "en-us"
|
|||||||
title = "nilsschulte.de"
|
title = "nilsschulte.de"
|
||||||
copyright = "This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License."
|
copyright = "This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License."
|
||||||
|
|
||||||
|
theme = "nils-theme"
|
||||||
[author]
|
[author]
|
||||||
name = "Nils Schulte"
|
name = "Nils Schulte"
|
||||||
email = "blog@nilsschulte.de"
|
email = "blog@nilsschulte.de"
|
||||||
|
|
||||||
|
[params]
|
||||||
|
author = "Nils Schulte"
|
||||||
|
description = "Nils' Blog"
|
||||||
|
|
||||||
|
## Set one of:
|
||||||
|
# gravatar = "soho@example.com"
|
||||||
|
profilePicture = "img/triangels.png"
|
||||||
pygmentsCodeFences = true
|
pygmentsCodeFences = true
|
||||||
pygmentsCodeFencesGuessSyntax = true
|
pygmentsCodeFencesGuessSyntax = true
|
||||||
|
|
||||||
|
31
themes/nils-theme/layouts/_default/list.atom.xml
Normal file
31
themes/nils-theme/layouts/_default/list.atom.xml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
|
||||||
|
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||||
|
<title>{{ .Site.Title }}</title>
|
||||||
|
<link href="{{ .Permalink }}"/>
|
||||||
|
{{ with .OutputFormats.Get "Atom" }}
|
||||||
|
{{ printf "<link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||||
|
{{ end }}
|
||||||
|
<updated>{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}</updated>
|
||||||
|
<author>
|
||||||
|
{{ with $.Site.Author.name }}<name>{{.}}</name>{{end}}
|
||||||
|
{{ with $.Site.Author.email }}<email>{{.}}</email>{{end}}
|
||||||
|
</author>
|
||||||
|
<generator>Hugo</generator>
|
||||||
|
<id>{{ .Permalink }}</id>
|
||||||
|
{{ range first 15 .Pages }}
|
||||||
|
<entry>
|
||||||
|
<title>{{ .Title }}</title>
|
||||||
|
<link rel="alternate" href="{{ .Permalink }}"/>
|
||||||
|
<id>{{ .Permalink }}</id>
|
||||||
|
<published>{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}</published>
|
||||||
|
<updated>{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}</updated>
|
||||||
|
<summary type="html">{{ .Content | html }}</summary>
|
||||||
|
{{ range .Params.tags }}
|
||||||
|
<category term="{{ . }}"/>
|
||||||
|
{{ end }}
|
||||||
|
{{ range .Params.categories }}
|
||||||
|
<category term="{{ . }}"/>
|
||||||
|
{{ end }}
|
||||||
|
</entry>
|
||||||
|
{{ end }}
|
||||||
|
</feed>
|
26
themes/nils-theme/layouts/_default/list.html
Normal file
26
themes/nils-theme/layouts/_default/list.html
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{{ partial "header.html" . }}
|
||||||
|
|
||||||
|
|
||||||
|
<div class="article-list">
|
||||||
|
{{ range .Paginator.Pages }}
|
||||||
|
<article>
|
||||||
|
<header {{ if .Params.lang }}lang="{{- .Params.lang -}}"{{ end }}>
|
||||||
|
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{- .Date.Format "2006-01-02" -}}</time>
|
||||||
|
<h3>
|
||||||
|
<a href="{{ .Permalink }}">{{- .Title -}}</a>
|
||||||
|
{{ if and .Params.lang (ne .Site.Language.Lang .Params.lang) }}
|
||||||
|
<small>[{{ .Params.lang }}]</small>
|
||||||
|
{{ end }}
|
||||||
|
</h3>
|
||||||
|
</header>
|
||||||
|
<p class="summary">
|
||||||
|
{{.Summary}}
|
||||||
|
</p>
|
||||||
|
</article>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- TODO: pagination -->
|
||||||
|
|
||||||
|
{{ partial "footer.html" . }}
|
33
themes/nils-theme/layouts/_default/list.rss.xml
Normal file
33
themes/nils-theme/layouts/_default/list.rss.xml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
|
||||||
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||||
|
<channel>
|
||||||
|
<title>{{ .Site.Title }}</title>
|
||||||
|
<link>{{ .Permalink }}</link>
|
||||||
|
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
||||||
|
<generator>Hugo</generator>{{ with .Site.LanguageCode }}
|
||||||
|
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
|
||||||
|
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
|
||||||
|
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
|
||||||
|
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
|
||||||
|
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||||
|
{{ with .OutputFormats.Get "RSS" }}
|
||||||
|
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||||
|
{{ end }}
|
||||||
|
{{ range first 15 .Pages }}
|
||||||
|
<item>
|
||||||
|
<title>{{ .Title }}</title>
|
||||||
|
<link>{{ .Permalink }}</link>
|
||||||
|
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||||
|
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
||||||
|
<guid>{{ .Permalink }}</guid>
|
||||||
|
<description>{{ .Content | html }}</description>
|
||||||
|
{{ range .Params.tags }}
|
||||||
|
<category>{{ . }}</category>
|
||||||
|
{{ end }}
|
||||||
|
{{ range .Params.categories }}
|
||||||
|
<category>{{ . }}</category>
|
||||||
|
{{ end }}
|
||||||
|
</item>
|
||||||
|
{{ end }}
|
||||||
|
</channel>
|
||||||
|
</rss>
|
18
themes/nils-theme/layouts/_default/single.html
Normal file
18
themes/nils-theme/layouts/_default/single.html
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{{ partial "header.html" . }}
|
||||||
|
|
||||||
|
<article {{ if .Params.lang }}lang="{{- .Params.lang -}}"{{ end }}>
|
||||||
|
<header>
|
||||||
|
<h1>{{ .Title }}</h1>
|
||||||
|
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>{{- .Date.Format "2006-01-02" -}}</time>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
{{ .Content }}
|
||||||
|
|
||||||
|
{{ if eq .Params.lang "en" }}
|
||||||
|
<footer>
|
||||||
|
{{ partial "article-footer.html" . }}
|
||||||
|
</footer>
|
||||||
|
{{ end }}
|
||||||
|
</article>
|
||||||
|
|
||||||
|
{{ partial "footer.html" . }}
|
28
themes/nils-theme/layouts/index.html
Normal file
28
themes/nils-theme/layouts/index.html
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{{ partial "head.html" . }}
|
||||||
|
<div id="background" style="
|
||||||
|
animation-name: backgroundFallin;
|
||||||
|
animation-duration: 1s;
|
||||||
|
animation-delay: 0.3s;
|
||||||
|
animation-timing-function: linear;
|
||||||
|
animation-fill-mode: both;">
|
||||||
|
</div>
|
||||||
|
<div id="main">
|
||||||
|
<main style="width: 100%;">
|
||||||
|
<div class="centerdiv">
|
||||||
|
<img class="logo_anim" src="img/tri.svg" alt="Triangles" style="
|
||||||
|
animation-name: headspin;
|
||||||
|
animation-duration: 2s;
|
||||||
|
animation-delay: 1.1s;
|
||||||
|
animation-fill-mode: both;">
|
||||||
|
</div>
|
||||||
|
<div class="centerdiv">
|
||||||
|
<img class="logo_anim" src="img/deal.svg" alt="Triangles" style="
|
||||||
|
animation-name: dealfall;
|
||||||
|
animation-duration: 4s;
|
||||||
|
animation-delay: 3.1s;
|
||||||
|
animation-timing-function: linear;
|
||||||
|
animation-fill-mode: both;">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ partial "nav.html" . }}
|
||||||
|
{{ partial "footer.html" . }}
|
2
themes/nils-theme/layouts/partials/foot.html
Normal file
2
themes/nils-theme/layouts/partials/foot.html
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
</body>
|
||||||
|
</html>
|
11
themes/nils-theme/layouts/partials/footer.html
Normal file
11
themes/nils-theme/layouts/partials/footer.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
</main>
|
||||||
|
|
||||||
|
<footer><br>
|
||||||
|
<a rel="source code" href="https://github.com/Schnilz/nilsschulte.de">source code</a> for this site<br>
|
||||||
|
© {{ now.Format "2006" }} Nils Schulte
|
||||||
|
<a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" src="https://i.creativecommons.org/l/by-sa/4.0/80x15.png"></a>
|
||||||
|
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ partial "foot.html" . }}
|
210
themes/nils-theme/layouts/partials/head.html
Normal file
210
themes/nils-theme/layouts/partials/head.html
Normal file
@ -0,0 +1,210 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>{{ partial "title.txt" . }}</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
|
<link rel="canonical" href="{{ .Permalink }}">
|
||||||
|
{{ range .AlternativeOutputFormats -}}
|
||||||
|
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||||
|
{{ end -}}
|
||||||
|
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/normalize.css">
|
||||||
|
<style>
|
||||||
|
html {
|
||||||
|
background-color: black;
|
||||||
|
color: #dfdfdf;
|
||||||
|
}
|
||||||
|
/* ubuntu-font */
|
||||||
|
@font-face {
|
||||||
|
font-family: "UbuntuMono";
|
||||||
|
src: local('UbuntuMono-B'), url("{{ .Site.BaseURL }}fonts/UbuntuMono-Bold.ttf");
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: "UbuntuMono";
|
||||||
|
src: local('UbuntuMono-RI'), url("{{ .Site.BaseURL }}fonts/UbuntuMono-Italic.ttf");
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: "UbuntuMono";
|
||||||
|
src: local('UbuntuMono-R'), url("{{ .Site.BaseURL }}fonts/UbuntuMono-Regular.ttf");
|
||||||
|
}
|
||||||
|
#background {
|
||||||
|
position: fixed;
|
||||||
|
z-index: -1;
|
||||||
|
background-color: rgb(47, 41, 41);/*rgb(153, 34, 13);*/
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
@keyframes backgroundFallin {
|
||||||
|
00% {height: 0%;}
|
||||||
|
10% {height: 0%;}
|
||||||
|
50% {height: 100%;}
|
||||||
|
65% {height: 80%;}
|
||||||
|
80% {height: 100%;}
|
||||||
|
90% {height: 90%;}
|
||||||
|
100% {height: 100%;}
|
||||||
|
}
|
||||||
|
@keyframes headspin {
|
||||||
|
0% {transform: rotate(-760deg) scale(0,0);}
|
||||||
|
100% {transform: rotate(0deg) scale(1,1);}
|
||||||
|
}
|
||||||
|
@keyframes dealfall {
|
||||||
|
0% {transform: translateY(-2000%) }
|
||||||
|
1% {transform: translateY(-200%) }
|
||||||
|
100% {transform: translateY(0%) }
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
font-family: 'UbuntuMono';
|
||||||
|
display: flex;
|
||||||
|
flex-flow: row;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
body > header {
|
||||||
|
width: 100%;
|
||||||
|
position: absolute;
|
||||||
|
text-align: center;
|
||||||
|
align-content: center;
|
||||||
|
display: flex;
|
||||||
|
flex-flow: row;
|
||||||
|
}
|
||||||
|
body > header h1 {
|
||||||
|
display: flex;
|
||||||
|
flex-flow: row;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
#main {
|
||||||
|
flex: auto;
|
||||||
|
min-height: 100vh;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-flow: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
#main > nav, #main > main, #main > footer {
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
#main > main {
|
||||||
|
flex: 1;
|
||||||
|
margin-right: 25px;
|
||||||
|
}
|
||||||
|
#main > footer {
|
||||||
|
padding-top: 50px;
|
||||||
|
}
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
html {
|
||||||
|
background-color: black;
|
||||||
|
color: #dfdfdf;
|
||||||
|
}
|
||||||
|
article img:not([src$=".jpg"]):not([src$=".jpeg"]) {
|
||||||
|
/* prevent transparent images from showing the black background */
|
||||||
|
background-color: white;
|
||||||
|
border: 5px solid white;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* Article list */
|
||||||
|
.article-list {
|
||||||
|
max-width: 45em;
|
||||||
|
width: 90vw;
|
||||||
|
}
|
||||||
|
.article-list article{
|
||||||
|
margin: 1.2em 0 0 0;
|
||||||
|
}
|
||||||
|
.article-list article > header {
|
||||||
|
display: flex;
|
||||||
|
flex-flow: row;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
.article-list article time {
|
||||||
|
color:grey;
|
||||||
|
}
|
||||||
|
.article-list article h3 {
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0.5em;
|
||||||
|
}
|
||||||
|
.article-list .summary {
|
||||||
|
text-align: justify;
|
||||||
|
margin: 0 1em;
|
||||||
|
}
|
||||||
|
.article-list article small {
|
||||||
|
font-weight: normal;
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
a, a:visited {
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
article > header {
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 2em;
|
||||||
|
}
|
||||||
|
article > header time {
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
article {
|
||||||
|
max-width: 45em;
|
||||||
|
width: 90vw;
|
||||||
|
text-align: justify;
|
||||||
|
}
|
||||||
|
table {
|
||||||
|
margin: auto;
|
||||||
|
width: 90%;
|
||||||
|
background: #221d1d;
|
||||||
|
}
|
||||||
|
table, th, td {
|
||||||
|
padding: 15px;
|
||||||
|
text-align: left;
|
||||||
|
border-color: #4c4c4c;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border: 1px solid black;
|
||||||
|
}
|
||||||
|
article video, article img {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
article img[src$='#center'] {
|
||||||
|
display: block;
|
||||||
|
margin: 0.7rem auto;
|
||||||
|
}
|
||||||
|
article img[src$='#floatleft'] {
|
||||||
|
float:left;
|
||||||
|
margin: 0.7rem;
|
||||||
|
}
|
||||||
|
article img[src$='#floatright'] {
|
||||||
|
float:right;
|
||||||
|
margin: 0.7rem;
|
||||||
|
}
|
||||||
|
article .footnotes {
|
||||||
|
font-size: 0.75em;
|
||||||
|
}
|
||||||
|
pre {
|
||||||
|
background-color: #272822;
|
||||||
|
color: #f8f8f2;
|
||||||
|
padding: 15px;
|
||||||
|
overflow: auto;
|
||||||
|
|
||||||
|
tab-size: 2;
|
||||||
|
-moz-tab-size: 2;
|
||||||
|
}
|
||||||
|
p code, li code {
|
||||||
|
color: #930d72;
|
||||||
|
}
|
||||||
|
.centerdiv {
|
||||||
|
margin: 0;
|
||||||
|
position: absolute;
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
height: 90%;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
.logo_anim {
|
||||||
|
margin:auto;
|
||||||
|
max-height: 60%;
|
||||||
|
max-width: 60%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<link rel="shortcut icon" type="image/x-icon" href="{{ .Site.BaseURL }}\img\favicon.ico" />
|
||||||
|
</head>
|
||||||
|
<body>
|
12
themes/nils-theme/layouts/partials/header.html
Normal file
12
themes/nils-theme/layouts/partials/header.html
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{{ partial "head.html" . }}
|
||||||
|
|
||||||
|
<div id="background">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="main">
|
||||||
|
|
||||||
|
|
||||||
|
<main>
|
||||||
|
|
||||||
|
{{ partial "nav.html" . }}
|
5
themes/nils-theme/layouts/partials/nav.html
Normal file
5
themes/nils-theme/layouts/partials/nav.html
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<nav>
|
||||||
|
{{- if not .IsHome }}<a href="{{ .Site.BaseURL }}">Home</a> ·{{ end }}
|
||||||
|
<a href="{{ .Site.BaseURL }}posts">Blog</a> ·
|
||||||
|
<a href="https://github.com/schnilz">GitHub</a>
|
||||||
|
</nav>
|
15
themes/nils-theme/layouts/partials/title.txt
Normal file
15
themes/nils-theme/layouts/partials/title.txt
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{{- $title := .Title -}}
|
||||||
|
{{- $siteTitle := .Site.Title -}}
|
||||||
|
{{- if .IsHome -}}
|
||||||
|
{{ $siteTitle }}
|
||||||
|
{{- else if eq .Kind "taxonomy" -}}
|
||||||
|
{{ title .Data.Singular }}: {{ $title }} · {{ $siteTitle }}
|
||||||
|
{{- else if eq .Kind "section" -}}
|
||||||
|
{{ $title }} · {{ $siteTitle }}
|
||||||
|
{{- else if .IsPage -}}
|
||||||
|
{{ $title }} · {{ $siteTitle }}
|
||||||
|
{{- else if not (eq .Title "") -}}
|
||||||
|
{{ $title }} · {{ $siteTitle }}
|
||||||
|
{{- else -}}
|
||||||
|
{{ $siteTitle }}
|
||||||
|
{{- end -}}
|
12
themes/nils-theme/theme.toml
Normal file
12
themes/nils-theme/theme.toml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
name = "nils-theme"
|
||||||
|
license = "GPL"
|
||||||
|
licenselink = "https://github.com/schnilz/nilsschulte.de/blob/master/LICENSE.md"
|
||||||
|
description = "A simple theme"
|
||||||
|
tags = ["blog", "theme", "hyde", "highlight.js", "font-awesome", "google analytics", "disqus", "personal", "syntax highlighting", "responsive", "graphcomment"]
|
||||||
|
features = ["blog", "theme", "highlight.js", "font-awesome", "responsive", "disqus", "graphcomment", "portfolio"]
|
||||||
|
min_version = "0.01"
|
||||||
|
|
||||||
|
[author]
|
||||||
|
name = "Nils Schulte"
|
||||||
|
homepage = "https://nilsschulte.de"
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user