aboutsummaryrefslogtreecommitdiff
path: root/generators/hugo/themes/edwin/layouts/partials
diff options
context:
space:
mode:
Diffstat (limited to 'generators/hugo/themes/edwin/layouts/partials')
-rw-r--r--generators/hugo/themes/edwin/layouts/partials/brand.html1
-rw-r--r--generators/hugo/themes/edwin/layouts/partials/footer.html1
-rw-r--r--generators/hugo/themes/edwin/layouts/partials/head-custom.html1
-rw-r--r--generators/hugo/themes/edwin/layouts/partials/head-meta.html2
-rw-r--r--generators/hugo/themes/edwin/layouts/partials/header.html11
-rw-r--r--generators/hugo/themes/edwin/layouts/partials/navigator.html1
-rw-r--r--generators/hugo/themes/edwin/layouts/partials/paginator.html45
-rw-r--r--generators/hugo/themes/edwin/layouts/partials/post-categories.html9
-rw-r--r--generators/hugo/themes/edwin/layouts/partials/post-date.html14
-rw-r--r--generators/hugo/themes/edwin/layouts/partials/post-tags.html9
-rw-r--r--generators/hugo/themes/edwin/layouts/partials/recent.html14
-rw-r--r--generators/hugo/themes/edwin/layouts/partials/related.html9
-rw-r--r--generators/hugo/themes/edwin/layouts/partials/sidebar.html8
-rw-r--r--generators/hugo/themes/edwin/layouts/partials/taxonomies.html12
-rw-r--r--generators/hugo/themes/edwin/layouts/partials/title.html2
15 files changed, 139 insertions, 0 deletions
diff --git a/generators/hugo/themes/edwin/layouts/partials/brand.html b/generators/hugo/themes/edwin/layouts/partials/brand.html
new file mode 100644
index 0000000..d6eb5c6
--- /dev/null
+++ b/generators/hugo/themes/edwin/layouts/partials/brand.html
@@ -0,0 +1 @@
+{{ .Site.Title }} \ No newline at end of file
diff --git a/generators/hugo/themes/edwin/layouts/partials/footer.html b/generators/hugo/themes/edwin/layouts/partials/footer.html
new file mode 100644
index 0000000..2126899
--- /dev/null
+++ b/generators/hugo/themes/edwin/layouts/partials/footer.html
@@ -0,0 +1 @@
+{{ safeHTML "<?php require $_SERVER['DOCUMENT_ROOT'] . '/..' . '/views/partials/footer.php'; ?>" }}
diff --git a/generators/hugo/themes/edwin/layouts/partials/head-custom.html b/generators/hugo/themes/edwin/layouts/partials/head-custom.html
new file mode 100644
index 0000000..c1ea866
--- /dev/null
+++ b/generators/hugo/themes/edwin/layouts/partials/head-custom.html
@@ -0,0 +1 @@
+<!-- Create <project-root>/layouts/partials/head-custom.html to overwrite this empty template and put custom code into the <head> section. --> \ No newline at end of file
diff --git a/generators/hugo/themes/edwin/layouts/partials/head-meta.html b/generators/hugo/themes/edwin/layouts/partials/head-meta.html
new file mode 100644
index 0000000..0f4705e
--- /dev/null
+++ b/generators/hugo/themes/edwin/layouts/partials/head-meta.html
@@ -0,0 +1,2 @@
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
diff --git a/generators/hugo/themes/edwin/layouts/partials/header.html b/generators/hugo/themes/edwin/layouts/partials/header.html
new file mode 100644
index 0000000..8e8a798
--- /dev/null
+++ b/generators/hugo/themes/edwin/layouts/partials/header.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html lang="en-us">
+
+ <head>
+
+ <meta name="description" content="{{ partial "title.html" . -}}">
+ <meta name="keywords" content="{{ partial "title.html" . -}}">
+
+ <title>{{- block "title" . }}{{ partial "title.html" . -}}{{- end }}</title>
+
+ {{ safeHTML "<?php require $_SERVER['DOCUMENT_ROOT'] . '/..' . '/views/partials/header.php'; ?>" }}
diff --git a/generators/hugo/themes/edwin/layouts/partials/navigator.html b/generators/hugo/themes/edwin/layouts/partials/navigator.html
new file mode 100644
index 0000000..dfb8d4c
--- /dev/null
+++ b/generators/hugo/themes/edwin/layouts/partials/navigator.html
@@ -0,0 +1 @@
+{{ safeHTML "<?php require $_SERVER['DOCUMENT_ROOT'] . '/..' . '/views/partials/navigator.php'; ?>" }}
diff --git a/generators/hugo/themes/edwin/layouts/partials/paginator.html b/generators/hugo/themes/edwin/layouts/partials/paginator.html
new file mode 100644
index 0000000..7f1ca0d
--- /dev/null
+++ b/generators/hugo/themes/edwin/layouts/partials/paginator.html
@@ -0,0 +1,45 @@
+{{ $pag := $.Paginator }}
+{{ if gt $pag.TotalPages 1 }}
+<nav class="blog-pagination">
+ <ul class="pagination justify-content-center">
+ {{ with $pag.First }}
+ <li class="page-item">
+ <a class="page-link" href="{{ .URL }}" aria-label="First"><span aria-hidden="true">&laquo;&laquo;</span></a>
+ </li>
+ {{ end }}
+ <li class="page-item {{ if not $pag.HasPrev }}disabled{{ end }}">
+ <a class="page-link" href="{{ if $pag.HasPrev }}{{ $pag.Prev.URL }}{{ end }}" aria-label="Previous"><span aria-hidden="true">&laquo;</span></a>
+ </li>
+ {{ $.Scratch.Set "__paginator.ellipsed" false }}
+ {{ range $pag.Pagers }}
+ {{ $right := sub .TotalPages .PageNumber }}
+ {{ $showNumber := or (le .PageNumber 3) (eq $right 0) }}
+ {{ $showNumber := or $showNumber (and (gt .PageNumber (sub $pag.PageNumber 2)) (lt .PageNumber (add $pag.PageNumber 2))) }}
+ {{ if $showNumber }}
+ {{ $.Scratch.Set "__paginator.ellipsed" false }}
+ {{ $.Scratch.Set "__paginator.shouldEllipse" false }}
+ {{ else }}
+ {{ $.Scratch.Set "__paginator.shouldEllipse" (not ($.Scratch.Get "__paginator.ellipsed") ) }}
+ {{ $.Scratch.Set "__paginator.ellipsed" true }}
+ {{ end }}
+ {{ if $showNumber }}
+ <li class="page-item {{ if eq . $pag }}active{{ end }}">
+ <a class="page-link" href="{{ .URL }}">{{ .PageNumber }}</a>
+ </li>
+ {{ else if ($.Scratch.Get "__paginator.shouldEllipse") }}
+ <li class="page-item disabled">
+ <span class="page-link" aria-hidden="true">&hellip;</span>
+ </li>
+ {{ end }}
+ {{ end }}
+ <li class="page-item {{ if not $pag.HasNext }}disabled{{ end }}">
+ <a class="page-link" href="{{ if $pag.HasNext }}{{ $pag.Next.URL }}{{ end }}" aria-label="Next"><span aria-hidden="true">&raquo;</span></a>
+ </li>
+ {{ with $pag.Last }}
+ <li class="page-item">
+ <a class="page-link" href="{{ .URL }}" aria-label="Last"><span aria-hidden="true">&raquo;&raquo;</span></a>
+ </li>
+ {{ end }}
+ </ul>
+</nav>
+{{ end }} \ No newline at end of file
diff --git a/generators/hugo/themes/edwin/layouts/partials/post-categories.html b/generators/hugo/themes/edwin/layouts/partials/post-categories.html
new file mode 100644
index 0000000..f52c1f5
--- /dev/null
+++ b/generators/hugo/themes/edwin/layouts/partials/post-categories.html
@@ -0,0 +1,9 @@
+{{ if .Params.categories }}
+
+ <strong>{{ i18n "categories" }}:</strong>
+ {{ range .Params.categories }}
+
+ <a class="rounded-full bg-indigo px-2 py-1 text-xs font-bold text-white no-underline"
+ href="{{ "/categories/" | relLangURL }}{{ . | urlize }}/">{{ . }}</a>
+ {{ end }}
+{{ end }}
diff --git a/generators/hugo/themes/edwin/layouts/partials/post-date.html b/generators/hugo/themes/edwin/layouts/partials/post-date.html
new file mode 100644
index 0000000..31a8198
--- /dev/null
+++ b/generators/hugo/themes/edwin/layouts/partials/post-date.html
@@ -0,0 +1,14 @@
+{{ $dateFormat := default "Jan 2, 2006" (index .Site.Params "date_format") }}
+{{ $author := .Params.author | default .Site.Params.author }}
+
+
+{{ if not .Date.IsZero }}
+ {{ .Date.Format $dateFormat }}
+{{ end }}
+
+<!--
+{{ if $author }}
+ {{ i18n "by" }} <span class="font-bold" rel="author">{{ $author }}</span>
+{{ end }}
+-->
+
diff --git a/generators/hugo/themes/edwin/layouts/partials/post-tags.html b/generators/hugo/themes/edwin/layouts/partials/post-tags.html
new file mode 100644
index 0000000..b1f445d
--- /dev/null
+++ b/generators/hugo/themes/edwin/layouts/partials/post-tags.html
@@ -0,0 +1,9 @@
+{{ if .Params.tags }}
+
+ {{ range .Params.tags }}
+
+ <a class="rounded bg-red-500 px-2 py-1 text-xs font-bold text-white no-underline"
+ href="{{ "/tags/" | relLangURL }}{{ . | urlize }}/">{{ . }}</a>
+
+ {{ end }}
+{{ end }}
diff --git a/generators/hugo/themes/edwin/layouts/partials/recent.html b/generators/hugo/themes/edwin/layouts/partials/recent.html
new file mode 100644
index 0000000..a6240be
--- /dev/null
+++ b/generators/hugo/themes/edwin/layouts/partials/recent.html
@@ -0,0 +1,14 @@
+{{ $num_recent_posts := default 5 .Site.Params.sidebar.num_recent_posts }}
+{{ $posts := first $num_recent_posts (where .Site.Pages "Section" "in" .Site.Params.mainSections) }}
+{{ if gt (len $posts) 0 }}
+<section>
+ <h4>{{ i18n "recentPosts" }}</h4>
+ <ol class="list-unstyled blog__recents">
+ {{ range first 2 $posts }}
+ <li>
+ <a href="{{.RelPermalink}}">{{.Title | markdownify }}</a>
+ </li>
+ {{ end }}
+ </ol>
+</section>
+{{ end }} \ No newline at end of file
diff --git a/generators/hugo/themes/edwin/layouts/partials/related.html b/generators/hugo/themes/edwin/layouts/partials/related.html
new file mode 100644
index 0000000..33f4973
--- /dev/null
+++ b/generators/hugo/themes/edwin/layouts/partials/related.html
@@ -0,0 +1,9 @@
+{{ $related := .Site.RegularPages.Related . | first 5 }}
+{{ with $related }}
+ <h3 class="text-gray-800 mt-6 mb-1 text-lg font-bold">{{ i18n "related" }}</h3>
+ <ul class="list-reset mb-6">
+ {{ range . }}
+ <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
+ {{ end }}
+ </ul>
+{{ end }}
diff --git a/generators/hugo/themes/edwin/layouts/partials/sidebar.html b/generators/hugo/themes/edwin/layouts/partials/sidebar.html
new file mode 100644
index 0000000..6d182f8
--- /dev/null
+++ b/generators/hugo/themes/edwin/layouts/partials/sidebar.html
@@ -0,0 +1,8 @@
+<aside class="">
+ {{ if default true .Site.Params.sidebar.showRecent }}
+ {{ partial "recent" . }}
+ {{ end }}
+ {{ if default true .Site.Params.sidebar.showTaxonomy }}
+ {{ partial "taxonomies" . }}
+ {{ end }}
+</aside>
diff --git a/generators/hugo/themes/edwin/layouts/partials/taxonomies.html b/generators/hugo/themes/edwin/layouts/partials/taxonomies.html
new file mode 100644
index 0000000..778611b
--- /dev/null
+++ b/generators/hugo/themes/edwin/layouts/partials/taxonomies.html
@@ -0,0 +1,12 @@
+<section>
+ {{ range $taxonomyname, $taxonomy := .Site.Taxonomies }}
+ {{ if gt (len $taxonomy) 0 }}
+ <h4>{{ i18n $taxonomyname }}</h4>
+ <p>
+ {{ range $name, $value := $taxonomy }}
+ <a class="badge badge-primary" href="{{ printf "/%s/" $taxonomyname | relLangURL }}{{ $name | urlize }}/">{{ $name }}</a>
+ {{ end }}
+ </p>
+ {{ end }}
+ {{ end }}
+</section>
diff --git a/generators/hugo/themes/edwin/layouts/partials/title.html b/generators/hugo/themes/edwin/layouts/partials/title.html
new file mode 100644
index 0000000..f7ad714
--- /dev/null
+++ b/generators/hugo/themes/edwin/layouts/partials/title.html
@@ -0,0 +1,2 @@
+{{ with .Title }}{{ . }}{{ end }}
+