summaryrefslogtreecommitdiff
path: root/layouts/_default
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/_default')
-rw-r--r--layouts/_default/baseof.html31
-rw-r--r--layouts/_default/home.html58
-rw-r--r--layouts/_default/list.html18
-rw-r--r--layouts/_default/single.html45
4 files changed, 152 insertions, 0 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
new file mode 100644
index 0000000..eef7b25
--- /dev/null
+++ b/layouts/_default/baseof.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html lang="{{ or site.Language.LanguageCode site.Language.Lang }}"
+ dir="{{ or site.Language.LanguageDirection `ltr` }}">
+
+<head>
+ {{ partial "head.html" . }}
+ {{ if .Param "math" }}
+ {{ partialCached "math.html" . }}
+ {{ end }}
+</head>
+
+<body>
+
+ <div class="content">
+ <header>
+ {{ partial "header.html" . }}
+ </header>
+
+ <main class="main">
+ {{ block "main" . }}{{ end }}
+ </main>
+ </div>
+
+ <footer>
+ {{ partial "footer.html" . }}
+ </footer>
+
+</body>
+
+
+</html> \ No newline at end of file
diff --git a/layouts/_default/home.html b/layouts/_default/home.html
new file mode 100644
index 0000000..bc3aad8
--- /dev/null
+++ b/layouts/_default/home.html
@@ -0,0 +1,58 @@
+{{ define "main" }}
+
+{{ .Content }}
+
+{{/* Intro summary section */}}
+{{ if .Site.Params.homeIntro }}
+
+<div class="intro">
+ {{ if .Site.Params.homeIntroTitle }}
+ <h1>{{ .Site.Params.homeIntroTitle }}</h1>
+ {{ end }}
+
+ {{ if .Site.Params.homeIntroContent }}
+ <p>{{ .Site.Params.homeIntroContent | markdownify }}</p>
+ {{ end }}
+</div>
+
+{{ end }}
+
+{{/* Social Icons */}}
+
+{{ with site.Params.social }}
+<div class="social-icons">
+ {{- range . }}
+ <a href="{{ trim .url " " | safeURL }}" target="_blank" rel="noopener noreferrer me"
+ title="{{ (.title | default .name) | title }}">
+ {{ partial "svg.html" . }}
+ </a>
+ {{- end }}
+</div>
+{{ end }}
+
+{{/* Collection Section */}}
+
+{{ if .Site.Params.homeCollection }}
+
+{{ with .Site.Params.homeCollectionTitle}}
+<h1> {{ . }} </h1>
+{{ end }}
+
+{{ $pages := where .Site.RegularPages "Section" .Site.Params.homeCollection }}
+
+{{ $paginationSize := 1}}
+{{ if (gt .Site.Params.paginationSize 0) }}
+{{ $paginationSize = .Site.Params.paginationSize }}
+{{ end }}
+
+{{ $paginator := .Paginate $pages $paginationSize }}
+
+{{ range $index, $page := $paginator.Pages }}
+{{ partial "post-entry.html" $page}}
+{{ end }}
+
+{{ partial "pagination-controls.html" $paginator}}
+
+{{ end }}
+
+{{ end }} \ No newline at end of file
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
new file mode 100644
index 0000000..8c52a86
--- /dev/null
+++ b/layouts/_default/list.html
@@ -0,0 +1,18 @@
+{{ define "main" }}
+<h1>{{ .Title }}</h1>
+{{ .Content }}
+
+{{ $paginationSize := 1}}
+{{ if (gt .Site.Params.paginationSize 0) }}
+{{ $paginationSize = .Site.Params.paginationSize }}
+{{ end }}
+
+{{ $paginator := .Paginate (.Pages) $paginationSize }}
+
+{{ range $index, $page := $paginator.Pages }}
+{{ partial "post-entry.html" $page}}
+{{ end }}
+
+{{ partial "pagination-controls.html" $paginator}}
+
+{{ end }} \ No newline at end of file
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
new file mode 100644
index 0000000..b68da6c
--- /dev/null
+++ b/layouts/_default/single.html
@@ -0,0 +1,45 @@
+{{ define "main" }}
+
+{{/* Intro */}}
+
+<div class="single-intro-container">
+
+ {{/* Title and Summary */}}
+
+ <h1 class="single-title">{{ .Title }}</h1>
+ {{if .Param "summary" }}
+ <p class="single-summary">{{ .Summary }}</p>
+ {{ end }}
+
+ {{/* Reading Time */}}
+
+ <p class="single-readtime">
+ {{if .Date }}
+ {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
+ {{ $dateHuman := .Date | time.Format ":date_long" }}
+ <time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
+ -
+ {{end}}
+ {{if (.Param "readTime")}}
+ {{.ReadingTime}} min
+ {{end }}
+ </p>
+
+</div>
+
+{{/* Table of Content */}}
+
+{{if .Param "toc" }}
+<aside class="toc">
+ <p><strong>Table of contents</strong></p>
+ {{ .TableOfContents }}
+</aside>
+{{ end }}
+
+{{/* Actual document content */}}
+
+<div class="single-content">
+ {{ .Content }}
+</div>
+
+{{ end }} \ No newline at end of file