From 8860c4f26cc35ec57fa3d43b02387eb492cf2acc Mon Sep 17 00:00:00 2001 From: Yanislav Igonin Date: Wed, 8 Sep 2021 22:34:10 +0300 Subject: [PATCH] feat: remove edges from form, add gutters between form elements, move form to templates --- static/post-form.css | 3 +++ templates/index.html | 6 +----- templates/templates.html | 14 ++++++++++++++ templates/thread.html | 6 +----- 4 files changed, 19 insertions(+), 10 deletions(-) create mode 100644 static/post-form.css diff --git a/static/post-form.css b/static/post-form.css new file mode 100644 index 0000000..1222f54 --- /dev/null +++ b/static/post-form.css @@ -0,0 +1,3 @@ +#postForm > * { + margin-bottom: 1rem; +} \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index e62fdf2..fffd9ad 100644 --- a/templates/index.html +++ b/templates/index.html @@ -13,11 +13,7 @@

Welcome to Micrach

-
- - - -
+ {{ template "post-form" }}
{{range $Post := .}} diff --git a/templates/templates.html b/templates/templates.html index 5fdfc33..982b53b 100644 --- a/templates/templates.html +++ b/templates/templates.html @@ -11,6 +11,10 @@ crossorigin="anonymous"> + {{ end }} {{ define "meta" }} @@ -57,4 +61,14 @@ +{{ end }} + +{{ define "post-form" }} +
+
+ + + +
+
{{ end }} \ No newline at end of file diff --git a/templates/thread.html b/templates/thread.html index bee29de..f143b74 100644 --- a/templates/thread.html +++ b/templates/thread.html @@ -10,11 +10,7 @@

Welcome to Micrach

-
- - - -
+ {{ template "post-form" $FirstPost.ID }}
{{range $Post := .}}