From 1916a1a683265868177434fde479276ac4b08fd0 Mon Sep 17 00:00:00 2001 From: Ross Keenan Date: Sun, 10 Oct 2021 20:42:44 +0200 Subject: [PATCH] feat: :lipstick: Highlight matches in coCites sentence --- src/Components/CoCitations.svelte | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/src/Components/CoCitations.svelte b/src/Components/CoCitations.svelte index 5ad3aee..d8676db 100644 --- a/src/Components/CoCitations.svelte +++ b/src/Components/CoCitations.svelte @@ -95,7 +95,17 @@ {coCite.measure}
- ${coCite.sentence} + {#if coCite.measure < 0.5} + {coCite.sentence[0]} + {coCite.sentence[1]} + {coCite.sentence[2]} + {:else} + {coCite.sentence[0]} + {coCite.sentence[1]} + {coCite.sentence[2]} + {coCite.sentence[3]} + {coCite.sentence[4]} + {/if}
{/each} @@ -153,8 +163,12 @@ padding-left: 40px; color: var(--text-muted); } - /* .top-row { - display: flex; - justify-content: space-between; - } */ + .top-row span + span { + float: right; + } + + mark { + color: var(--text-normal); + background-color: var(--text-highlight-bg); + }