commit 8ae4ae106ce9b662bdbacffebf14c8b9c2ae527b Author: Dmitry Kolosov Date: Sun Jan 12 09:51:51 2020 +0300 initial commit diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..11f1ea6 --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2020 Dmitry Kolosov + +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. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..3847c22 --- /dev/null +++ b/README.md @@ -0,0 +1,66 @@ +# Anubis Theme for Hugo + +Anubis is a simple minimalist theme for [Hugo blog engine](https://gohugo.io/). + +![Anubis Screenshot](https://raw.githubusercontent.com/mitrichius/hugo-theme-anubis/master/static/images/screenshot.png) + +## Features + +- Pagination +- Tags +- Archive + +## Installation + +Inside the folder of your Hugo site run: + + $ git submodule add https://github.com/mitrichius/hugo-theme-anubis.git themes/anubis + +For more information read the official [setup guide](//gohugo.io/overview/installing/) of Hugo. + +## Getting started +After installing the theme successfully it requires a just a few more steps to get your site running. + +### Update config file + +Example: +```yaml +languageCode: "en-us" +baseUrl = "" +title: "Anubis" +author: "" +theme: "anubis" +paginate: 10 + +menu: + main: + - identifier: archive + name: Archive + title: Archive + url: /posts/ + weight: 0 + +params: + description: "" +``` + +### Check your site + +In order to see your site in action, run Hugo's built-in local server. + +`$ hugo server` + +Now enter [`localhost:1313`](http://localhost:1313/) in the address bar of your browser. + +## Contributing + +If you find a bug or have an idea for a feature, feel free to write an [issue](https://github.com/mitrichius/hugo-theme-anubis/issues). + +## TODO +See [issues](https://github.com/mitrichius/hugo-theme-anubis/issues). + +## License +MIT + +(c) Dmitry Kolosov +2020 \ No newline at end of file diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..00e77bd --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +draft: true +--- + diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..15804fa --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,25 @@ + + + + {{ block "head" . }} + {{ partial "head.html" . }} + {{ end }} + + +
+
+ {{ block "header" . }} + {{ partial "header.html" . }} + {{ end }} +
+
+ {{ block "main" . }}{{ end }} +
+
+ {{ block "footer" . }} + {{ partial "footer.html" . }} + {{ end }} +
+
+ + diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..f69cfd7 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,29 @@ +{{ define "main" }} + +

{{ .Title }}

+ {{ range (.Site.RegularPages.GroupByPublishDate "2006") }} + {{ range .Pages }} +
+
+

+ {{ .Title }} +

