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

github.com/yanlinlin82/simple-style.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinlin Yan <yanlinlin82@gmail.com>2022-04-04 14:13:33 +0300
committerLinlin Yan <yanlinlin82@gmail.com>2022-04-04 14:13:33 +0300
commit12f8ba78490a9172cbb5e09abfa7756cef552504 (patch)
treee53ece817dcd0ba45cb598f63e0ec52c4464143b
parent545214c582e6a7ffa88fa68bdb0ead1bff987730 (diff)
Move hard-coded styles to css file.
-rw-r--r--layouts/_default/single.html26
-rw-r--r--static/css/main.css2
2 files changed, 14 insertions, 14 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 0d29660..855237b 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -6,30 +6,28 @@
{{ end -}}
</div>
{{ if .Site.Params.EnableSearch -}}
-<div style="position: fixed; right:-30px; max-width:300px; overflow:auto; top: 1px; width: 300px; bottom:100px">
+<div class="search">
{{ partial "search.html" . }}
</div>
{{ end -}}
+{{ if .Date -}}
+<div class="meta">{{ .Date.Format (.Site.Params.dateFormat | default "2006-01-02 15:04") }}</div>
+{{ end -}}
+{{ $taxo := "tags" -}}
+{{ if .Param $taxo -}}
<div class="meta">
- {{ if .Date -}}
- <div>{{ .Date.Format (.Site.Params.dateFormat | default "2006-01-02 15:04") }}</div>
- {{ end -}}
- {{ $taxo := "tags" -}}
- {{ if .Param $taxo -}}
- <div>
- {{ range .Param $taxo -}}
- {{ $name := . -}}
- {{ with $.Site.GetPage (printf "/%s/%s" $taxo ($name | urlize)) -}}
- <span><a href="{{ .Permalink }}">#{{ $name }}</a></span>
- {{ end -}}
+ {{ range .Param $taxo -}}
+ {{ $name := . -}}
+ {{ with $.Site.GetPage (printf "/%s/%s" $taxo ($name | urlize)) -}}
+ <span><a href="{{ .Permalink }}">#{{ $name }}</a></span>
{{ end -}}
- </div>
{{ end -}}
</div>
+{{ end -}}
<div class="content">
{{ .Content -}}
</div>
-<div style="position: fixed; right:50px; max-width:255px; overflow:auto; top: 120px; width: 220px; bottom:90px">
+<div class="toc">
{{ partial "toc.html" . }}
</div>
{{ end -}}
diff --git a/static/css/main.css b/static/css/main.css
index 9d093c5..3100be9 100644
--- a/static/css/main.css
+++ b/static/css/main.css
@@ -35,3 +35,5 @@ svg:hover.permalink{color:#f00;fill:currentColor}
.content h5{padding:0;margin:10px 0 0}
.content h6{padding:0;margin:10px 0 0}
.content p{padding:0;margin:10px 0}
+.search{position:fixed; right:-30px; max-width:300px; overflow:auto; top: 1px; width: 300px; bottom:100px}
+.toc{position:fixed; right:50px; max-width:255px; overflow:auto; top: 120px; width: 220px; bottom:90px}