From 4ee2841896a371a4d5ef093ce24dc28fecbb77f7 Mon Sep 17 00:00:00 2001 From: Dan Konshin Date: Wed, 24 Jun 2020 18:32:59 +0500 Subject: [PATCH] DarkTheme edit page --- render.go | 10 +++---- .../default-dark/Hypha/edit/index.html/1.html | 26 +++---------------- .../Hypha/edit/sidebar.html/1.html | 19 ++++++++++++++ .../Hypha/edit/sidebar.html/meta.json | 19 ++++++++++++++ w/m/Templates/default-dark/main.css/1.css | 4 +-- 5 files changed, 48 insertions(+), 30 deletions(-) create mode 100644 w/m/Templates/default-dark/Hypha/edit/sidebar.html/1.html create mode 100644 w/m/Templates/default-dark/Hypha/edit/sidebar.html/meta.json diff --git a/render.go b/render.go index 822a9ce..85bdd3a 100644 --- a/render.go +++ b/render.go @@ -11,17 +11,17 @@ import ( // EditHyphaPage returns HTML page of hypha editor. func EditHyphaPage(name, textMime, content, tags string) string { - keys := map[string]string{ - "Title": fmt.Sprintf(cfg.TitleEditTemplate, name), - "Header": renderFromString(name, "Hypha/edit/header.html"), - "Sidebar": renderFromString("", "Hypha/edit/sidebar.html"), - } page := map[string]string{ "Text": content, "TextMime": textMime, "Name": name, "Tags": tags, } + keys := map[string]string{ + "Title": fmt.Sprintf(cfg.TitleEditTemplate, name), + "Header": renderFromString(name, "Hypha/edit/header.html"), + "Sidebar": renderFromMap(page, "Hypha/edit/sidebar.html"), + } return renderBase(renderFromMap(page, "Hypha/edit/index.html"), keys) } diff --git a/w/m/Templates/default-dark/Hypha/edit/index.html/1.html b/w/m/Templates/default-dark/Hypha/edit/index.html/1.html index 49ab078..842b43b 100644 --- a/w/m/Templates/default-dark/Hypha/edit/index.html/1.html +++ b/w/m/Templates/default-dark/Hypha/edit/index.html/1.html @@ -1,36 +1,16 @@ diff --git a/w/m/Templates/default-dark/Hypha/edit/sidebar.html/1.html b/w/m/Templates/default-dark/Hypha/edit/sidebar.html/1.html new file mode 100644 index 0000000..3f257cf --- /dev/null +++ b/w/m/Templates/default-dark/Hypha/edit/sidebar.html/1.html @@ -0,0 +1,19 @@ +

Text MIME-type

+

Good types are text/markdown and text/plain

+ + +

Revision comment

+

Please make your comment helpful

+ + +

Edit tags

+

Tags are separated by commas, whitespace is ignored

+ + +

Upload file

+

If this hypha has a file like that, the text above is meant to be a description of it

+ + + +

+
diff --git a/w/m/Templates/default-dark/Hypha/edit/sidebar.html/meta.json b/w/m/Templates/default-dark/Hypha/edit/sidebar.html/meta.json new file mode 100644 index 0000000..1fe3342 --- /dev/null +++ b/w/m/Templates/default-dark/Hypha/edit/sidebar.html/meta.json @@ -0,0 +1,19 @@ +{ + "views": 0, + "deleted": false, + "revisions": { + "1": { + "tags": [ + "" + ], + "name": "sidebar.html", + "comment": "Create Templates/default-dark/Hypha/edit/sidebar.html", + "author": "", + "time": 1593003792, + "text_mime": "text/html", + "binary_mime": "", + "text_name": "1.html", + "binary_name": "" + } + } +} diff --git a/w/m/Templates/default-dark/main.css/1.css b/w/m/Templates/default-dark/main.css/1.css index 400d02e..fcc208e 100644 --- a/w/m/Templates/default-dark/main.css/1.css +++ b/w/m/Templates/default-dark/main.css/1.css @@ -182,7 +182,7 @@ footer a, footer a:visited { position: fixed; top: 0; bottom: 0; - width: 274px; + min-width: 274px; right: 0; } @@ -192,7 +192,7 @@ footer a, footer a:visited { } .sidebar { - padding: 16px 0; + padding: 16px; border-radius: 1rem; background-color: rgba(255,255,255,.05); }