+
+ + +
+ {{ end }} + {{ end }} + +{{ end }} \ No newline at end of file diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml new file mode 100644 index 0000000..473a96f --- /dev/null +++ b/layouts/_default/rss.xml @@ -0,0 +1,34 @@ +{{- $pctx := . -}} +{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} +{{- $pages := $pctx.RegularPages -}} +{{- $limit := .Site.Config.Services.RSS.Limit -}} +{{- if ge $limit 1 -}} +{{- $pages = $pages | first $limit -}} +{{- end -}} +{{- printf "" | safeHTML }} + + + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} + {{ .Permalink }} + {{ .Site.Title }}{{ if ne .Title .Site.Title }}{{ with .Title }} ({{.}}){{ end }}{{ end }} + Hugo -- gohugo.io{{ with .Site.LanguageCode }} + {{.}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} + {{.}}{{end}}{{ if not .Date.IsZero }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} + {{ with .OutputFormats.Get "RSS" }} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{ end }} + {{ range $pages }} + + {{ .Title }} + {{ .Permalink }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} + {{ .Permalink }} + {{ .Content | html }} + + {{ 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..020ba52 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,24 @@ +{{ define "main" }} + +
+
+

{{ .Title }}

+
+ + + + {{ .Content }} +
+ +{{ end }} \ No newline at end of file diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html new file mode 100644 index 0000000..106d060 --- /dev/null +++ b/layouts/_default/terms.html @@ -0,0 +1,16 @@ +{{ define "main" }} + +

{{ .Title }}

+ + + +{{ end }} \ No newline at end of file diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..bc94dc9 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,32 @@ +{{ define "main" }} + + {{ range .Paginator.Pages }} +
+
+

+ {{ .Title }} +

+
+ + + {{ .Summary }} + + +
+ {{ end }} + {{ partial "pagination.html" . }} + +{{ end }} \ No newline at end of file diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..0f701eb --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,3 @@ +

© Дмитрий Колосов, 2020
+Движок Hugo, тема Anubis. +

\ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..1474b76 --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,41 @@ + + + + + + +{{ .Title }} - {{ .Site.Title }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..01337ae --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,9 @@ +

+ {{ .Site.Title }} +

+ diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html new file mode 100644 index 0000000..037b142 --- /dev/null +++ b/layouts/partials/pagination.html @@ -0,0 +1,22 @@ +{{ if or ( .Paginator.HasPrev ) ( .Paginator.HasNext ) }} + +{{ 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..939c157 --- /dev/null +++ b/layouts/taxonomy/tag.html @@ -0,0 +1,28 @@ +{{ define "main" }} + +

Tag: {{ .Title }}

+
+ Ко списку всех тегов +
+ {{ range .Data.Pages }} +
+
+

+ {{ .Title }} +

+
+ + + {{ .Summary }} + + +
+ {{ end }} + +{{ end }} \ No newline at end of file diff --git a/static/css/style.css b/static/css/style.css new file mode 100644 index 0000000..810a573 --- /dev/null +++ b/static/css/style.css @@ -0,0 +1,253 @@ +/* Basic */ +@import url('https://fonts.googleapis.com/css?family=Montserrat&display=swap'); +html { + font-family: -apple-system, BlinkMacSystemFont, 'Montserrat', 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; + /* 1 */ + -ms-text-size-adjust: 100%; + /* 2 */ + -webkit-text-size-adjust: 100%; + /* 2 */ +} + +body { + margin: 0; + background: #ffffff; + color: #333; + font-size: 18px; + line-height: 1.5; + -webkit-font-smoothing: antialiased; +} + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block; +} + +.container { + max-width: 42em; + margin: 0 auto; +} + +/* Links */ + +a { + color: #1d60a3; + text-decoration: none; +} + +a:active, +a:hover { + outline: 0; +} + +a:hover, +a:focus { + color: #a31d1d; + border-bottom: 1px solid rgba(163, 29, 29, .5); +} + +a:active { + color: #a31d1d; + opacity: 0.9; + border-bottom: 1px solid rgba(163, 29, 29, .5); +} + +/* Styles */ + +blockquote { + border-left: 2px solid #cccccc; + padding: 0.1em 1em; + margin-left: 0.75em; +} + +p { + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +hr { + height: 1px; + border: 0; + border-top: 1px solid #cccccc; +} + +/* Header */ + +header { + display: flex; + justify-content: space-between; +} + +header h1 { + font-size: 1em; + margin-top: 1em; + margin-bottom: 0; + font-weight: normal; +} + +header h2 { + font-size: 1em; + margin: 0; + font-weight: normal; +} + +header nav { + margin-top: 1em; + max-width: 100%; + text-align: right; +} + +header nav a { + margin-left: 2em; +} + + +header a { + color: #333; +} + +/* Pages */ +main h1 { + margin-top: 1em; + margin-bottom: 0 ; +} + +.post-short-list:first-of-type { + margin-top: 1em; +} + +/* Articles */ + + +article:not(:last-of-type) { + border-bottom: thin solid #f3f3f3; + padding-bottom: 2em; +} + +article header h1 { + font-size: 2.1em; + line-height: 1.3em; + margin-bottom: 0; + font-weight: bold; +} + +article header h1 a { + border: none; + text-decoration: none; + color: #333; +} + +.article-info { + display: inline-block; + font-size: 0.75em; + color: grey; + margin-bottom: 1em; +} + +.article-date { + display: inline; +} + +.article-tags { + display: inline; + list-style-type: none; + padding: 0; + margin: 0; +} + +.article-tags li { + display: inline; + margin-left: 1em; +} + +article img { + max-width: 100%; + display: block; + height: auto; + margin: 0 auto .5em; +} + +.read-more { + font-size: 0.85em; + text-align: right; +} + +.divider { + display: block; + height: 1px; + border: 0; + border-top: thin solid #f3f3f3;; + width: 25%; + margin: 1em auto; +} + +/* Other pages */ +.terms { + list-style-type: none; + padding: 0; + line-height: 2em; +} + +/* Pagination */ + +.pagination { + display: flex; + justify-content: space-between; + margin-top: 3em; +} + +.pagination { + text-align: center; +} + +.pagination a, .pagination .disabled { + background: #fafafa; + border: thin solid #f3f3f3; + color: #333333; + padding: 0.75em 0.75em; +} + +.pagination .disabled { + visibility: hidden; +} + +.pagination a:hover, .pagination a:focus { + color: #a31d1d; +} + +/* Footer */ + +footer { + border-top: thin solid #f3f3f3;; + margin-top: 3em; + font-size: 16px; +} + +/* Media Queries */ + +@media (max-width: 840px) { + .main-wrapper { + margin: 0; + max-width: none; + overflow-x: hidden; + padding-left: 25px; + padding-right: 25px; + } + + .container { + max-width: 90%; + margin: 0 auto; + } +} +} \ No newline at end of file diff --git a/static/images/screenshot.png b/static/images/screenshot.png new file mode 100644 index 0000000..45fbe8d Binary files /dev/null and b/static/images/screenshot.png differ diff --git a/theme.yaml b/theme.yaml new file mode 100644 index 0000000..4f808fd --- /dev/null +++ b/theme.yaml @@ -0,0 +1,15 @@ +name: "Anubis" +license: "MIT" +description: "A minimal Hugo theme" +homepage: "http://dmitrykolosov.ru" +tags: + - blog + - minimal + - simple + - clean +features: + - blog + +author: + name: "Dmitry Kolosov" + homepage: "http://dmitrykolosov.ru" \ No newline at end of file