From f5bb2765a7f7761e4093d5d45988dac8a3698cc2 Mon Sep 17 00:00:00 2001 From: Reid 'arrdem' McKenzie Date: Sat, 8 Jul 2023 22:10:40 -0600 Subject: [PATCH] Feat: improve responsive behavior w/ icons --- .../python/tentacles/static/css/style.scss | 45 ++++++++++++++-- .../src/python/tentacles/static/delete.svg | 47 +++++++++++++++++ .../src/python/tentacles/static/download.svg | 52 +++++++++++++++++++ .../src/python/tentacles/static/print.svg | 43 +++++++++++++++ .../tentacles/templates/files_list.html.j2 | 21 +++++--- .../tentacles/templates/jobs_history.html.j2 | 6 +-- .../tentacles/templates/jobs_list.html.j2 | 6 +-- .../python/tentacles/templates/macros.html.j2 | 10 ++-- 8 files changed, 209 insertions(+), 21 deletions(-) create mode 100644 projects/tentacles/src/python/tentacles/static/delete.svg create mode 100644 projects/tentacles/src/python/tentacles/static/download.svg create mode 100644 projects/tentacles/src/python/tentacles/static/print.svg diff --git a/projects/tentacles/src/python/tentacles/static/css/style.scss b/projects/tentacles/src/python/tentacles/static/css/style.scss index 1055d33..16ae715 100644 --- a/projects/tentacles/src/python/tentacles/static/css/style.scss +++ b/projects/tentacles/src/python/tentacles/static/css/style.scss @@ -66,7 +66,17 @@ label { flex-wrap: wrap; } -@media (max-width: 760px) { +.u-flex-break { + flex-basis: 100%; +} + +.u-overflow-elipsis { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +@media (max-width: 550px) { .file, .printer, .key, .job { flex-direction: column; margin-bottom: 10px; @@ -79,8 +89,8 @@ label { } .row.webcams { - display: flex; - justify-content: space-between; + display: flex; + justify-content: space-between; img { border-radius: 10px; @@ -100,3 +110,32 @@ label { input[type='text'], input[type='password'], select { width: 100%; } + +input[type="image"] { + height: 38px; + padding: 0 30px; + color: #555; + text-align: center; + font-size: 11px; + font-weight: 600; + line-height: 38px; + letter-spacing: .1rem; + text-transform: uppercase; + text-decoration: none; + white-space: nowrap; + background-color: transparent; + border-radius: 4px; + // border: 1px solid #bbb; + cursor: pointer; + // box-sizing: border-box; +} + +.row.bubble { + border-radius: 4px; + border: 1px solid $black; +} + +.u-mv-auto { + margin-top: auto; + margin-bottom: auto; +} diff --git a/projects/tentacles/src/python/tentacles/static/delete.svg b/projects/tentacles/src/python/tentacles/static/delete.svg new file mode 100644 index 0000000..49a2421 --- /dev/null +++ b/projects/tentacles/src/python/tentacles/static/delete.svg @@ -0,0 +1,47 @@ + + + + + Basic_UI1_32px_2px_Solid + + + + diff --git a/projects/tentacles/src/python/tentacles/static/download.svg b/projects/tentacles/src/python/tentacles/static/download.svg new file mode 100644 index 0000000..0025c1c --- /dev/null +++ b/projects/tentacles/src/python/tentacles/static/download.svg @@ -0,0 +1,52 @@ + + + + + + + + + diff --git a/projects/tentacles/src/python/tentacles/static/print.svg b/projects/tentacles/src/python/tentacles/static/print.svg new file mode 100644 index 0000000..72bc456 --- /dev/null +++ b/projects/tentacles/src/python/tentacles/static/print.svg @@ -0,0 +1,43 @@ + + diff --git a/projects/tentacles/src/python/tentacles/templates/files_list.html.j2 b/projects/tentacles/src/python/tentacles/templates/files_list.html.j2 index 88f0085..772728c 100644 --- a/projects/tentacles/src/python/tentacles/templates/files_list.html.j2 +++ b/projects/tentacles/src/python/tentacles/templates/files_list.html.j2 @@ -4,14 +4,21 @@ {% if files %} {% for file in files %}
-
- {{ file.filename }} +
+
+ + {{ file.filename }} +
+
+ + {{ file.print_successes }} +
+
+ + {{ file.print_failures }} +
-
- {{ file.print_successes }} - {{ file.print_failures }} -
-
+
{{ macros.start_job(file.id) }} {{ macros.download_file(file.id) }} {{ macros.delete_file(file.id) }} diff --git a/projects/tentacles/src/python/tentacles/templates/jobs_history.html.j2 b/projects/tentacles/src/python/tentacles/templates/jobs_history.html.j2 index b12a713..d270691 100644 --- a/projects/tentacles/src/python/tentacles/templates/jobs_history.html.j2 +++ b/projects/tentacles/src/python/tentacles/templates/jobs_history.html.j2 @@ -4,8 +4,8 @@ {% if jobs %} {% for job in jobs %}
-
-
+
+
{{ctx.db.fetch_file(ctx.uid, job.file_id).filename or "it's a secret"}}
@@ -28,7 +28,7 @@
-
+
{% if ctx.uid %} {{ macros.duplicate_job(job.id) }} {{ macros.delete_job(job.id) }} diff --git a/projects/tentacles/src/python/tentacles/templates/jobs_list.html.j2 b/projects/tentacles/src/python/tentacles/templates/jobs_list.html.j2 index 058f1bd..b9e543a 100644 --- a/projects/tentacles/src/python/tentacles/templates/jobs_list.html.j2 +++ b/projects/tentacles/src/python/tentacles/templates/jobs_list.html.j2 @@ -4,8 +4,8 @@ {% if jobs %} {% for job in jobs %}
-
-
+
+
{{ctx.db.fetch_file(ctx.uid, job.file_id).filename or "it's a secret"}}
@@ -37,7 +37,7 @@
-
+
{% if ctx.uid %} {{ macros.duplicate_job(job.id) }} {{ macros.cancel_job(job.id) }} diff --git a/projects/tentacles/src/python/tentacles/templates/macros.html.j2 b/projects/tentacles/src/python/tentacles/templates/macros.html.j2 index f6eafc1..c7b4c3e 100644 --- a/projects/tentacles/src/python/tentacles/templates/macros.html.j2 +++ b/projects/tentacles/src/python/tentacles/templates/macros.html.j2 @@ -4,7 +4,7 @@
- +
{% endmacro %} @@ -12,7 +12,7 @@
- +
{% endmacro %} @@ -28,7 +28,7 @@
- +
{% endmacro %} @@ -54,7 +54,7 @@
- +
{% endmacro %} @@ -62,7 +62,7 @@
- +
{% endmacro %}