diff options
author | Spaghetti Wews <spaghettiwews@outlook.com> | 2019-10-08 15:28:40 +0300 |
---|---|---|
committer | Spaghetti Wews <spaghettiwews@outlook.com> | 2019-10-08 15:28:40 +0300 |
commit | c99800d79bf48d657fd8eebcd8565331649ebbb3 (patch) | |
tree | 8d66a0cdc7d3e3a352a56513a20b592d08ca9c92 |
initial commit
-rw-r--r-- | LICENSE.md | 20 | ||||
-rw-r--r-- | archetypes/default.md | 2 | ||||
-rw-r--r-- | layouts/404.html | 0 | ||||
-rw-r--r-- | layouts/_default/list.html | 19 | ||||
-rw-r--r-- | layouts/_default/single.html | 0 | ||||
-rw-r--r-- | layouts/_default/terms.html | 9 | ||||
-rw-r--r-- | layouts/index.html | 20 | ||||
-rw-r--r-- | layouts/items/list.html | 21 | ||||
-rw-r--r-- | layouts/items/single.html | 9 | ||||
-rw-r--r-- | layouts/partials/footer.html | 4 | ||||
-rw-r--r-- | layouts/partials/header.html | 22 | ||||
-rw-r--r-- | static/css/style.css | 137 | ||||
-rw-r--r-- | static/js/.gitkeep | 0 | ||||
-rw-r--r-- | theme.toml | 16 |
14 files changed, 279 insertions, 0 deletions
diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..6c1da3e --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2019 SPAGHETTIWEWS + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..ac36e06 --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,2 @@ ++++ ++++ 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 diff --git a/static/css/style.css b/static/css/style.css new file mode 100644 index 0000000..a30c0e9 --- /dev/null +++ b/static/css/style.css @@ -0,0 +1,137 @@ +* { + box-sizing: border-box; +} + +body { + align-items: center; + display: flex; + font:.8rem/1rem Verdana, Geneva, Tahoma, sans-serif; + flex-direction: column; + justify-content: center; + margin: 0; + padding: 0; +} + +.item { + margin-bottom: 0.6rem; +} + +p { + margin: 0; +} + +#header, +#footer { + background: #d2d2d2; + font-family: Verdana, Geneva, Tahoma, sans-serif; /* Roboto Mono', Verdana, Geneva, Tahoma, sans-serif; */ + padding: 0.4rem 0.8rem; + width: 960px; +} + +#header { + display: flex; + justify-content: space-between; +} + +#header h1 { + font-size: 0.8rem; + margin: 0; +} + +#header h1 a { + color: #000000; + text-decoration: none; +} + +nav ul { + display: flex; + padding: 0; + margin: 0; + list-style: none; +} + +nav ul li { + padding: 0 0 0 0.8rem; +} + +nav a { + color: #000000; + text-decoration: none; +} + +#main { + background-color: #f5f5f5; + width: 960px; +} + +.item__urls { + font-family: Verdana, Geneva, Tahoma, sans-serif; /* 'Roboto Mono', Verdana, Geneva, Tahoma, sans-serif; */ +} + +.item__urls > a:first-child { + color: #11a; + text-decoration: none; +} + +.item__siteurl, +.item__siteurl > *, +.item__count { + color: #828282; + font-size: .7rem; + text-decoration: none; +} + +.item__meta { + font-size: .6rem; + margin-top: 0; +} + +.item__meta > * { + color: #828282; + margin-right: .5rem; +} + +.item__count { + margin: 0 0 0 0.5rem; +} + +ul.pagination { + display: flex; + list-style: none; +} + +ul.pagination li { + margin: 0 .4rem 0 0; +} + +ul.pagination li a { + border: 1px solid #d2d2d2; + border-radius: 3px; + display: block; + padding: 0.3rem; + text-align: center; + text-decoration: none; + width: 32px; +} + +ul.pagination li.active a { + border-color: orange; +} + +.single { + padding: 1rem; +} + +.single code { + background: #fdbcfb; + font-size: 1rem; + padding: 0 0.5rem; +} + +@media (max-width: 960px) { + #header, + #main, + #footer { + width: 100%; + } +}
\ No newline at end of file diff --git a/static/js/.gitkeep b/static/js/.gitkeep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/static/js/.gitkeep diff --git a/theme.toml b/theme.toml new file mode 100644 index 0000000..54c08f5 --- /dev/null +++ b/theme.toml @@ -0,0 +1,16 @@ +# theme.toml template for a Hugo theme +# See https://github.com/gohugoio/hugoThemes#themetoml for an example + +name = "hugonews" +license = "MIT" +licenselink = "" +description = "" +homepage = "https://news.wews.co/" +tags = [] +features = [] +min_version = "0.38" + +[author] + name = "SPAGHETTIWEWS" + homepage = "https://news.wews.co/" + |