From bf8412969a60b5da29d622418e8a4efd9d444a12 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Tue, 16 Aug 2022 21:32:50 -0600 Subject: finish switching to classless, got a color scheme worked out too --- srv/src/http/static/mediocre.css | 69 +++++++++++++++++++ srv/src/http/tpl/base.html | 65 +++--------------- srv/src/http/tpl/edit-post.html | 141 +++++++++++++++++++++------------------ srv/src/http/tpl/post.html | 2 +- srv/src/http/tpl/posts.html | 36 ++++------ 5 files changed, 171 insertions(+), 142 deletions(-) create mode 100644 srv/src/http/static/mediocre.css (limited to 'srv/src/http') diff --git a/srv/src/http/static/mediocre.css b/srv/src/http/static/mediocre.css new file mode 100644 index 0000000..d6e2905 --- /dev/null +++ b/srv/src/http/static/mediocre.css @@ -0,0 +1,69 @@ + +:root { + +--m-red: #EE7F38; +--m-dark: #023B47; +--m-light: #fefcf3; +--m-blue: #295E52; + +--nc-tx-1: var(--m-dark); +--nc-tx-2: #000; + +--nc-bg-1: #FFF; +--nc-bg-2: var(--m-light); +--nc-bg-3: var(--m-dark); + +--nc-lk-1: var(--m-blue); +--nc-lk-2: var(--m-red); +--nc-lk-tx: #FFF; + +--nc-ac-1: var(--m-red); +--nc-ac-tx: var(--m-light); +} + +html { + font-family: Georgia, serif; + font-size: 1.3em; +} + +header { + background: var(--nc-bg-1); +} + +h1, h2, h3, h4, h5, h6, .button-primary, .button, header, footer { + font-family: var(--nc-font-sans); +} + +h1, h2, h3 { + border-bottom: 0; +} + +h1 a, +h2 a, +h3 a, +h4 a, +h5 a, +h6 a { + text-decoration: none; + color: var(--nc-tx-1); +} + +ul { + list-style: circle; +} + +hr { + margin: 2rem 0 2rem 0; + border-color: var(--nc-bg-3); + opacity: 25%; +} + +table td form, +table td input { + margin: 0; + width: 100%; +} + +table tr:nth-child(even) { + background-color: initial; +} diff --git a/srv/src/http/tpl/base.html b/srv/src/http/tpl/base.html index 7a31156..595ffe3 100644 --- a/srv/src/http/tpl/base.html +++ b/srv/src/http/tpl/base.html @@ -1,70 +1,27 @@ - + - - - - - +
- -

- Mediocre Blog - by - mediocregopher -  •  - Follow -  •  - RSS -

- + Mediocre Blog + by + mediocregopher +    //    + Follow +  /  + RSS +  /  + License: WTFPL
{{ template "body" . }} - - diff --git a/srv/src/http/tpl/edit-post.html b/srv/src/http/tpl/edit-post.html index 1a81df4..9a2f085 100644 --- a/srv/src/http/tpl/edit-post.html +++ b/srv/src/http/tpl/edit-post.html @@ -1,87 +1,96 @@ {{ define "body" }} -
+{{ if gt (len .Payload.Tags) 0 }} +

+ Existing tags: + + {{ range $i, $tag := .Payload.Tags }} + {{ if ne $i 0 }} {{ end }}{{ $tag }} + {{ end }} + +

+{{ end }} + + -
+ -
- +
+ + + + + + + + + + + + + - - -
- -
- +
+ + + -
- +
+ + + + +
+ Unique ID + {{ if eq .Payload.Post.ID "" }} - + {{ else }} - {{ .Payload.Post.ID }} - + {{ .Payload.Post.ID }} + {{ end }} - - -
- +
+

Tags (space separated)

+
-

- Existing tags: {{ range $i, $tag := .Payload.Tags }}{{ if ne $i 0 }} {{ end }}{{ $tag }}{{ end }} -

- - -
- + value="{{- range $i, $tag := .Payload.Post.Tags -}} + {{- if ne $i 0 }} {{ end }}{{ $tag -}} + {{- end -}} + "/> +
Series - +
Title - +
Description - - - - -
-
- -
-
- +
+ +

+ +

+ +

- + {{ if eq .Payload.Post.ID "" }} + + {{ else }} + + {{ end }} - + +

- - + {{ end }} {{ template "base.html" . }} diff --git a/srv/src/http/tpl/post.html b/srv/src/http/tpl/post.html index f0cb327..d4b24f4 100644 --- a/srv/src/http/tpl/post.html +++ b/srv/src/http/tpl/post.html @@ -12,7 +12,7 @@

- {{ .Payload.Description }} + - {{ .Payload.Description }}


diff --git a/srv/src/http/tpl/posts.html b/srv/src/http/tpl/posts.html index 885018d..7416ee6 100644 --- a/srv/src/http/tpl/posts.html +++ b/srv/src/http/tpl/posts.html @@ -1,36 +1,22 @@ -{{ define "posts-nextprev" }} - - {{ if or (ge .Payload.PrevPage 0) (ge .Payload.NextPage 0) }} -
- - {{ if ge .Payload.PrevPage 0 }} - Newer - {{ end }} - - {{ if ge .Payload.NextPage 0 }} - Older - {{ end }} - -
- {{ end }} - -{{ end }} - {{ define "body" }} -

+

- {{ template "posts-nextprev" . }} + {{ if ge .Payload.PrevPage 0 }} +

+ < < Previous Page +

+ {{ end }} - +
{{ range .Payload.Posts }} - +
{{ .PublishedAt }}{{ .PublishedAt.Local.Format "2006-01-02 15:04:05 MST" }} {{ .Title }} @@ -50,7 +36,11 @@
- {{ template "posts-nextprev" . }} + {{ if ge .Payload.NextPage 0 }} +

+ Next Page > > +

+ {{ end }} {{ end }} -- cgit v1.2.3