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

github.com/darshanbaral/ghazal.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarshan Baral <darshanbaral@gmail.com>2020-05-15 21:37:09 +0300
committerDarshan Baral <darshanbaral@gmail.com>2020-05-15 21:37:09 +0300
commitc595ad03622948c7688212941a4d3e4616de45f0 (patch)
treed868102d391e144f0daee74d7723a23ba03ff018
parentd17c84023a1fdbcc2196022bb767fd1a9d97910b (diff)
Added archive
-rw-r--r--exampleSite/content/archive/_index.md6
-rw-r--r--layouts/partials/icons/archive.html15
-rw-r--r--layouts/section/archive.html25
3 files changed, 46 insertions, 0 deletions
diff --git a/exampleSite/content/archive/_index.md b/exampleSite/content/archive/_index.md
new file mode 100644
index 0000000..66f70d0
--- /dev/null
+++ b/exampleSite/content/archive/_index.md
@@ -0,0 +1,6 @@
+---
+title: "Archive"
+icon: "archive"
+hideFromArchive: true
+weight: 20000
+--- \ No newline at end of file
diff --git a/layouts/partials/icons/archive.html b/layouts/partials/icons/archive.html
new file mode 100644
index 0000000..b224184
--- /dev/null
+++ b/layouts/partials/icons/archive.html
@@ -0,0 +1,15 @@
+<svg
+ aria-hidden="true"
+ focusable="false"
+ data-prefix="fas"
+ data-icon="archive"
+ class="svg-inline--fa fa-archive fa-w-16"
+ role="img"
+ xmlns="http://www.w3.org/2000/svg"
+ viewBox="0 0 512 512"
+>
+ <path
+ fill="currentColor"
+ d="M32 448c0 17.7 14.3 32 32 32h384c17.7 0 32-14.3 32-32V160H32v288zm160-212c0-6.6 5.4-12 12-12h104c6.6 0 12 5.4 12 12v8c0 6.6-5.4 12-12 12H204c-6.6 0-12-5.4-12-12v-8zM480 32H32C14.3 32 0 46.3 0 64v48c0 8.8 7.2 16 16 16h480c8.8 0 16-7.2 16-16V64c0-17.7-14.3-32-32-32z"
+ ></path>
+</svg>
diff --git a/layouts/section/archive.html b/layouts/section/archive.html
new file mode 100644
index 0000000..647b3ef
--- /dev/null
+++ b/layouts/section/archive.html
@@ -0,0 +1,25 @@
+{{ define "main" }}
+<h1 style="margin: 0 0 0.5em 0;">{{ .Title }}</h1>
+{{$paginator := .Paginate (where .Site.Pages "Kind" "page").ByDate.Reverse 50 }}
+<table style="width: 100%;">
+ <thead>
+ <tr>
+ <th style="max-width: 50px;">Date</th>
+ <th>Title</th>
+ <th>Section</th>
+ </tr>
+ </thead>
+ <tbody>
+ {{ range $paginator.Pages }}
+ <tr>
+ <td style="max-width: 50px;">
+ <time>{{- dateFormat .Site.Params.theme.dateFormat .Date }}</time>
+ </td>
+ <td><a href="{{ .Permalink }}">{{ .Title }}</a></td>
+ <td><a href="{{ .Section | relURL }}">{{ (.Site.GetPage .Section).Title }}</a></td>
+ </tr>
+ {{ end }}
+ </tbody>
+</table>
+
+{{ end }}