Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mavidser/hugo-rocinante.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSid Verma <mavidser@gmail.com>2020-03-05 12:33:21 +0300
committerSid Verma <mavidser@gmail.com>2020-03-05 13:02:38 +0300
commit50be5393f6c95d5675032d519f6f4e8728e7d286 (patch)
treea3c92760a6708a89fd1537e746ce4a69d5e481a0 /layouts
Initial commit
Diffstat (limited to 'layouts')
-rw-r--r--layouts/404.html4
-rw-r--r--layouts/_default/_markup/render-link.html1
-rw-r--r--layouts/_default/baseof.html20
-rw-r--r--layouts/_default/list.html10
-rw-r--r--layouts/_default/single.html23
-rw-r--r--layouts/index.html13
-rw-r--r--layouts/partials/about.html14
-rw-r--r--layouts/partials/footer.html7
-rw-r--r--layouts/partials/head.html16
-rw-r--r--layouts/partials/header.html7
-rw-r--r--layouts/partials/listcontent.html38
-rw-r--r--layouts/partials/pagination.html15
-rw-r--r--layouts/photos/list.html11
-rw-r--r--layouts/photos/single.html44
-rw-r--r--layouts/posts/list.html11
-rw-r--r--layouts/taxonomy/tag.html11
16 files changed, 245 insertions, 0 deletions
diff --git a/layouts/404.html b/layouts/404.html
new file mode 100644
index 0000000..b09a277
--- /dev/null
+++ b/layouts/404.html
@@ -0,0 +1,4 @@
+{{ define "main" }}
+<h1>404: Page not found</h1>
+<p>Why are you here? Who sent you? It's probably your fault anyway. Go back!</p>
+{{ end }} \ No newline at end of file
diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html
new file mode 100644
index 0000000..a5cd49a
--- /dev/null
+++ b/layouts/_default/_markup/render-link.html
@@ -0,0 +1 @@
+<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank"{{ end }}>{{ .Text | safeHTML }}</a> \ No newline at end of file
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
new file mode 100644
index 0000000..7691dea
--- /dev/null
+++ b/layouts/_default/baseof.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ {{- partial "head.html" . -}}
+ <body>
+ <header>
+ {{- partial "header.html" . -}}
+ </header>
+ <main>
+ {{- block "main" . }}{{- end }}
+ </main>
+ <footer>
+ {{- partial "footer.html" . -}}
+ </footer>
+ {{ $js := resources.Get "js/rocinante.js" | resources.Minify }}
+ <script>
+ const emailId = atob({{.Param "email" | base64Encode}});
+ </script>
+ <script src="{{ $js.RelPermalink }}"></script>
+ </body>
+</html>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
new file mode 100644
index 0000000..6e902f5
--- /dev/null
+++ b/layouts/_default/list.html
@@ -0,0 +1,10 @@
+{{ define "main" }}
+ <h1>{{ .Title }}</h1>
+ {{ range .Data.Pages }}
+ <div class="post-short-list">
+ <h3>
+ <a href="{{ .RelPermalink }}">{{ .Title }}</a>
+ </h3>
+ </div>
+ {{ end }}
+{{ 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..de3e473
--- /dev/null
+++ b/layouts/_default/single.html
@@ -0,0 +1,23 @@
+{{ define "main" }}
+
+ <div class="post">
+ <div class="title-group">
+ <div class="title">
+ <h1>{{ .Title }}</h1>
+ </div>
+ <div class="date"><h5>{{ .Params.date.Format "Jan 02, 2006" }}</h5></div>
+ </div>
+ <article class="content">
+ {{ .Content }}
+ </article>
+ {{ with .Params.tags }}
+ <div class="tags">
+ <span title="Tags">🏷</span>
+ <div class="horizontal-links links">
+ {{ range . }}{{ with $.Site.GetPage (printf "/tags/%s" ( . | urlize)) }}<a href="{{ .RelPermalink }}">{{ .Title }}</a>{{ end }}{{ end }}
+ </div>
+ </div>
+ {{ end }}
+ </article>
+
+{{ end }} \ No newline at end of file
diff --git a/layouts/index.html b/layouts/index.html
new file mode 100644
index 0000000..15499ab
--- /dev/null
+++ b/layouts/index.html
@@ -0,0 +1,13 @@
+{{ define "main" }}
+ {{ $paginator := .Paginate (where site.RegularPages "Type" "in" site.Params.mainSections) }}
+ {{ .Scratch.Set "pagenumber" .Paginator.PageNumber }}
+ {{ if eq .Paginator.PageNumber 1 }}
+ {{- partial "about.html" . -}}
+ {{ else }}
+ <h3 class="inline current-page">Page {{.Paginator.PageNumber}}</h3>
+ {{ end }}
+ <hr>
+
+ {{- partial "listcontent.html" . -}}
+ {{- partial "pagination.html" . -}}
+{{ end }} \ No newline at end of file
diff --git a/layouts/partials/about.html b/layouts/partials/about.html
new file mode 100644
index 0000000..a4887b1
--- /dev/null
+++ b/layouts/partials/about.html
@@ -0,0 +1,14 @@
+{{ .Site.Params.about | .RenderString }}
+
+{{ range $links := .Site.Params.links }}
+ <p class="horizontal-links">
+ {{- range $links.link -}}
+ <a href="{{ .href }}"
+ {{ if .new_tab }} target="_blank" {{end}}
+ {{ if .smart_email_link }} class="email-hook" id="about-email" title="Click to show email" {{end}}
+ >
+ {{- .name -}}
+ </a>
+ {{- end -}}
+ </p>
+{{ end }}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
new file mode 100644
index 0000000..77c171c
--- /dev/null
+++ b/layouts/partials/footer.html
@@ -0,0 +1,7 @@
+{{ if not .IsNode }}
+ <div class="content-container">
+ <div class="content">
+ {{- partial "about.html" . -}}
+ </div>
+ </div>
+{{ end }} \ No newline at end of file
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
new file mode 100644
index 0000000..a2d3d72
--- /dev/null
+++ b/layouts/partials/head.html
@@ -0,0 +1,16 @@
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>{{ if ne .Title .Site.Title }}{{ .Title }} · {{ end }}{{ .Site.Title }}</title>
+
+{{ $options := (dict "outputStyle" "compressed" "enableSourceMap" true) }}
+{{ $style := resources.Get "css/rocinante.scss" | resources.ToCSS $options }}
+<link rel="stylesheet" href="{{ $style.RelPermalink }}" />
+
+{{ with .Site.Params.favicon }}
+<link rel="shortcut icon" href="{{ . }}">
+{{ end }}
+
+{{ range .AlternativeOutputFormats -}}
+ {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
+{{ end -}} \ No newline at end of file
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
new file mode 100644
index 0000000..868fc28
--- /dev/null
+++ b/layouts/partials/header.html
@@ -0,0 +1,7 @@
+<h2>
+ {{ if and (.IsHome) (not (.Scratch.Get "pagenumber")) }}
+ › {{ .Site.Title }}
+ {{ else }}
+ <a href="{{ .Site.BaseURL }}">‹ {{ .Site.Title }}</a>
+ {{ end }}
+</h2>
diff --git a/layouts/partials/listcontent.html b/layouts/partials/listcontent.html
new file mode 100644
index 0000000..6ffa875
--- /dev/null
+++ b/layouts/partials/listcontent.html
@@ -0,0 +1,38 @@
+{{ range .Paginator.Pages }}
+<article class="post-list">
+ <div class="title-group">
+ <div class="title">
+ <h1><a href="{{ .RelPermalink }}">{{ .Title }}</a></h1>
+ </div>
+ {{ if eq .Type "photos" }}
+ <div class="album">
+ <div class="date"><h5>{{ .Params.display_date }}</h5></div><div class="location"><h5>{{ .Params.location }}</h5></div>
+ </div>
+ {{ else }}
+ <div class="date"><h5>{{ .Params.date.Format "Jan 02, 2006" }}</h5></div>
+ {{ end }}
+ </div class="title-group">
+
+ <div class="content">
+ {{ .Summary | safeHTML }}
+ {{ if and (eq .Type "photos") (.Params.banner) }}
+ {{ $image := (.Resources.GetMatch .Params.banner).Resize "700x q100" }}
+ <p><a href="{{.RelPermalink}}"><img src="{{ $image.RelPermalink }}"></a></p>
+ {{ end }}
+ </div>
+ {{ if eq .Type "photos" }}
+ {{ if gt (len .Resources) 1 }}
+ <div class="read-more">
+ <a href="{{ .RelPermalink }}">See {{ len .Resources }} photos ›</a>
+ </div>
+ {{ end }}
+ {{ else }}
+ {{ if .Truncated }}
+ <div class="read-more">
+ <a href="{{ .RelPermalink }}">Read more ›</a>
+ </div>
+ {{ end }}
+ {{ end }}
+
+</article>
+{{ end }} \ No newline at end of file
diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html
new file mode 100644
index 0000000..72161ea
--- /dev/null
+++ b/layouts/partials/pagination.html
@@ -0,0 +1,15 @@
+{{ if ne .Paginator.TotalPages 0 }}
+ <div class="paginator">
+ {{ if .Paginator.HasNext }}
+ <a href="{{ .Paginator.Next.URL }}" class="older">« Older posts</a>
+ {{ else }}
+ <a class="older disabled">« Older posts</a>
+ {{ end }}
+
+ {{ if .Paginator.HasPrev }}
+ <a href="{{ .Paginator.Prev.URL }}" class="newer">Newer posts »</a>
+ {{ else }}
+ <a class="newer disabled">Newer posts »</a>
+ {{ end }}
+ </div>
+{{ end }} \ No newline at end of file
diff --git a/layouts/photos/list.html b/layouts/photos/list.html
new file mode 100644
index 0000000..a1eee21
--- /dev/null
+++ b/layouts/photos/list.html
@@ -0,0 +1,11 @@
+{{ define "main" }}
+ <div class="combined-title-pagination">
+ <h1>{{ .Title }}</h1>
+ {{ if ne .Paginator.PageNumber 1 }}
+ <h3 class="current-page">Page {{.Paginator.PageNumber}}</h3>
+ {{ end }}
+ </div>
+ <hr>
+ {{- partial "listcontent.html" . -}}
+ {{- partial "pagination.html" . -}}
+{{ end }} \ No newline at end of file
diff --git a/layouts/photos/single.html b/layouts/photos/single.html
new file mode 100644
index 0000000..1bc4bbc
--- /dev/null
+++ b/layouts/photos/single.html
@@ -0,0 +1,44 @@
+{{ define "main" }}
+ <div class="album">
+ <div class="title-group">
+ <div class="title">
+ <h1>{{ .Title }}</h1>
+ </div>
+ <div class="date"><h5>{{ .Params.display_date }}</h5></div><div class="location"><h5>{{ .Params.location }}</h5></div>
+ <!-- {{ if .Params.display_date }}
+ {{ end }}
+ {{ if .Params.location }}
+ {{ end }} -->
+ </div>
+ <article class="content">
+ {{ .Content }}
+ <div class="photos">
+ {{ range .Resources }}
+ {{ if in .Name "Pano" }}
+ {{ $image := .Resize "700x q100" }}
+ <a href="{{.RelPermalink}}" class="full-size">
+ <img src="{{$image.RelPermalink}}" alt="">
+ </a>
+ {{ else }}
+ {{ $image := .Resize "350x q100" }}
+ <a href="{{.RelPermalink}}">
+ <img src="{{$image.RelPermalink}}" alt="">
+ </a>
+ {{ end }}
+ {{ end }}
+ </div>
+ <p>
+ <em>{{ .Params.footer }}</em>
+ </p>
+ </article>
+ {{ with .Params.tags }}
+ <div class="tags">
+ <span title="Tags">🏷</span>
+ <div class="horizontal-links links">
+ {{ range . }}{{ with $.Site.GetPage (printf "/tags/%s" ( . | urlize)) }}<a href="{{ .RelPermalink }}">{{ .Title }}</a>{{ end }}{{ end }}
+ </div>
+ </div>
+ {{ end }}
+ </article>
+
+{{ end }} \ No newline at end of file
diff --git a/layouts/posts/list.html b/layouts/posts/list.html
new file mode 100644
index 0000000..a1eee21
--- /dev/null
+++ b/layouts/posts/list.html
@@ -0,0 +1,11 @@
+{{ define "main" }}
+ <div class="combined-title-pagination">
+ <h1>{{ .Title }}</h1>
+ {{ if ne .Paginator.PageNumber 1 }}
+ <h3 class="current-page">Page {{.Paginator.PageNumber}}</h3>
+ {{ end }}
+ </div>
+ <hr>
+ {{- partial "listcontent.html" . -}}
+ {{- partial "pagination.html" . -}}
+{{ end }} \ No newline at end of file
diff --git a/layouts/taxonomy/tag.html b/layouts/taxonomy/tag.html
new file mode 100644
index 0000000..6e5f9da
--- /dev/null
+++ b/layouts/taxonomy/tag.html
@@ -0,0 +1,11 @@
+{{ define "main" }}
+ <div class="combined-title-pagination">
+ <h1><a href="{{ ($.Site.GetPage "/tags").RelPermalink }}">Tags</a> / {{ .Title }}</h1>
+ {{ if ne .Paginator.PageNumber 1 }}
+ <h3 class="current-page">Page {{.Paginator.PageNumber}}</h3>
+ {{ end }}
+ </div>
+ <hr>
+ {{- partial "listcontent.html" . -}}
+ {{- partial "pagination.html" . -}}
+{{ end }} \ No newline at end of file