fork blank theme

This commit is contained in:
chakr 2023-02-20 22:37:42 -05:00
parent 8fcc3d630c
commit 0bdb85994a
14 changed files with 330 additions and 7 deletions

22
LICENSE
View File

@ -1,9 +1,21 @@
MIT License
The MIT License (MIT)
Copyright (c) <year> <copyright holders>
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.

View File

@ -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).

4
archetypes/default.md Normal file
View File

@ -0,0 +1,4 @@
+++
title = "{{ replace .Name "-" " " | title }}"
date = {{ .Date }}
+++

View File

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode | default "en-us" }}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{{ .Title }}</title>
{{ with .Site.Params.description }}<meta name="description" content="{{ . }}">{{ end }}
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
<link rel="stylesheet" href="{{ "css/style.css" | relURL }}">
{{ with .OutputFormats.Get "RSS" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
{{- end }}
</head>
<body>
{{ partial "header" . }}
{{ block "main" . }}{{ end }}
{{ partial "footer" . }}
</body>
</html>

View File

@ -0,0 +1,16 @@
{{ define "main" }}
<main>
{{ if or .Title .Content }}
<div>
{{ with .Title }}<h1>{{ . }}</h1>{{ end }}
{{ with .Content }}<div>{{ . }}</div>{{ end }}
</div>
{{ end }}
{{ range .Paginator.Pages }}
{{ .Render "summary" }}
{{ end }}
{{ partial "pagination.html" . }}
</main>
{{ partial "sidebar.html" . }}
{{ end }}

View File

@ -0,0 +1,26 @@
{{ define "main" }}
<main>
<article>
<h1>{{ .Title }}</h1>
<time datetime="{{ .Date.Format "2006-01-02T15:04:05" }}">{{ .Date.Format "02.01.2006 15:04" }}</time>
<div>
{{ .Content }}
</div>
{{ with .Params.tags }}
<div>
<ul id="tags">
{{ range . }}
<li><a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a></li>
{{ end }}
</ul>
</div>
{{ end }}
{{ with .Site.DisqusShortname }}
<div>
{{ template "_internal/disqus.html" . }}
</div>
{{ end }}
</article>
</main>
{{ partial "sidebar.html" . }}
{{ end }}

View File

@ -0,0 +1,13 @@
<article>
<h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
<time datetime="{{ .Date.Format "2006-01-02T15:04:05" }}">{{ .Date.Format "02.01.2006 15:04" }}</time>
{{ range .Params.tags }}
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
{{ end }}
<div>
{{ .Summary }}
{{ if .Truncated }}
<a href="{{ .Permalink }}">Read more...</a>
{{ end }}
</div>
</article>

12
layouts/index.html Normal file
View File

@ -0,0 +1,12 @@
{{ define "main" }}
<main>
{{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
{{ range $paginator.Pages }}
<div class="row">
{{ .Render "summary" }}
</div>
{{ end }}
{{ partial "pagination.html" . }}
</main>
{{ partial "sidebar.html" . }}
{{ end }}

View File

@ -0,0 +1,3 @@
<footer>
<p>&copy; {{ now.Year }} <a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></p>
</footer>

View File

@ -0,0 +1,9 @@
<header>
{{ with .Site.Menus.main }}
<nav>
{{ range . }}
<a href="{{ .URL | relURL }}">{{ .Name }}</a>
{{ end }}
</nav>
{{ end }}
</header>

View File

@ -0,0 +1,9 @@
<div>
{{ if .Paginator.HasPrev }}
<a href="{{ .Paginator.Prev.URL }}">Previous Page</a>
{{ end }}
{{ .Paginator.PageNumber }} of {{ .Paginator.TotalPages }}
{{ if .Paginator.HasNext }}
<a href="{{ .Paginator.Next.URL }}">Next Page</a>
{{ end }}
</div>

View File

@ -0,0 +1,14 @@
<aside>
<div>
<div>
<h3>LATEST POSTS</h3>
</div>
<div>
<ul>
{{ range first 5 (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
</div>
</div>
</aside>

148
static/css/style.css Normal file
View File

@ -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;
}
}

16
theme.toml Normal file
View File

@ -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"