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

github.com/spaghettiwews/hugonews.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSpaghetti Wews <spaghettiwews@outlook.com>2019-10-08 15:28:40 +0300
committerSpaghetti Wews <spaghettiwews@outlook.com>2019-10-08 15:28:40 +0300
commitc99800d79bf48d657fd8eebcd8565331649ebbb3 (patch)
tree8d66a0cdc7d3e3a352a56513a20b592d08ca9c92 /layouts
initial commit
Diffstat (limited to 'layouts')
-rw-r--r--layouts/404.html0
-rw-r--r--layouts/_default/list.html19
-rw-r--r--layouts/_default/single.html0
-rw-r--r--layouts/_default/terms.html9
-rw-r--r--layouts/index.html20
-rw-r--r--layouts/items/list.html21
-rw-r--r--layouts/items/single.html9
-rw-r--r--layouts/partials/footer.html4
-rw-r--r--layouts/partials/header.html22
9 files changed, 104 insertions, 0 deletions
diff --git a/layouts/404.html b/layouts/404.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/layouts/404.html
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
new file mode 100644
index 0000000..b60e76c
--- /dev/null
+++ b/layouts/_default/list.html
@@ -0,0 +1,19 @@
+{{ partial "header.html" . }}
+{{ $start := add (sub (mul .Paginator.PageSize .Paginator.PageNumber) .Paginator.PageSize) 1 }}
+<ol start={{ $start }}>
+ {{ range .Paginator.Pages }}
+ {{ $site := urls.Parse .Params.ItemUrl }}
+ <li class="item">
+ <p class="item__urls"><a href="{{ .Params.ItemUrl }}">{{ .Title }}</a> <span class="item__siteurl">(<a href='/sites/{{ replace $site.Host "www." "" }}'>{{ replace $site.Host "www." "" }}</a>)</span></p>
+ <p class="item__meta">
+ <span>{{ .PublishDate }}</span>
+ {{ range .Params.tags }}
+ <a class="item__tag" href='/tags/{{- replace . " " "-" -}}'>{{- . -}}</a>
+ {{- end }}
+ <a class="item__notes" href="{{ .Permalink }}">notes</a>
+ </p>
+ </li>
+ {{ end }}
+ </ol>
+ {{ template "_internal/pagination.html" . }}
+{{ partial "footer.html" . }} \ No newline at end of file
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/layouts/_default/single.html
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
new file mode 100644
index 0000000..aac736d
--- /dev/null
+++ b/layouts/_default/terms.html
@@ -0,0 +1,9 @@
+{{ partial "header.html" . }}
+<ol>
+ {{ range $key, $value := .Data.Terms.ByCount }}
+ <li class="item">
+ <p class="item__urls"><a href="{{ $value.Name | urlize }}">{{ $value.Name }}</a><span class="item__count">({{ $value.Count }})</span></p>
+ </li>
+ {{ end }}
+</ol>
+{{ partial "footer.html" . }} \ No newline at end of file
diff --git a/layouts/index.html b/layouts/index.html
new file mode 100644
index 0000000..67d0d96
--- /dev/null
+++ b/layouts/index.html
@@ -0,0 +1,20 @@
+{{ partial "header.html" . }}
+{{ $start := add (sub (mul .Paginator.PageSize .Paginator.PageNumber) .Paginator.PageSize) 1 }}
+<ol start={{ $start }}>
+{{ range .Paginator.Pages }}
+{{ $site := urls.Parse .Params.ItemUrl }}
+<li class="item">
+ <p class="item__urls"><a href="{{ .Params.ItemUrl }}">{{ .Title }}</a> <span class="item__siteurl">(<a href="/sites/{{ replace $site.Host "www." "" }}">{{ replace $site.Host "www." "" }}</a>)</span></p>
+ <p class="item__meta">
+ <span>{{ .PublishDate }}</span>
+ {{ range .Params.tags }}
+ <a class="item__tag" href="/tags/{{- replace . " " "-" -}}">{{- . -}}</a>
+ {{- end }}
+ <a class="item__notes" href="{{ .Permalink }}">notes</a>
+ </p>
+</li>
+{{ end }}
+</ol>
+{{ template "_internal/pagination.html" . }}
+
+{{ partial "footer.html" . }} \ No newline at end of file
diff --git a/layouts/items/list.html b/layouts/items/list.html
new file mode 100644
index 0000000..04200e2
--- /dev/null
+++ b/layouts/items/list.html
@@ -0,0 +1,21 @@
+{{ partial "header.html" . }}
+{{ $start := add (sub (mul .Paginator.PageSize .Paginator.PageNumber) .Paginator.PageSize) 1 }}
+<ol start={{ $start }}>
+{{ range .Paginator.Pages }}
+{{ $site := urls.Parse .Params.ItemUrl }}
+<li class="item">
+ <p class="item__urls"><a href="{{ .Params.ItemUrl }}">{{ .Title }}</a> <span class="item__siteurl">(<a href="/sites/{{ replace $site.Host "www." "" }}">{{ replace $site.Host "www." "" }}</a>)</span></p>
+ <p class="item__meta">
+ <span>{{ .PublishDate }}</span>
+ {{ range .Params.tags }}
+ <a class="item__tag" href="/tags/{{- replace . " " "-" -}}">{{- . -}}</a>
+ {{- end }}
+ <a class="item__notes" href="{{ .Permalink }}">notes</a>
+ </p>
+</li>
+{{ end }}
+</ol>
+
+{{ template "_internal/pagination.html" . }}
+
+{{ partial "footer.html" . }} \ No newline at end of file
diff --git a/layouts/items/single.html b/layouts/items/single.html
new file mode 100644
index 0000000..fad9a3a
--- /dev/null
+++ b/layouts/items/single.html
@@ -0,0 +1,9 @@
+{{ partial "header.html" . }}
+ <article class="single">
+ {{ if ne (trim .Content " ") "" }}
+ {{ .Content }}
+ {{ else }}
+ <p>You have not written any notes for this article.</p>
+ {{ end }}
+ </article>
+{{ partial "footer.html" . }} \ No newline at end of file
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
new file mode 100644
index 0000000..4edb07d
--- /dev/null
+++ b/layouts/partials/footer.html
@@ -0,0 +1,4 @@
+</main>
+<footer id="footer">look ma, a footer</footer>
+</body>
+</html> \ No newline at end of file
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
new file mode 100644
index 0000000..536fb1b
--- /dev/null
+++ b/layouts/partials/header.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
+ <!-- <link href="https://fonts.googleapis.com/css?family=Roboto+Mono&display=swap" rel="stylesheet"> -->
+ <link rel="stylesheet" href="{{ "css/style.css" | relURL }}">
+ <title>{{ .Site.Title }}</title>
+</head>
+<body>
+<header id="header">
+ <h1><a href="/">{{ .Site.Title }}</a></h1>
+ <nav>
+ <ul>
+ <li><a href="/tags">tags</a></li>
+ <li><a href="/sites">sites</a></li>
+ <li><a href="https://github.com/spaghettiwews/hugonews">github</a></li>
+ </ul>
+ </nav>
+</header>
+<main id="main"> \ No newline at end of file