aboutsummaryrefslogtreecommitdiff
path: root/themes/docsy/layouts/blog
diff options
context:
space:
mode:
Diffstat (limited to 'themes/docsy/layouts/blog')
-rw-r--r--themes/docsy/layouts/blog/baseof.html34
-rw-r--r--themes/docsy/layouts/blog/content.html16
-rw-r--r--themes/docsy/layouts/blog/list.html36
-rw-r--r--themes/docsy/layouts/blog/single.html3
4 files changed, 89 insertions, 0 deletions
diff --git a/themes/docsy/layouts/blog/baseof.html b/themes/docsy/layouts/blog/baseof.html
new file mode 100644
index 0000000..e679ff7
--- /dev/null
+++ b/themes/docsy/layouts/blog/baseof.html
@@ -0,0 +1,34 @@
+<!doctype html>
+<html lang="{{ .Site.Language.Lang }}" class="no-js">
+ <head>
+ {{ partial "head.html" . }}
+ <title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
+ </head>
+ <body class="td-{{ .Kind }} td-blog">
+ <header>
+ {{ partial "navbar.html" . }}
+ </header>
+ <div class="container-fluid td-outer">
+ <div class="td-main">
+ <div class="row flex-xl-nowrap">
+ <div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
+ {{ partial "sidebar.html" . }}
+ </div>
+ <div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
+ {{ partial "toc.html" . }}
+ </div>
+ <main class="col-12 col-md-9 col-xl-8 pl-md-5 pr-md-4" role="main">
+ {{ with .CurrentSection.OutputFormats.Get "rss" -}}
+ <a class="btn btn-lg -bg-orange td-rss-button d-none d-lg-block" href="{{ .Permalink | safeURL }}" target="_blank">
+ RSS <i class="fa fa-rss ml-2 "></i>
+ </a>
+ {{ end -}}
+ {{ block "main" . }}{{ end }}
+ </main>
+ </div>
+ </div>
+ {{ partial "footer.html" . }}
+ </div>
+ {{ partial "scripts.html" . }}
+ </body>
+</html> \ No newline at end of file
diff --git a/themes/docsy/layouts/blog/content.html b/themes/docsy/layouts/blog/content.html
new file mode 100644
index 0000000..7193b19
--- /dev/null
+++ b/themes/docsy/layouts/blog/content.html
@@ -0,0 +1,16 @@
+<div class="td-content">
+ <h1>{{ .Title }}</h1>
+ {{ with .Params.description }}<div class="lead">{{ . | markdownify }}</div>{{ end }}
+ <div class="td-byline mb-4">
+ {{ with .Params.author }}{{ T "post_byline_by" }} <b>{{ . | markdownify }}</b> |{{ end}}
+ <time datetime="{{ $.Date.Format "2006-01-02" }}" class="text-muted">{{ $.Date.Format $.Site.Params.time_format_blog }}</time>
+ </div>
+ {{ .Content }}
+ {{ if (.Site.DisqusShortname) }}
+ <br />
+ {{ partial "disqus-comment.html" . }}
+ <br />
+ {{ end }}
+
+ {{ partial "pager.html" . }}
+</div>
diff --git a/themes/docsy/layouts/blog/list.html b/themes/docsy/layouts/blog/list.html
new file mode 100644
index 0000000..1480cfc
--- /dev/null
+++ b/themes/docsy/layouts/blog/list.html
@@ -0,0 +1,36 @@
+{{ define "main" }}
+{{ if .Parent.IsHome }}
+{{ $.Scratch.Set "blog-pages" (where .Site.RegularPages "Section" .Section) }}
+{{ else }}
+{{$.Scratch.Set "blog-pages" .Pages }}
+{{ end }}
+{{ $pag := .Paginate (( $.Scratch.Get "blog-pages").GroupByDate "2006")}}
+{{ $pageGroups := $pag.PageGroups}}
+{{ if eq $pag.PageNumber 1 }}
+{{ end }}
+<div class="row">
+ <div class="col-12">
+ {{ range $pageGroups }}
+ <h2>{{ T "post_posts_in" }} {{ .Key }}</h2>
+ <ul class="list-unstyled mt-4">
+ {{ range .Pages }}
+ <li class="media mb-4">
+ <div class="media-body">
+ <h5 class="mt-0 mb-1"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h5>
+ <p class="mb-2 mb-md-3"><small class="text-muted">{{ .Date.Format ($.Param "time_format_blog") }} {{ T "ui_in"}} {{ .CurrentSection.LinkTitle }}</small></p>
+ {{ partial "featured-image.html" (dict "p" . "w" 250 "h" 125 "class" "float-left mr-3 pt-1 d-none d-md-block") }}
+ <p class="pt-0 mt-0">{{ .Plain | safeHTML | truncate 250 }}</p>
+ <p class="pt-0"><a href="{{ .RelPermalink }}">{{ T "ui_read_more"}}</a></p>
+ </div>
+ </li>
+ {{ end }}
+ </ul>
+ {{ end }}
+ </div>
+</div>
+<div class="row pl-2 pt-2">
+ <div class="col">
+ {{ template "_internal/pagination.html" . }}
+ </div>
+</div>
+{{ end }} \ No newline at end of file
diff --git a/themes/docsy/layouts/blog/single.html b/themes/docsy/layouts/blog/single.html
new file mode 100644
index 0000000..00cb3ab
--- /dev/null
+++ b/themes/docsy/layouts/blog/single.html
@@ -0,0 +1,3 @@
+{{ define "main" }}
+{{ .Render "content" }}
+{{ end }} \ No newline at end of file