This commit is contained in:
Alexandru 2024-09-21 21:46:11 +03:00
parent d159361cdf
commit 72137a12cf
15 changed files with 221 additions and 0 deletions

5
themes/zmin/.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
.Rproj.user
.Rhistory
.RData
.Ruserdata
exampleSite/public

20
themes/zmin/LICENSE.md Normal file
View File

@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2017-2022 Yihui Xie
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.

30
themes/zmin/README.md Normal file
View File

@ -0,0 +1,30 @@
# HUGO XMIN
**NOTE**: fzorb/zmin is the fork of xmin that runs on https://fzorb.xyz/ .
## _Keep it simple, but not simpler_
**XMin** is a Hugo theme written by [Yihui Xie](https://yihui.org) in about four hours: half an hour was spent on the Hugo templates, and 3.5 hours were spent on styling. The main motivation for writing this theme was to provide a really minimal example to beginners of Hugo templates. This XMin theme contains about 130 lines of code in total, including the code in HTML templates and CSS (also counting empty lines).
```bash
find . -not -path '*/exampleSite/*' \( -name '*.html' -o -name '*.css' \) | xargs wc -l
```
```
5 ./layouts/404.html
12 ./layouts/_default/single.html
20 ./layouts/_default/list.html
13 ./layouts/_default/terms.html
0 ./layouts/partials/foot_custom.html
0 ./layouts/partials/head_custom.html
9 ./layouts/partials/footer.html
20 ./layouts/partials/header.html
51 ./static/css/style.css
7 ./static/css/fonts.css
137 total
```
I can certainly further reduce the code, for example, by eliminating the CSS, but I believe a tiny bit of CSS can greatly improve readability. You cannot really find many CSS frameworks that only contain 50 lines of code.
[![Screenshot](https://github.com/yihui/hugo-xmin/raw/master/images/screenshot.png)](https://xmin.yihui.org)

View File

@ -0,0 +1,4 @@
---
title: ''
date: ''
---

View File

@ -0,0 +1,5 @@
{{ partial "header.html" . }}
404 NOT FOUND
{{ partial "footer.html" . }}

View File

@ -0,0 +1,20 @@
{{ partial "header.html" . }}
{{if not .IsHome }}
<h1>{{ .Title | markdownify }}</h1>
{{ end }}
{{ .Content }}
<ul>
{{ $pages := .Pages }}
{{ if .IsHome }}{{ $pages = .Site.RegularPages }}{{ end }}
{{ range (where $pages "Section" "!=" "") }}
<li>
<span class="date">{{ .Date.Format "2006/01/02" }}</span>
<a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
</li>
{{ end }}
</ul>
{{ partial "footer.html" . }}

View File

@ -0,0 +1,12 @@
{{ partial "header.html" . }}
<div class="article-meta">
<h1><span class="title">{{ .Title | markdownify }}</span></h1>
{{ with .Params.author }}<h2 class="author">{{ . }}</h2>{{ end }}
{{ if (gt .Params.date 0) }}<h2 class="date">{{ .Date.Format "2006/01/02" }}</h2>{{ end }}
</div>
<main>
{{ .Content }}
</main>
{{ partial "footer.html" . }}

View File

@ -0,0 +1,13 @@
{{ partial "header.html" . }}
<h1>{{ .Title }}</h1>
<ul class="terms">
{{ range .Data.Terms }}
<li>
<a href="{{ .Page.RelPermalink }}">{{ .Page.Title }}</a> ({{ .Count }})
</li>
{{ end }}
</ul>
{{ partial "footer.html" . }}

View File

@ -0,0 +1,9 @@
<footer>
{{ partial "foot_custom.html" . }}
{{ with .Site.Params.footer }}
<hr/>
{{ replace . "{Year}" now.Year | markdownify}}
{{ end }}
</footer>
</body>
</html>

View File

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ .Title }} | {{ .Site.Title }}</title>
<link rel="stylesheet" href="{{ "css/style.css" | relURL }}" />
<link rel="stylesheet" href="{{ "css/fonts.css" | relURL }}" />
{{ partial "head_custom.html" . }}
</head>
<body>
<nav>
<ul class="menu">
<h1>{{ .Site.Title }}</h1>
{{ range .Site.Menus.main }}
<li><a href="{{ .URL | relURL }}">{{ .Name }}</a></li>
{{ end }}
</ul>
<hr/>
</nav>

View File

@ -0,0 +1,9 @@
body {
font-family: Verdana,sans-serif;
font-size: 100%;
line-height: 1.5;
}
code {
font-family: monospace;
font-size: 100%;
}

View File

@ -0,0 +1,61 @@
body {
max-width: 800px;
margin: auto;
padding: 1em;
line-height: 1.5;
background: #110e0e;
color:#fbfaff;
}
a {
color: #ffce49;
}
/* header and footer areas */
.menu { padding: 0; }
.menu li { display: inline-block;}
.article-meta, .menu a {
text-decoration: none;
background:#292323;
padding: 5px;
border-radius: 5px;
}
.menu h1 {
border-left: 4px solid #ff4646;
}
.menu a:hover {
border-bottom: solid #ff4646;
}
.article-meta, footer { text-align: center;}
.title { font-size: 1.1em; }
footer a { text-decoration: none; }
hr {
border-style: dashed;
color: #ddd;
}
/* code */
pre {
border: 1px solid #ddd;
/*box-shadow: 5px 5px 5px #eee;*/
padding: 1em;
overflow-x: auto;
}
code { background: #292929; }
pre code { background: none; }
/* misc elements */
img, iframe, video { max-width: 100%; }
main { hyphens: auto; }
blockquote {
background: #f9f9f9;
border-left: 5px solid #ccc;
padding: 3px 1em 3px;
}
table {
margin: auto;
}
table thead th { border-bottom: 1px solid #2f3035; }
th, td { padding: 5px; }
thead, tfoot, tr:nth-child(even) { background: #2a2a2e; }

12
themes/zmin/theme.toml Normal file
View File

@ -0,0 +1,12 @@
name = "ZMin"
license = "MIT"
licenselink = "https://github.com/yihui/hugo-xmin/blob/master/LICENSE.md"
description = "eXtremely Minimal Hugo theme: about 150 lines of code in total, including HTML and CSS"
homepage = "https://xmin.yihui.org"
tags = ["minimal", "blog", "personal", "clean", "simple", "starter", "minimalist"]
features = ["blog"]
min_version = "0.18"
[author]
name = "Yihui Xie"
homepage = "https://yihui.org"