casper3 | new theme!

This commit is contained in:
Don Harper 2021-04-04 22:38:49 -05:00
parent afc968f2fd
commit 79bd0dfa77
27 changed files with 1989 additions and 0 deletions

View file

@ -0,0 +1,40 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
{{ $title := print .Title " · " .Site.Title }}
{{ if .IsHome }}{{ $title = .Site.Title }}{{ end }}
<title>{{ $title }}</title>
<meta name="HandheldFriendly" content="True" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
{{ $styles := resources.Get "scss/main.scss" | resources.ExecuteAsTemplate "style.main.scss" . | toCSS | minify | fingerprint }}
<link rel="stylesheet" href="{{ $styles.Permalink }}" />
</head>
<body class="{{ block "body_class" . }} {{ end }}">
<div class="site-wrapper">
{{- block "main" . }}{{- end }}
<footer class="site-footer outer">
<div class="site-footer-content inner">
<section class="copyright"><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a> &copy; {{ .Date.Format "2006" }}</section>
<nav class="site-footer-nav">
<a href="{{ .Site.BaseURL }}">Latest Posts</a>
{{ if .Site.Params.facebook }}<a href="{{ .Site.Params.facebook }}" target="_blank" rel="noopener">Facebook</a>{{ end }}
{{ if .Site.Params.twitter }}<a href="{{ .Site.Params.twitter }}" target="_blank" rel="noopener">Twitter</a>{{ end }}
{{ if .Site.Params.github }}<a href="{{ .Site.Params.github }}" target="_blank" rel="noopener">Github</a>{{ end }}
<a href="https://jonathanjanssens.com" target="_blank" rel="noopener" style="opacity: 0.5;">Hugo Casper3 by Jonathan Janssens</a>
</nav>
</div>
</footer>
</div>
</body>
</html>

View file

@ -0,0 +1,32 @@
{{ define "body_class" }} tag-template {{ end }}
{{ define "main" }}
<header class="site-header">
{{- partial "site-header.html" $ -}}
{{- partial "header-background.html" $ -}}
<div class="inner site-header-content">
<h1 class="site-title">{{ .Title }}</h1>
<h2 class="site-description">
{{ if .Param "description" }}
{{ .Param "description" }}
{{ else }}
A collection of {{ len .Pages }} post{{ if gt (len .Pages) 1 }}s{{ end }}
{{ end }}
</h2>
</div>
</div>
</header>
<main id="site-main" class="site-main outer">
<div class="inner posts">
<div class="post-feed">
{{ range $index, $element := .Pages }}
{{- partial "post-card.html" (dict "context" . "index" $index "home" $.IsHome) -}}
{{ end }}
</div>
</div>
</main>
{{ end }}

View file

@ -0,0 +1,71 @@
{{ define "body_class" }} post-template {{ end }}
{{ define "main" }}
<header class="site-header">
{{- partial "site-header.html" $ -}}
</header>
<main id="site-main" class="site-main outer">
<div class="inner">
<article class="post-full post {{ if not (.Param "featured_image") }} no-image {{ end }}">
<header class="post-full-header">
{{ with .Params.tags }}
{{ $primaryTag := (index . 0) }}
<section class="post-full-tags">
<a href="{{ "/tags/" | relLangURL }}{{ $primaryTag | urlize }}">{{ $primaryTag }}</a>
</section>
{{ end }}
<h1 class="post-full-title">{{ .Title }}</h1>
{{ if .Param "summary" }}
<p class="post-full-custom-excerpt">{{ .Summary }}</p>
{{ end }}
<div class="post-full-byline">
<section class="post-full-byline-content">
{{ if .Param "author" }}
{{- partial "post-author.html" . -}}
{{ end }}
<section class="post-full-byline-meta">
{{ if .Param "author" }}
<h4 class="author-name">{{ .Param "author" }}</h4>
{{ end }}
<div class="byline-meta-content">
<time class="byline-meta-date" datetime="{{.Date.Format "2006-31-01"}}">{{.Date.Format "2 January 2006"}}</time>
<span class="byline-reading-time"><span class="bull">&bull;</span> {{ .ReadingTime }} min read</span>
</div>
</section>
</section>
</div>
</header>
{{ if .Param "featured_image" }}
<figure class="post-full-image">
<img src="{{ .Param "featured_image" }}" alt="{{ .Title }}" />
</figure>
{{ end }}
<section class="post-full-content">
<div class="post-content">
{{ .Content }}
</div>
</section>
</article>
</div>
</main>
{{- partial "post-navigation.html" . -}}
{{ end }}