Added files of the theme

This commit is contained in:
N07070
2021-01-03 14:33:26 +01:00
parent 9c6bbe51e9
commit 274b1c55ef
181 changed files with 3899 additions and 3 deletions

View File

@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}" dir="ltr">
{{ partial "head.html" . }}
<body class="list-body">
<main class="card-container side-gutter">
{{ partial "nav-bar.html" . }}
{{ if or (not (eq .Description "")) (not (eq .Title "")) -}}
{{- end }}
{{ with .Content -}}
<section class="list-header-content">
{{ . }}
</section>
{{- end }}
{{ $pages := .Pages }}
{{ if .IsHome }}
{{ $pages = .Site.RegularPages }}
{{ end }}
{{ $paginator := .Paginate (where $pages "Params.displayinlist" "!=" false) -}}
{{- range $paginator.Pages -}}
{{ .Render "li" }}
{{- end }}
</main>
{{ if or ($paginator.HasPrev) ($paginator.HasNext) -}}
<nav class="pagination-nav side-padding">
{{ if $paginator.HasPrev }}<a href="{{ $paginator.Prev.URL }}" class="pagination-newer pagination-text">&lt; Newer Posts</a>{{ end }}
{{ if $paginator.HasNext }}<a href="{{ $paginator.Next.URL }}" class="pagination-older pagination-text">Older Posts &gt;</a>{{ end }}
</nav>
{{- end }}
{{ partial "scripts.html" . }}
</body>
</html>

View File

@@ -0,0 +1,34 @@
<a href="{{ .Permalink }}" class="card blog-card bc-next bg-color-4" rel="bookmark" >
<div class="card-img-container">
{{ with .Resources.GetMatch "featuredImage" }}
<p class="card-img-overlay">Next Article</p>
<picture>
{{ with $.Resources.GetMatch (replace (.Title) (path.Ext (.Title)) ".webp") -}}
<source srcset="{{ .Permalink }}" type="image/webp">
{{- end }}
<source srcset="{{ .Permalink }}">
<img src="{{ .Permalink }}" class="card-img" {{ with .Params.description -}} alt="{{ . }}" {{- end }}>
</picture>
{{ end }}
</div>
<article class="card-body">
<h2 class="card-title">{{ .Title }}</h2>
<p class="card-text">{{ if (isset .Params "description") }}{{ index .Params "description" | htmlUnescape }}{{ else }}{{ .Summary | plainify | htmlUnescape }}{{ end }}</p>
<div class="card-subtext muted-text">
<p>
Posted <time datetime="{{ .PublishDate.Format "2006-01-02 12:00" }}">{{ .PublishDate.Format "Jan 2, 2006" }}</time>
</p>
{{ if (isset .Params "categories") }}
<p>
{{ range .Params.categories }}#{{ . }} {{ end }}
</p>
{{ end }}
</div>
<p class="card-subtext muted-text">This is the next article in the same categorie</p>
</article>
</a>

23
layouts/_default/li.html Normal file
View File

@@ -0,0 +1,23 @@
<a
href="{{ .Permalink }}" class="card blog-card" rel="bookmark" >
<div class="card-img-container">
{{ with .Resources.GetMatch "featuredImage" }}
<picture>
{{ with $.Resources.GetMatch (replace (.Title) (path.Ext (.Title)) ".webp") -}}
<source srcset="{{ .Permalink }}" type="image/webp">
{{- end }}
{{ $thumbnail := .Fit "800x600 Lanczos" }}
<source srcset="{{ $thumbnail.Permalink }}">
<img src="{{ $thumbnail.Permalink }}" class="card-img" {{ with .Params.description -}} alt="{{ . }}" {{- end }}>
</picture>
{{- end }}
</div>
<article class="card-body">
<h2 class="card-title">{{ .Title }}</h2>
<p class="card-text">{{ if (isset .Params "description") }}{{ index .Params "description" | htmlUnescape }}{{ else }}{{ .Summary | plainify | htmlUnescape }}{{ end }}</p>
<div class="card-subtext muted-text">
<p>Posted <time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "Jan 2, 2006" }}</time></p>
{{ if (isset .Params "categories") }}<p>{{ range .Params.categories }}#{{ . | urlize | title }} {{ end }}</p>{{ end }}
</div>
</article>
</a>

View File

@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}" dir="ltr">
{{ partial "head.html" . }}
<body class="list-body">
{{ partial "nav-bar.html" . }}
<main class="card-container side-gutter">
{{ if or (not (eq .Description "")) (not (eq .Title "")) -}}
<!-- <header class="list-header">
{{ with .Title }}<h1 class="list-header-title">{{ . }}</h1>{{ end }}
{{ with .Description }}<p class="list-header-subtext">{{ . }}</p>{{ end }}
</header> -->
{{- end }}
{{ with .Content -}}
<section class="list-header-content">
{{ . }}
</section>
{{- end }}
{{ $pages := .Pages }}
{{ if .IsHome }}
{{ $pages = .Site.RegularPages }}
{{ end }}
{{ $paginator := .Paginate (where $pages "Params.displayinlist" "!=" false) -}}
{{- range $paginator.Pages -}}
{{ .Render "li" }}
{{- end }}
</main>
{{ if or ($paginator.HasPrev) ($paginator.HasNext) -}}
<nav class="pagination-nav side-padding">
{{ if $paginator.HasPrev }}<a href="{{ $paginator.Prev.URL }}" class="pagination-newer pagination-text">&lt; Newer Posts</a>{{ end }}
{{ if $paginator.HasNext }}<a href="{{ $paginator.Next.URL }}" class="pagination-older pagination-text">Older Posts &gt;</a>{{ end }}
</nav>
{{- end }}
{{ partial "scripts.html" . }}
</body>
</html>

27
layouts/_default/rss.xml Normal file
View File

@@ -0,0 +1,27 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} - {{ end }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</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 }}
{{ $paginator := .Paginate (where .Pages "Params.displayinlist" "!=" false) -}}
{{- range $paginator.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>{{ if (isset .Params "description") }}{{ index .Params "description" | html }}{{ else }}{{ .Summary | html }}{{ end }}</description>
</item>
{{- end }}
</channel>
</rss>

View File

@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}" dir="ltr">
{{ partial "head.html" . }}
<body class="single-body">
{{ partial "nav-bar.html" . }}
<main class="content side-text-padding">
<article class="post {{ if ne .Params.dropcap false }}dropcase{{ end }}">
<header class="post-header">
<h1 class="post-title">{{ .Title }}</h1>
{{ if isset .Params "date" }}<p class="post-date">Posted <time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "Jan 2, 2006" }}</time></p>{{ end }}
</header>
{{ with .Resources.GetMatch "featuredImage" -}}
<picture class="post-figure">
{{ with $.Resources.GetMatch (replace (.Title) (path.Ext (.Title)) ".webp") -}}
<source srcset="{{ .Permalink }}" type="image/webp">
{{- end }}
{{ $featured := .Resize "800x Lanczos" }}
<source srcset="{{ $featured.Permalink }}">
<img src="{{ $featured.Permalink }}" {{ with .Params.description -}} alt="{{ . }}" {{- end }}>
</picture>
{{- end }}
{{ if .Params.toc -}}
<h2>Contents</h2>
{{ .TableOfContents }}
{{- end }}
{{ .Content }}
</article>
</main>
<nav class="end-nav side-padding">
{{ with .PrevInSection }}
{{ .Render "li-next" }}
{{ end }}
</nav>
{{ partial "footer.html" . }}
{{ partial "scripts.html" . }}
</body>
</html>