From a837b232717e170ffcf2361ea0c7a8c745ca3b53 Mon Sep 17 00:00:00 2001 From: David Kerkeslager Date: Fri, 14 Jan 2022 14:02:09 -0500 Subject: [PATCH] Add some text and styling --- txt_house/templates/base.html | 34 +++++++++++++++++++-- txt_house/templates/clipboard.svg | 1 + txt_house/templates/edit.html | 48 ++++++++++++++++-------------- txt_house/templates/text_file.html | 2 +- 4 files changed, 59 insertions(+), 26 deletions(-) create mode 100644 txt_house/templates/clipboard.svg diff --git a/txt_house/templates/base.html b/txt_house/templates/base.html index a9fb172..547aeef 100644 --- a/txt_house/templates/base.html +++ b/txt_house/templates/base.html @@ -31,12 +31,26 @@ max-width: 40rem; } + @media only screen and (max-width: 30rem) { + body { + margin: 0 2rem; + width: calc(100% - 4rem); + } + } + + @media only screen and (max-width: 20rem) { + body { + margin: 0 1rem; + width: calc(100% - 2rem); + } + } + nav { display: flex; flex-direction: row; align-items: center; - width: 40rem; + width: 100%; height: 5rem; } @@ -51,6 +65,10 @@ color: black; } + nav a:hover { + text-decoration-thickness: 2px; + } + nav label { margin-right: 0.2rem; } @@ -70,7 +88,19 @@ align-items: center; } - form.editor span { + nav + form.editor { + margin-top: 2.2rem; + } + + form.editor div.edit-key-area { + width: 100%; + display: flex; + flex-direction: column; + align-items: center; + margin-bottom: 3.6rem; + } + + form.editor span.field { display: flex; flex-direction: row; align-items: center; diff --git a/txt_house/templates/clipboard.svg b/txt_house/templates/clipboard.svg new file mode 100644 index 0000000..5d17a01 --- /dev/null +++ b/txt_house/templates/clipboard.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/txt_house/templates/edit.html b/txt_house/templates/edit.html index ba59df2..7e22641 100644 --- a/txt_house/templates/edit.html +++ b/txt_house/templates/edit.html @@ -2,16 +2,13 @@ {% block body %} - - -{% if edit_key %} - - - {{ edit_key }} - - Save this key in order to edit this file in the future. -{% endif %} +
{% csrf_token %} - {% if edit_key %} - - {% else %} - - - - - - {% if incorrect_key %} - You must enter the correct edit key to save your changes. +
+ {% if edit_key %} + + + {{ edit_key }} + + Save this key in order to edit this file in the future. + + {% else %} + + + + + + {% if incorrect_key %} + You must enter the correct edit key to save your changes. + {% endif %} {% endif %} - {% endif %} +
+
diff --git a/txt_house/templates/text_file.html b/txt_house/templates/text_file.html index 6961756..ece1423 100644 --- a/txt_house/templates/text_file.html +++ b/txt_house/templates/text_file.html @@ -19,7 +19,7 @@ } main { - max-width: 40rem; + width: 100%; white-space: pre-wrap; margin: 0 0 3rem; } -- 2.20.1