From 3c3cbaf9b25d6bbed49ab7b46b241c9cb202e25c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Sun, 16 Jan 2022 18:53:18 +0100 Subject: [PATCH] [ui] workable search display --- .../components/display/UpObjectCard.svelte | 17 +++++-- webui/src/views/Search.svelte | 49 +++++++++++++------ 2 files changed, 48 insertions(+), 18 deletions(-) diff --git a/webui/src/components/display/UpObjectCard.svelte b/webui/src/components/display/UpObjectCard.svelte index 16bb3ae..15ee7c5 100644 --- a/webui/src/components/display/UpObjectCard.svelte +++ b/webui/src/components/display/UpObjectCard.svelte @@ -52,11 +52,13 @@ border: 0.12em solid var(--foreground); border-radius: 0.2em; - padding: 0.5em; font-family: var(--monospace-font); line-break: anywhere; + width: var(--width); + height: var(--height); + &.identified { font-family: var(--default-font); font-size: 0.95em; @@ -64,11 +66,20 @@ } :global(.main) { + text-decoration: none; + + height: 100%; display: flex; flex-direction: column; align-items: center; + justify-content: center; - text-decoration: none; + margin: 0 .5em; + } + + :global(.main > *){ + min-width: 0; + max-width: 100%; } } @@ -83,7 +94,7 @@ .note { margin: 0; - font-size: .66em; + font-size: 0.66em; } } diff --git a/webui/src/views/Search.svelte b/webui/src/views/Search.svelte index f8157cf..2e79d74 100644 --- a/webui/src/views/Search.svelte +++ b/webui/src/views/Search.svelte @@ -48,7 +48,7 @@
{#if !$error} {#if $result} -
+

Exact

{#if exact.length} exakt @@ -56,23 +56,24 @@ Create? {/if}
- {#await objects} -
-

Objects

+ +
+

Objects

+ {#await objects} -
- {:then objects} -
-

Objects

+ {:then objects}
    {#each objects as address} -
  • +
  • + +
  • {/each}
-
- {/await} + {/await} +
+ {#if entries.length} -
+

Raw results

    {#each entries as entry} @@ -106,9 +107,27 @@ padding: 0; } - li { - margin: 1em auto; - max-width: 66em; + .objects { + ul { + display: grid; + grid-template-columns: repeat(4, 1fr); + gap: 1rem; + justify-items: center; + + margin: 0 1rem; + } + + li { + width: 14rem; + height: 8rem; + } + } + + .raw { + li { + margin: 1em auto; + max-width: 66em; + } } .global {