diff --git a/LICENSE b/LICENSE index 2071b23..a71a10c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,9 +1,21 @@ -MIT License +The MIT License (MIT) -Copyright (c) +Copyright (c) 2016 Vimux +Copyright (c) 2023 Zongor -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: +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 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. +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/README.md b/README.md index f5ce0c0..fa0970e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,24 @@ -# hugo-theme-zirakzigil +# zirakzigil -A Hugo theme based on [Blank](https://github.com/Vimux/Blank) created by [Vimux](https://github.com/Vimux). +zirakzigil is based on [Blank](https://github.com/Vimux/Blank) created by [Vimux](https://github.com/Vimux). + +## Installation + +In your Hugo site `themes` directory, run: + +``` +git clone https://git.alfrescocavern.com/zongor/zirakzigil +``` + +Next, open `config.toml` in the base of the Hugo site and ensure the theme option is set to `zirakzigil`. + +``` +theme = "zirakzigil" +``` + +For more information read the official [quick start guide](https://gohugo.io/getting-started/quick-start/) of Hugo. + + +## License + +This theme is released under the [MIT license](https://git.alfrescocavern.com/zongor/hugo-theme-zirakzigil/raw/branch/main/LICENSE). diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..ef75f76 --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,4 @@ ++++ +title = "{{ replace .Name "-" " " | title }}" +date = {{ .Date }} ++++ diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..33e5cda --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,20 @@ + + + + + + + {{ .Title }} + {{ with .Site.Params.description }}{{ end }} + {{ with .Site.Params.author }}{{ end }} + + {{ with .OutputFormats.Get "RSS" -}} + {{ printf `` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }} + {{- end }} + + + {{ partial "header" . }} + {{ block "main" . }}{{ end }} + {{ partial "footer" . }} + + diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..68fb00c --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,16 @@ +{{ define "main" }} +
+ {{ if or .Title .Content }} +
+ {{ with .Title }}

{{ . }}

{{ end }} + {{ with .Content }}
{{ . }}
{{ end }} +
+ {{ end }} + + {{ range .Paginator.Pages }} + {{ .Render "summary" }} + {{ end }} + {{ partial "pagination.html" . }} +
+{{ partial "sidebar.html" . }} +{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..02e93f8 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,26 @@ +{{ define "main" }} +
+
+

{{ .Title }}

+ +
+ {{ .Content }} +
+ {{ with .Params.tags }} +
+
    + {{ range . }} +
  • {{ . }}
  • + {{ end }} +
+
+ {{ end }} + {{ with .Site.DisqusShortname }} +
+ {{ template "_internal/disqus.html" . }} +
+ {{ end }} +
+
+{{ partial "sidebar.html" . }} +{{ end }} diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html new file mode 100644 index 0000000..c84e58f --- /dev/null +++ b/layouts/_default/summary.html @@ -0,0 +1,13 @@ +
+

{{ .Title }}

+ + {{ range .Params.tags }} + {{ . }} + {{ end }} +
+ {{ .Summary }} + {{ if .Truncated }} + Read more... + {{ end }} +
+
diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..e9df243 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,12 @@ +{{ define "main" }} +
+ {{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }} + {{ range $paginator.Pages }} +
+ {{ .Render "summary" }} +
+ {{ end }} + {{ partial "pagination.html" . }} +
+{{ partial "sidebar.html" . }} +{{ end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..a34c170 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,3 @@ + diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..97cd285 --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,9 @@ +
+ {{ with .Site.Menus.main }} + + {{ end }} +
diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html new file mode 100644 index 0000000..79f8053 --- /dev/null +++ b/layouts/partials/pagination.html @@ -0,0 +1,9 @@ +
+{{ if .Paginator.HasPrev }} + Previous Page +{{ end }} +{{ .Paginator.PageNumber }} of {{ .Paginator.TotalPages }} +{{ if .Paginator.HasNext }} + Next Page +{{ end }} +
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html new file mode 100644 index 0000000..92bbd80 --- /dev/null +++ b/layouts/partials/sidebar.html @@ -0,0 +1,14 @@ + diff --git a/static/css/style.css b/static/css/style.css new file mode 100644 index 0000000..00956aa --- /dev/null +++ b/static/css/style.css @@ -0,0 +1,148 @@ +* { + box-sizing: border-box; +} + +@media (prefers-color-scheme: light) { + body { + background-color: white; + color: black; + margin-top: 0px; + margin-left: 0px; + margin-right: 0px; + } + /* Header/logo Title */ + header { + text-align: center; + background: #ddd; + color: black; + width: 100%; + } + + /* Style the top navigation bar */ + nav { + display: flex; + flex-flow: row wrap; + justify-content: flex-start; + background-color: #eee; + width: 100%; + } + + /* Style the navigation bar links */ + nav a { + color: black; + padding: 10px; + text-decoration: none; + text-align: center; + } + + /* Change color on hover */ + nav a:hover { + background-color: #ddd; + color: black; + } + + nav a.active { + background-color: #ccc; + color: #222; + } + + /* Column container */ + .row { + display: flex; + flex-wrap: wrap; + } + + /* Main column */ + main { + flex: 70%; + background-color: white; + padding: 20px; + } + + /* Footer */ + footer { + padding: 10px; + text-align: center; + background: #ddd; + position: fixed; + left: 0; + bottom: 0; + width: 100%; + } +} + +@media (prefers-color-scheme: dark) { + body { + background-color: black; + color: #ddd; + margin-top: 0px; + margin-left: 0px; + margin-right: 0px; + } + /* Header/logo Title */ + header { + text-align: center; + background: #111; + color: #ddd; + width: 100%; + } + + /* Style the top navigation bar */ + nav { + display: flex; + flex-flow: row wrap; + justify-content: flex-start; + background-color: #222; + width: 100%; + } + + /* Style the navigation bar links */ + nav a { + color: #ddd; + padding: 14px 20px; + text-decoration: none; + text-align: center; + } + + /* Change color on hover */ + nav a:hover { + background-color: #111; + color: #ddd; + } + + nav a.active { + background-color: #ccc; + color: #222; + } + + /* Column container */ + .row { + display: flex; + flex-wrap: wrap; + } + + /* Main column */ + main { + flex: 70%; + background-color: #000; + padding: 20px; + } + + /* Footer */ + footer { + padding: 10px; + text-align: center; + background: #111; + position: fixed; + left: 0; + bottom: 0; + width: 100%; + } +} + +@media screen and (max-width: 700px) { + .row, + nav { + flex-direction: column; + } +} diff --git a/theme.toml b/theme.toml new file mode 100644 index 0000000..a77a1b5 --- /dev/null +++ b/theme.toml @@ -0,0 +1,16 @@ +name = "Blank" +license = "MIT" +licenselink = "https://git.alfrescocavern.com/zongor/hugo-theme-zirakzigil/raw/branch/main/LICENSE" +description = "Custom theme for alfrescocavern.com based on `blank` by vimux." +homepage = "https://git.alfrescocavern.com/zongor/hugo-theme-zirakzigil" +tags = ["blog", "dark", "development"] +features = ["blog"] +min_version = "0.20" + +[author] + name = "zongor" + homepage = "https://git.alfrescocavern.com/zongor/" + +[original] + name = "Vimux" + homepage = "https://github.com/vimux"