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@posteo.org>2020-12-18 19:59:55 +0300
committerNiklas Buschmann <niklasbuschmann@posteo.org>2020-12-18 19:59:55 +0300
commitc4e97028fbee087ec1675e6d88c7282c1e38bd3a (patch)
tree7b347fff45994d4a8af15bed882e2f428468ff05
parentd7abc3b8c5cb01e7939cd1f826ea5b6db52ad064 (diff)
merge upstream
-rw-r--r--layouts/_default/baseof.html2
-rw-r--r--static/css/index.css50
-rw-r--r--static/css/minimal.css158
3 files changed, 182 insertions, 28 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 11cb2d8..b0636f4 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -7,7 +7,7 @@
<meta name="description" content="{{ .Description | default .Site.Params.description }}">
{{- end }}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<link rel="stylesheet" href="{{ .Site.BaseURL }}css/index.css">
+<link rel="stylesheet" href="{{ .Site.BaseURL }}css/{{ if .Site.Params.minimal }}minimal.css{{else}}index.css{{ end }}">
<link rel="canonical" href="{{ .Permalink }}">
<link rel="alternate" type="application/rss+xml" href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}" title="{{ .Site.Title }}">
{{- if or .Params.math .Site.Params.math }}
diff --git a/static/css/index.css b/static/css/index.css
index abcb169..8f9ae52 100644
--- a/static/css/index.css
+++ b/static/css/index.css
@@ -1,16 +1,14 @@
-@media (min-width: 50em) {
- @font-face {
- font-family: 'PT Sans';
- src: local("PT Sans"), local("PTSans-Regular"), url("../fonts/PTSans-Regular.woff") format("woff");
- font-weight: normal;
- font-style: normal;
- }
- @font-face {
- font-family: 'PT Sans';
- src: local("PT Sans Bold"), local("PTSans-Bold"), url("../fonts/PTSans-Bold.woff") format("woff");
- font-weight: bold;
- font-style: normal;
- }
+@font-face {
+ font-family: 'PT Sans';
+ src: local("PT Sans"), local("PTSans-Regular"), url("../fonts/PTSans-Regular.woff") format("woff");
+ font-weight: normal;
+ font-style: normal;
+}
+@font-face {
+ font-family: 'PT Sans';
+ src: local("PT Sans Bold"), local("PTSans-Bold"), url("../fonts/PTSans-Bold.woff") format("woff");
+ font-weight: bold;
+ font-style: normal;
}
html {
@@ -34,6 +32,16 @@ body {
-moz-osx-font-smoothing: grayscale;
}
+@media (prefers-color-scheme: dark) {
+ html {
+ background: #17181c;
+ }
+ body {
+ background: #1c1d22;
+ color: #ffffff;
+ }
+}
+
b, strong, th {
font-weight: 600;
}
@@ -146,19 +154,7 @@ nav a {
margin: .5em .8em;
}
-body > header, body > article, body > footer {
+body > header, body > article {
padding: 1.65em calc(20% - 4em);
-}
-
-@media (max-width: 36em) {
- body > header, body > article, body > footer {
- padding: 1.5em;
- }
-}
-
-@media (prefers-color-scheme: dark) {
- html, body, body > header, body > footer {
- background: #1c1d22;
- color: #ffffff;
- }
+ padding: 1.65em max(calc(20% - 4em), 1.5em);
}
diff --git a/static/css/minimal.css b/static/css/minimal.css
new file mode 100644
index 0000000..af73cbb
--- /dev/null
+++ b/static/css/minimal.css
@@ -0,0 +1,158 @@
+@font-face {
+ font-family: 'PT Sans';
+ src: local("PT Sans"), local("PTSans-Regular"), url("../fonts/PTSans-Regular.woff") format("woff");
+ font-weight: normal;
+ font-style: normal;
+}
+@font-face {
+ font-family: 'PT Sans';
+ src: local("PT Sans Bold"), local("PTSans-Bold"), url("../fonts/PTSans-Bold.woff") format("woff");
+ font-weight: bold;
+ font-style: normal;
+}
+
+html {
+ font-size: 16px;
+ font-size: calc(0.8rem + 0.3vw);
+}
+
+body {
+ font-family: "PT Sans", -apple-system, "Helvetica Neue", "Segoe UI", "Roboto", sans-serif;
+ font-weight: 400;
+ background: #ffffff;
+ color: #1c1d22;
+ margin: 0;
+ line-height: 1.6;
+ min-height: 100vh;
+ -webkit-text-size-adjust: 100%;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+
+@media (prefers-color-scheme: dark) {
+ body {
+ background: #1c1d22;
+ color: #ffffff;
+ }
+}
+
+b, strong, th {
+ font-weight: 600;
+}
+
+a {
+ color: inherit;
+ text-decoration: inherit;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+article a {
+ color: #68f;
+}
+
+header time {
+ color: #8e8e91;
+}
+
+hr {
+ border: 1px solid rgba(142, 142, 145, 0.3);
+ margin: 2em 0;
+}
+
+blockquote {
+ background: rgba(142, 142, 145, 0.06);
+ border-left: 3px solid rgba(142, 142, 145, 0.9);
+ padding: 1px 1.5em;
+ opacity: .75;
+}
+
+blockquote, figure {
+ margin: 1em 0;
+}
+
+img, li {
+ margin: .5em 0;
+}
+
+img {
+ border-radius: 2px;
+ max-width: 100%;
+ height: auto;
+}
+
+table {
+ width: 100%;
+ border-spacing: 1px;
+ box-shadow: 0 0 0 1px rgba(142, 142, 145, 0.12) inset;
+}
+
+th, td {
+ padding: .5em 1em;
+ box-shadow: 0 0 0 1px rgba(142, 142, 145, 0.12);
+}
+
+tr:hover, tr:nth-child(odd) td {
+ background: rgba(142, 142, 145, 0.04);
+}
+
+pre {
+ background: rgba(40, 41, 48, 0.9)!important;
+ color: #ffffff;
+ border-radius: 2px;
+ font-size: .8em;
+ margin: 1.5em 0;
+ padding: .8em 1.2em;
+ overflow-x: auto;
+}
+
+:not(pre) > code {
+ font-size: .9em;
+ background: rgba(142, 142, 145, 0.15);
+ opacity: .7;
+ border-radius: 2px;
+ margin: 0 .1em;
+ padding: .2em .4em;
+}
+
+body > header {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ align-items: center;
+ box-shadow: 0 0 0.6em rgba(28, 29, 34, 0.05);
+ border-bottom: 1px solid rgba(142, 142, 145, 0.16);
+}
+
+body > header > a {
+ font-size: 1.4em;
+}
+
+article header {
+ margin-bottom: 1.5em;
+}
+
+article header h1 {
+ font-size: 1.8em;
+ margin: 0 0 .1em;
+}
+
+nav {
+ margin: .5em -.8em;
+}
+
+nav a {
+ margin: .5em .8em;
+}
+
+body > header, body > article {
+ padding: 1.5em;
+}
+
+@media (min-width: 32em) {
+ body > header, body > article {
+ padding: 1.7em calc(38% - 12em);
+ }
+}