From 909c3caa9717faa009c85e815309d129228bcd71 Mon Sep 17 00:00:00 2001 From: iGor milhit Date: Wed, 31 Jul 2019 18:43:51 +0200 Subject: [PATCH] style: add minimal stylesheet rules * NEW Adds CSS rules. * BETTER Improves very slighlty some layout templates. * FIX Fixes a missing code label. Co-Authored-by: Igor Milhit --- layouts/_default/list.html | 15 ++-- layouts/_default/section.html | 26 +++--- layouts/_default/single.html | 12 +-- layouts/index.html | 2 +- layouts/partials/footer.html | 7 +- layouts/partials/header.html | 12 ++- layouts/partials/perso.html | 2 +- static/style.css | 151 ++++++++++++++++++++++++++++++++-- 8 files changed, 189 insertions(+), 38 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 4c5c352..88e7eb2 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,19 +1,18 @@ {{ define "main" }} -
-
+

{{.Title}}

{{.Content}} -
- +
{{ end }} diff --git a/layouts/_default/section.html b/layouts/_default/section.html index 6824feb..e8bc046 100644 --- a/layouts/_default/section.html +++ b/layouts/_default/section.html @@ -1,16 +1,20 @@ {{ define "main" }} -
- {{ .Content }} - - {{/* {{ partial "pagination.html" . }} */}} + + {{ end }} +
{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index e5de733..3ae5fc9 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,30 +1,32 @@ {{ define "main" }} -
-
+
+

{{ .Title }}

{{ .Content }}
-
+ {{ end }} diff --git a/layouts/index.html b/layouts/index.html index a036d96..d95f905 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,5 +1,5 @@ {{ define "main" }} -
+
{{if not .Site.Params.contactsPriv.hide }} {{ partial "perso" .}} {{ end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index c80889c..bbf14e3 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,6 +1,9 @@ diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 40bdece..b2a603d 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,4 +1,12 @@
- {{ .Site.Title }} - Blog +
+
+ + +

{{ .Site.Title }}

+
+ +
diff --git a/layouts/partials/perso.html b/layouts/partials/perso.html index 7c54483..6cdebcb 100644 --- a/layouts/partials/perso.html +++ b/layouts/partials/perso.html @@ -21,7 +21,7 @@ {{ end }} {{ with .Site.Params.contactsPriv.fingerprint }}
Empreinte
-
{{ . }}
+
{{ . }}
{{ end }} {{ with .Site.Params.contactsPriv.xmpp }}
XMPP/jabber
diff --git a/static/style.css b/static/style.css index dc54096..05a81ed 100644 --- a/static/style.css +++ b/static/style.css @@ -1,7 +1,100 @@ -main { - max-width: 35rem; /* 960px */ +/* + * ************** * + * FONTS * + * ************** * +*/ + +html, body { + font-size: 1.25rem; } +/* + * ************** * + * LAYOUT * + * ************** * +*/ + +.container { + max-width: 35rem; /* 960px */ + margin: 0 auto; +} + +body { + display: flex; + flex-direction: column; + height: 100vh; +} + +main { + flex-grow: 1; +} + +/* + * ************** * + * HEADER * + * ************** * +*/ + +.main-header { + margin-bottom: 2em; +} + +.main-header section { + display: flex; + align-items: center; + border-bottom: solid .1em #e1e1e1; + padding-bottom: 1em; +} + +.main-header header { + flex-grow: 1; +} + +.title { + display: flex; + align-items: center; +} + +.avatar { + border-radius: 50%; + width: 5rem; + margin-right: 1rem; +} + +nav { + margin-right: .5em; +} + +/* + * ************** * + * FOOTER * + * ************** * +*/ + +.main-footer ul { + display: flex; + align-items: center; + justify-content: flex-end; + border-top: solid .1em #e1e1e1; + padding-top: 1em; + margin-bottom: 1em; +} + +.main-footer li { + list-style: none; + margin-right: .5em; +} + +.smallcaps { + font-variant: small-caps; +} + +/* + * ************** * + * MAIN * + * ************** * +*/ + dl { display: inline-flex; flex-flow: row; @@ -11,15 +104,57 @@ dl { } dt { - flex: 0 0 25%; - text-overflow: ellipsis; - overflow: hidden; + flex: 0 0 39%; + word-wrap: anywhere; +} + +dt::after { + content: " :"; } dd { - flex:0 0 75%; + flex:0 0 59%; margin-left: auto; text-align: left; - text-overflow: ellipsis; - overflow: hidden; +} + +.contents { + padding: 0; +} + +.contents li { + list-style: none; +} + +/* + * ************** * + * POST * + * ************** * +*/ + +.post-header { + margin: 1em 0 1em 0; +} + +.post-header h1 { + margin: 0; +} + +.post-info { + font-size: 1rem; + display: flex; + flex-wrap: wrap; + padding: 0; + margin-top: 0; +} + +.post-info li { + list-style: none; + display: flex; + padding-right: .5em; +} + +.post-info li > ul { + display: flex; + padding: 0; }