From 13849943826c4c4552c04a498e2416d20edef8f4 Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Thu, 1 Sep 2022 00:19:09 -0400 Subject: [PATCH] More colorful/responsive JSON display. --- src/lib/Todo.svelte | 3 +-- src/routes/+page.svelte | 44 ++++++++++++++++++++++++++++++----------- 2 files changed, 34 insertions(+), 13 deletions(-) diff --git a/src/lib/Todo.svelte b/src/lib/Todo.svelte index 3bb4d38..6c37070 100644 --- a/src/lib/Todo.svelte +++ b/src/lib/Todo.svelte @@ -1,6 +1,5 @@ {#if isDev} diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 78c12a9..603aefa 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -73,10 +73,10 @@ Push 'What is Kafka Dance?' down further, but come up with a visual indicator that there's more to read. Something like this, but better: -

Continue reading, below

+

Continue reading, below

What is Kafka Dance?

Kafka Dance is a simple, elegant way to interact with your Kafka servers.

@@ -87,21 +87,17 @@

Query data your way

Combine these into one display with a switch? -
-
+
+

Search your message history

{oneShotText}
-
+

Or monitor for new messages in real time

- {#if realTimeIndex % 2 === 0} -
{fakeJson[realTimeIndex]}
- {:else} -
{fakeJson[realTimeIndex]}
- {/if} +
{fakeJson[realTimeIndex]}
@@ -112,6 +108,26 @@ padding-top: 1em; } + .data-display-section h3 { + text-decoration: underline; + } + .data-display-section { + padding: 1em 1em 0; + border-radius: 4px; + border-style: solid; + border-width: 2px; + border-color: var(--accent-color); + } + + .real-time-display { + background-color: var(--accent-color); + color: white; + } + .real-time-display pre { + background-color: var(--accent-color); + color: white; + } + h2 { margin-top: 2em; font-size: 4rem; @@ -161,6 +177,7 @@ pre { color: var(--accent-color); font-weight: bold; + box-shadow: none; } button { @@ -180,8 +197,13 @@ justify-content: center; } - .columns { + .data-display { display: flex; - flex-direction: row; + flex-direction: column; + } + @media (min-width: 720px) { + .data-display { + flex-direction: row; + } }