From 588bf59b88e36ff9cd2ebb9c8489f413e8801885 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 21 Oct 2018 18:46:27 -0700 Subject: [PATCH] Variety of html, css, jinja tweaks. - common.css, removed html and body margins so that using full height #content_body will not create a scrollbar. Simplifies the "fill remaining space" construct I use a lot. Added more css variables, I'm thinking about future theming. - photo_card.css, slightly heightened to improve name clipping. - clipboard.html, added a small screen mode. - login.html, centered the boxes and fixed message area being too small due to a previous change. - search.html, simplified some conditional texts. --- .../etiquette_flask/static/css/common.css | 40 ++++++++- .../etiquette_flask/static/css/photo_card.css | 15 ++-- .../etiquette_flask/templates/album.html | 11 ++- .../etiquette_flask/templates/clipboard.html | 73 +++++++++++---- .../etiquette_flask/templates/login.html | 11 +-- .../etiquette_flask/templates/photo.html | 59 +++++------- .../etiquette_flask/templates/search.html | 89 +++++++++---------- frontends/etiquette_flask/templates/tags.html | 19 ++-- 8 files changed, 184 insertions(+), 133 deletions(-) diff --git a/frontends/etiquette_flask/static/css/common.css b/frontends/etiquette_flask/static/css/common.css index b677c2c..7e90be7 100644 --- a/frontends/etiquette_flask/static/css/common.css +++ b/frontends/etiquette_flask/static/css/common.css @@ -17,10 +17,34 @@ Organization: --color_site_secondary: #ffffd4; --color_site_transparency: rgba(0, 0, 0, 0.1); --color_site_dropshadow: rgba(0, 0, 0, 0.25); + --color_text_normal: black; + --color_text_link: blue; + --color_text_placeholder: gray; --color_3d_shadow: rgba(0, 0, 0, 0.5); --color_3d_highlight: rgba(255, 255, 255, 0.5); } +html +{ + height: 100vh; +} + +body +{ + height: 100%; + margin: 0; +} + +* { color: var(--color_text_normal); } +a { color: var(--color_text_link); } + +input::placeholder +{ + color: var(--color_text_placeholder); + opacity: 1; +} + + body { display: grid; @@ -31,6 +55,7 @@ body background-color: var(--color_site_theme); } + #header { grid-area: header; @@ -38,7 +63,7 @@ body grid-template-columns: 1fr 1fr 1fr 1fr auto; grid-template-rows: auto; - margin-bottom: 4px; + margin: 8px; background-color: var(--color_site_transparency); } @@ -46,11 +71,16 @@ body { grid-area: content_body; display: grid; + grid-auto-rows: min-content; + + margin: 8px; + margin-top: 0; } #header button { border: 0; cursor: pointer; + background-color: transparent; } .header_element { @@ -79,6 +109,11 @@ pre display: none !important; } +button, +button * +{ + color: black; +} .gray_button { background-color: #cccccc; @@ -143,9 +178,12 @@ is hovered over. .tag_object { border-radius: 2px; + padding-left: 1px; + padding-right: 1px; background-color: #fff; + color: blue; font-size: 0.9em; text-decoration: none; font-family: monospace; diff --git a/frontends/etiquette_flask/static/css/photo_card.css b/frontends/etiquette_flask/static/css/photo_card.css index 95b52d6..4c8289c 100644 --- a/frontends/etiquette_flask/static/css/photo_card.css +++ b/frontends/etiquette_flask/static/css/photo_card.css @@ -27,15 +27,14 @@ position: relative; display: inline-grid; vertical-align: top; - grid-template-columns: auto auto; - grid-template-rows: auto 1fr auto; - grid-template-areas: - "thumbnail thumbnail" - "filename filename" - "tags metadata"; + grid-template: + "thumbnail thumbnail" auto + "filename filename" 1fr + "tags metadata" auto + /auto auto; min-width: 150px; max-width: 300px; - height: 200px; + height: 210px; padding: 8px; margin: 8px; @@ -75,7 +74,6 @@ justify-self: start; grid-area: filename; - z-index: 1; overflow: hidden; min-width: 100%; @@ -98,6 +96,7 @@ { overflow: visible; max-height: none; + z-index: 1; } .photo_card_tags { diff --git a/frontends/etiquette_flask/templates/album.html b/frontends/etiquette_flask/templates/album.html index 1765c78..2888b0e 100644 --- a/frontends/etiquette_flask/templates/album.html +++ b/frontends/etiquette_flask/templates/album.html @@ -94,6 +94,13 @@ li:hover .remove_child_button { display: initial; } + +#photo_list +{ + padding-left: 40px; + padding-top: 10px; + padding-bottom: 10px; +} @@ -188,11 +195,11 @@ li:hover .remove_child_button {% else %} Grid view {% endif %} - + {% endif %} diff --git a/frontends/etiquette_flask/templates/clipboard.html b/frontends/etiquette_flask/templates/clipboard.html index 4281193..a17e841 100644 --- a/frontends/etiquette_flask/templates/clipboard.html +++ b/frontends/etiquette_flask/templates/clipboard.html @@ -16,14 +16,12 @@ {{header.make_header(session=session)}} +
The clipboard contains 0 items. @@ -113,10 +153,8 @@ body
- -
@@ -126,6 +164,7 @@ body
+
diff --git a/frontends/etiquette_flask/templates/login.html b/frontends/etiquette_flask/templates/login.html index a84681a..293f394 100644 --- a/frontends/etiquette_flask/templates/login.html +++ b/frontends/etiquette_flask/templates/login.html @@ -21,15 +21,8 @@ button #content_body { - display: flex; - flex: 1 1 auto; - flex-direction: column; - justify-content: center; - align-items: center; - max-width: 900px; - margin-left: auto; - margin-right: auto; + margin: auto; } #login_register_box @@ -60,7 +53,7 @@ button #message_area { width: 100%; - max-height: 300px; + height: 150px; } @media screen and (max-width: 800px) { diff --git a/frontends/etiquette_flask/templates/photo.html b/frontends/etiquette_flask/templates/photo.html index 1808002..a6e3266 100644 --- a/frontends/etiquette_flask/templates/photo.html +++ b/frontends/etiquette_flask/templates/photo.html @@ -27,49 +27,43 @@ body flex-direction: row; } #left -{ - display: flex; - flex-direction: column; -} -#right -{ - display: flex; - flex: 1; -} -#editor_holder { display: flex; flex-direction: column; + min-height: min-content; max-width: 300px; /*padding: 8px;*/ + background-color: var(--color_site_transparency); +} +#right +{ + flex: 1; + display: flex; } #editor_area { - flex: 3; padding: 8px; - background-color: var(--color_site_transparency); - word-wrap: break-word; } -#message_area_bg +#refresh_metadata_button { - display: flex; - flex: 0 1 100%; - - height: 100%; - min-height: 30px; - padding: 8px; - - background-color: var(--color_site_transparency); + font-size: 11px; +} +#before_after_links +{ + width: max-content; + margin: auto; } #message_area { - flex: auto; + display: flex; + min-height: 30px; max-height: none; + margin: 8px; } .photo_viewer { @@ -112,10 +106,6 @@ body width: 100%; overflow: hidden; } -#refresh_metadata_button -{ - font-size: 11px; -} @media screen and (max-width: 800px) { #content_body @@ -141,13 +131,9 @@ body #right { flex: none; - height: calc(100% - 20px); - } - #editor_holder - { - display: flex; flex-direction: row; max-width: none; + height: calc(100% - 20px); } #message_area { @@ -164,7 +150,6 @@ body {{header.make_header(session=session)}}
-

Tags

@@ -224,17 +209,13 @@ body {% endif %} - -
-
-
-
-
+