added first version of theme

This commit is contained in:
2019-10-26 00:15:49 +02:00
parent fe42752335
commit c196fcf7a8
51 changed files with 6296 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
{{ with .OutputFormats.Get "RSS" }}
<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
<link href="{{ .RelPermalink }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}" />
{{ end }}
{{ $style := resources.Get "sass/main.scss" | toCSS | minify | fingerprint "sha512" }}
<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}">
{{ block "title" . }}
<title>
{{ if .IsHome }}
{{ $.Site.Title }}
{{ else }}
{{ .Title }} / {{ $.Site.Title }}
{{ end }}
</title>
{{ end }}
{{ partial "head.html" . }}
</head>
<body>
{{ partial "header.html" . }}
<div class="page-content margin-bot-big">
<div class="wrapper">
{{ block "main" . }}{{ end }}
</div>
</div>
{{ block "footer" . }}
{{ partial "footer.html" . }}
{{ end }}
</body>
</html>

View File

@@ -0,0 +1,40 @@
{{ define "main" }}
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }}
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
{{ $PageContext := . }}
{{ if .IsHome }}
{{ $PageContext = .Site }}
{{ end }}
{{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }}
<div class="home">
{{ if $.Site.Params.showProfileSidebar }}
<div class="col col-9">
{{else}}
<div class="col col-12">
{{ end }}
{{ range .Paginator.Pages }}
<div class="col col-{{ .Params.Width }}">
<div class="block {{ .Params.Color }}">
<div class="block-body height-{{ .Params.Height }}">
<span class="post-meta white-text">{{ .Date.Format "02. January 2006" }}</span>
<h2><a class="post-link white-text" href="{{ .Permalink }}">{{ .Title }}</a> {{ if .Draft }}(Draft){{ end }}</h2>
<p class="white-text">{{ .Summary | plainify | safeHTML }} {{ if .Truncated }} … {{ end }}<a class="white-text" href="{{ .Permalink }}">read more</a></p>
</div>
</div>
</div>
{{ end }}
<div class="col col-12">
{{ partial "pagination.html" . }}
</div>
</div>
{{ if $.Site.Params.showProfileSidebar }}
<div class="col col-3">
{{ partial "listSideBar.html" . }}
</div>
{{ end }}
</div>
{{ end }}

View File

@@ -0,0 +1,9 @@
{{ define "main" }}
<article class="post">
<h1><a href="{{ .Permalink }}">{{ .Title }}</a> {{ if .Draft }}(Draft){{ end }}</h1>
<div class="post-content">{{ .Content | safeHTML }}</div>
<p class="meta">Posted on <span class="postdate">{{ .Date.Format "02. January 2006" }}</span></p>
</article>
{{ end }}