Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/niklasbuschmann/contrast-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Buschmann <niklasbuschmann@users.noreply.github.com>2019-07-15 16:04:11 +0300
committerNiklas Buschmann <niklasbuschmann@users.noreply.github.com>2019-07-15 16:04:11 +0300
commit1aec57d9ff1fc6d9f02ac7a2517f06dfbca79f5f (patch)
tree77e2fcd17c834fee5af395e6a7e0a4ba27725c5d
init
-rw-r--r--.gitignore1
-rw-r--r--UNLICENSE.txt24
-rw-r--r--archetypes/default.md2
-rw-r--r--layouts/404.html10
-rw-r--r--layouts/_default/baseof.html28
-rw-r--r--layouts/_default/list.html15
-rw-r--r--layouts/_default/single.html11
-rw-r--r--static/css/index.css47
-rw-r--r--static/css/theme.css140
-rw-r--r--theme.toml12
10 files changed, 290 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..e43b0f9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.DS_Store
diff --git a/UNLICENSE.txt b/UNLICENSE.txt
new file mode 100644
index 0000000..cf1ab25
--- /dev/null
+++ b/UNLICENSE.txt
@@ -0,0 +1,24 @@
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+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 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.
+
+For more information, please refer to <http://unlicense.org>
diff --git a/archetypes/default.md b/archetypes/default.md
new file mode 100644
index 0000000..ac36e06
--- /dev/null
+++ b/archetypes/default.md
@@ -0,0 +1,2 @@
++++
++++
diff --git a/layouts/404.html b/layouts/404.html
new file mode 100644
index 0000000..97d0f52
--- /dev/null
+++ b/layouts/404.html
@@ -0,0 +1,10 @@
+{{ define "main" }}
+
+<article>
+ <header>
+ <h1>404: Page not found</h1>
+ </header>
+ <p>Sorry, this page doesn't exist :-(</p>
+</article>
+
+{{ end }} \ No newline at end of file
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
new file mode 100644
index 0000000..1ee0374
--- /dev/null
+++ b/layouts/_default/baseof.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html lang="{{ .Language.Lang | default "en" }}">
+<title>{{ if .Title }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title>
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<meta name="description" content="{{ .Description | default .Site.Params.description }}">
+<link rel="canonical" href="{{ .Permalink }}">
+<link rel="alternate" type="application/rss+xml" href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}" title="{{ .Site.Title }}">
+<link rel="stylesheet" href="/css/index.css">
+<link rel="stylesheet" href="/css/theme.css">
+{{- if or .Params.math .Site.Params.math }}
+<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.2/dist/katex.min.css" integrity="sha256-uT5rNa8r/qorzlARiO7fTBE7EWQiX/umLlXsq7zyQP8=" crossorigin="anonymous">
+<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.2/dist/katex.min.js" integrity="sha256-TxnaXkPUeemXTVhlS5tDIVg42AvnNAotNaQjjYKK9bc=" crossorigin="anonymous"></script>
+<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.2/dist/contrib/mathtex-script-type.min.js" integrity="sha256-b8diVEOgPDxUp0CuYCi7+lb5xIGcgrtIdrvE8d/oztQ=" crossorigin="anonymous"></script>
+{{- end }}
+
+<header>
+ <h1><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></h1>
+ <nav>
+ {{ range .Site.Menus.main }}
+ <a href="{{ .URL }}">{{ .Name }}</a>
+ {{ end }}
+ </nav>
+</header>
+
+{{- block "main" . }}{{- end }}
+
+</html>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
new file mode 100644
index 0000000..9775721
--- /dev/null
+++ b/layouts/_default/list.html
@@ -0,0 +1,15 @@
+{{ define "main" }}
+
+<article>
+ <header><h1>{{ .Title | default "Posts" }}</h1></header>
+ <ul class="archive">
+ {{- range where site.RegularPages "Type" "in" site.Params.mainSections }}
+ <li>
+ {{ if .Date }}<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time>{{ end }}
+ <a href="{{ .Permalink }}">{{ .Title }}</a>
+ </li>
+ {{- end }}
+ </ul>
+</article>
+
+{{ 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..4ff1edb
--- /dev/null
+++ b/layouts/_default/single.html
@@ -0,0 +1,11 @@
+{{ define "main" }}
+
+<article>
+ <header>
+ <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
+ {{ if .Date }}<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "January 02, 2006" }}</time>{{ end }}
+ </header>
+ {{ .Content }}
+</article>
+
+{{ end }} \ No newline at end of file
diff --git a/static/css/index.css b/static/css/index.css
new file mode 100644
index 0000000..daf5335
--- /dev/null
+++ b/static/css/index.css
@@ -0,0 +1,47 @@
+nav {
+ margin: .5em -.8em;
+}
+
+nav a {
+ padding: 0 .8em;
+}
+
+table {
+ width: 100%;
+}
+
+h1 {
+ font-size: 1.7em;
+}
+
+body > header h1 {
+ font-size: 1.6em;
+}
+
+header h1 {
+ margin: 0;
+}
+
+article header {
+ margin-bottom: 1.5em;
+}
+
+article header h1 {
+ font-size: 1.75em;
+ margin-bottom: .2em;
+}
+
+.archive li {
+ padding: .3em 0;
+}
+
+.archive a {
+ font-size: 1.1em;
+}
+
+.archive time {
+ display: inline-block;
+ font-size: 1.05em;
+ width: 6em;
+ margin: 0 .25em;
+}
diff --git a/static/css/theme.css b/static/css/theme.css
new file mode 100644
index 0000000..0107bc5
--- /dev/null
+++ b/static/css/theme.css
@@ -0,0 +1,140 @@
+body {
+ font-family: system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
+ font-size: 16px;
+ font-size: calc(0.8em + 0.25vw);
+ font-weight: 400;
+ line-height: 1.65;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+
+body, blockquote, figure {
+ margin: 0;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ font-weight: inherit;
+}
+
+b, strong, th {
+ font-weight: 500;
+}
+
+a {
+ color: inherit;
+ text-decoration: inherit;
+ transition: color .2s;
+}
+
+a:hover {
+ color: #949494;
+}
+
+article a {
+ color: #68f;
+}
+
+article header a, article footer a {
+ font-weight: inherit;
+ color: inherit;
+}
+
+header time {
+ color: #949494;
+}
+
+hr {
+ border: 1px solid rgba(148,148,148,0.3);
+ margin: 2em 0;
+}
+
+blockquote {
+ background: rgba(148,148,148,0.06);
+ border-left: 3px solid rgba(148,148,148,0.6);
+ padding: 1px 1.5em;
+}
+
+img {
+ border-radius: 2px;
+ max-width: 100%;
+ height: auto;
+ margin: .5em 0;
+}
+
+table {
+ border-spacing: 1px;
+ box-shadow: 0px 0px 0px 1px rgba(148,148,148,0.16) inset;
+}
+
+tr:hover, tr:nth-child(even) td {
+ background: rgba(148,148,148,0.06);
+}
+
+th {
+ background: rgba(148,148,148,0.1);
+ text-align: inherit;
+}
+
+th, td {
+ box-shadow: 0px 0px 0px 1px rgba(148,148,148,0.16);
+ padding: .5em 1em;
+}
+
+pre {
+ background: rgba(38,38,38,0.8);
+ color: #fff;
+ border-radius: 2px;
+ font-size: .8em;
+ margin: 1.5em 0;
+ padding: .8em 1.2em;
+ white-space: pre-wrap;
+}
+
+p code {
+ background: rgba(148,148,148,0.15);
+ opacity: .75;
+ border-radius: 2px;
+ font-size: .9em;
+ margin: 0 .1em;
+ padding: .2em .4em;
+}
+
+body > header, body > footer {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ align-items: center;
+}
+
+@media (prefers-color-scheme: light) {
+ html {
+ background: #fff;
+ color: #282828;
+ }
+}
+
+@media (prefers-color-scheme: dark) {
+ html {
+ background: #282828;
+ color: #fff;
+ }
+}
+
+body > header, article, body > footer {
+ padding: 1.5em calc(34% - 12rem);
+}
+
+@media (max-width: 40em) {
+ body > header, article, body > footer {
+ padding:1.5em 1em;
+ }
+}
+
+article, body > footer {
+ border-top: 1px solid rgba(148,148,148,0.12);
+}
+
+body > header {
+ background: #2b2b2b;
+ color: #fff;
+}
diff --git a/theme.toml b/theme.toml
new file mode 100644
index 0000000..5731321
--- /dev/null
+++ b/theme.toml
@@ -0,0 +1,12 @@
+name = "Contrast"
+license = "MIT"
+licenselink = "https://github.com/niklasbuschmann/contrast-hugo/blob/master/UNLICENSE.txt"
+description = "Minimalistic Hugo theme"
+homepage = "https://github.com/niklasbuschmann/contrast-hugo"
+tags = []
+features = []
+min_version = "0.41"
+
+[author]
+ name = "Niklas Buschmann"
+ homepage = "https://github.com/niklasbuschmann/"