diff --git a/themes/zmin/.gitignore b/themes/zmin/.gitignore new file mode 100644 index 0000000..ce130a0 --- /dev/null +++ b/themes/zmin/.gitignore @@ -0,0 +1,5 @@ +.Rproj.user +.Rhistory +.RData +.Ruserdata +exampleSite/public diff --git a/themes/zmin/LICENSE.md b/themes/zmin/LICENSE.md new file mode 100644 index 0000000..259e3d6 --- /dev/null +++ b/themes/zmin/LICENSE.md @@ -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. diff --git a/themes/zmin/README.md b/themes/zmin/README.md new file mode 100644 index 0000000..6a49c3d --- /dev/null +++ b/themes/zmin/README.md @@ -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) diff --git a/themes/zmin/archetypes/default.md b/themes/zmin/archetypes/default.md new file mode 100644 index 0000000..fb98e92 --- /dev/null +++ b/themes/zmin/archetypes/default.md @@ -0,0 +1,4 @@ +--- +title: '' +date: '' +--- diff --git a/themes/zmin/layouts/404.html b/themes/zmin/layouts/404.html new file mode 100644 index 0000000..c2e4e40 --- /dev/null +++ b/themes/zmin/layouts/404.html @@ -0,0 +1,5 @@ +{{ partial "header.html" . }} + +404 NOT FOUND + +{{ partial "footer.html" . }} diff --git a/themes/zmin/layouts/_default/list.html b/themes/zmin/layouts/_default/list.html new file mode 100644 index 0000000..06b290a --- /dev/null +++ b/themes/zmin/layouts/_default/list.html @@ -0,0 +1,20 @@ +{{ partial "header.html" . }} + +{{if not .IsHome }} +

{{ .Title | markdownify }}

+{{ end }} + +{{ .Content }} + + + +{{ partial "footer.html" . }} diff --git a/themes/zmin/layouts/_default/single.html b/themes/zmin/layouts/_default/single.html new file mode 100644 index 0000000..de3f121 --- /dev/null +++ b/themes/zmin/layouts/_default/single.html @@ -0,0 +1,12 @@ +{{ partial "header.html" . }} +
+

{{ .Title | markdownify }}

+{{ with .Params.author }}

{{ . }}

{{ end }} +{{ if (gt .Params.date 0) }}

{{ .Date.Format "2006/01/02" }}

{{ end }} +
+ +
+{{ .Content }} +
+ +{{ partial "footer.html" . }} diff --git a/themes/zmin/layouts/_default/terms.html b/themes/zmin/layouts/_default/terms.html new file mode 100644 index 0000000..71f47e7 --- /dev/null +++ b/themes/zmin/layouts/_default/terms.html @@ -0,0 +1,13 @@ +{{ partial "header.html" . }} + +

{{ .Title }}

+ + + +{{ partial "footer.html" . }} diff --git a/themes/zmin/layouts/partials/foot_custom.html b/themes/zmin/layouts/partials/foot_custom.html new file mode 100644 index 0000000..e69de29 diff --git a/themes/zmin/layouts/partials/footer.html b/themes/zmin/layouts/partials/footer.html new file mode 100644 index 0000000..f603e17 --- /dev/null +++ b/themes/zmin/layouts/partials/footer.html @@ -0,0 +1,9 @@ + + + diff --git a/themes/zmin/layouts/partials/head_custom.html b/themes/zmin/layouts/partials/head_custom.html new file mode 100644 index 0000000..e69de29 diff --git a/themes/zmin/layouts/partials/header.html b/themes/zmin/layouts/partials/header.html new file mode 100644 index 0000000..88b3be2 --- /dev/null +++ b/themes/zmin/layouts/partials/header.html @@ -0,0 +1,21 @@ + + + + + + {{ .Title }} | {{ .Site.Title }} + + + {{ partial "head_custom.html" . }} + + + + diff --git a/themes/zmin/static/css/fonts.css b/themes/zmin/static/css/fonts.css new file mode 100644 index 0000000..6d86e4c --- /dev/null +++ b/themes/zmin/static/css/fonts.css @@ -0,0 +1,9 @@ +body { + font-family: Verdana,sans-serif; + font-size: 100%; + line-height: 1.5; +} +code { + font-family: monospace; + font-size: 100%; +} diff --git a/themes/zmin/static/css/style.css b/themes/zmin/static/css/style.css new file mode 100644 index 0000000..2854375 --- /dev/null +++ b/themes/zmin/static/css/style.css @@ -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; } diff --git a/themes/zmin/theme.toml b/themes/zmin/theme.toml new file mode 100644 index 0000000..b0ca344 --- /dev/null +++ b/themes/zmin/theme.toml @@ -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"