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

github.com/LukasJoswiak/etch.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Joswiak <lukas@lukasjoswiak.com>2020-06-02 02:47:17 +0300
committerLukas Joswiak <lukas@lukasjoswiak.com>2020-06-02 02:47:17 +0300
commit229986d1fc6e08348aa47576b41eb0f9e8bd8b31 (patch)
tree8bd15456d068add833858b4335b569c53622dd68
parent7af665757d254cea59e7db9f80c3dcb58d179806 (diff)
Move CSS to external stylesheet
-rw-r--r--assets/css/dark.css (renamed from layouts/partials/css/dark.css)0
-rw-r--r--assets/css/main.css (renamed from layouts/partials/css/main.css)45
-rw-r--r--assets/css/min770px.css (renamed from layouts/partials/css/min770px.css)0
-rw-r--r--layouts/partials/head.html22
4 files changed, 55 insertions, 12 deletions
diff --git a/layouts/partials/css/dark.css b/assets/css/dark.css
index 5c71e9c..5c71e9c 100644
--- a/layouts/partials/css/dark.css
+++ b/assets/css/dark.css
diff --git a/layouts/partials/css/main.css b/assets/css/main.css
index cb22968..ff53c25 100644
--- a/layouts/partials/css/main.css
+++ b/assets/css/main.css
@@ -142,6 +142,51 @@ main#content header#post-header time {
color: #767676;
}
+main#content #toc {
+ border: 1px solid #b1b1b1;
+ border-radius: 1px;
+ line-height: 26px;
+ margin: 16px 0;
+ padding: 9px 14px;
+}
+
+main#content #toc h4 {
+ font-size: 1.06em;
+ color: #3d3d3d;
+ margin: 0;
+}
+
+main#content #toc nav#TableOfContents {
+ margin-top: 4px;
+}
+
+main#content #toc nav#TableOfContents > ul, main#content #toc nav#TableOfContents > ol {
+ margin-left: -40px;
+}
+
+main#content #toc ul, main#content #toc ol {
+ font-size: 0.98em;
+ margin: 0;
+ padding: 0 0 0 40px;
+}
+
+main#content #toc ul {
+ list-style-type: none;
+}
+
+main#content #toc ol {
+ counter-reset: item;
+}
+
+main#content #toc ol li {
+ display: block;
+}
+
+main#content #toc ol li:before {
+ content: counters(item, ".") ". ";
+ counter-increment: item;
+}
+
main#content img {
max-width: 100%;
margin: 0 auto;
diff --git a/layouts/partials/css/min770px.css b/assets/css/min770px.css
index 32f0747..32f0747 100644
--- a/layouts/partials/css/min770px.css
+++ b/assets/css/min770px.css
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index fa82f81..5fa3a6a 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -9,25 +9,23 @@
{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
- <style type="text/css" media="screen">
- {{ partial "css/main.css" . | safeCSS }}
- </style>
+ {{ $resources := slice -}}
+
+ {{ $resources = $resources | append (resources.Get "css/main.css") -}}
+
+ {{ $resources = $resources | append (resources.Get "css/min770px.css") -}}
{{ $dark := .Site.Params.dark | default "auto" -}}
{{ if not (eq $dark "off") -}}
- <style type="text/css" media="screen">
- {{ partial "css/dark.css" . | safeCSS }}
- </style>
+ {{ $resources = $resources | append (resources.Get "css/dark.css" | resources.ExecuteAsTemplate "dark.css" .) -}}
{{ end -}}
- <style type="text/css" media="(min-width: 770px)">
- {{ partial "css/min770px.css" . | safeCSS }}
- </style>
-
{{ if .Site.Params.highlight -}}
- {{ $syntax := resources.Get "css/syntax.css" | minify -}}
- {{ printf `<link rel="stylesheet" href="%s">` $syntax.Permalink | safeHTML }}
+ {{ $resources = $resources | append (resources.Get "css/syntax.css") -}}
{{ end -}}
+ {{ $css := $resources | resources.Concat "css/style.css" | minify }}
+ {{ printf `<link rel="stylesheet" href="%s">` $css.RelPermalink | safeHTML }}
+
<title>{{ .Title }}</title>
</head>