Skip to content

Commit

Permalink
Added better font + fixed overflow on underlines
Browse files Browse the repository at this point in the history
  • Loading branch information
elijah-potter committed Jan 14, 2024
1 parent f0e12fd commit f4dea4e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
7 changes: 7 additions & 0 deletions web/src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,11 @@

* {
user-select: none;
font-family: Outfit;
}

@font-face {
font-family: Outfit;
src: url('/fonts/outfit.ttf');
}

6 changes: 4 additions & 2 deletions web/src/lib/Underlines.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@
{:else if typeof chunk == 'string'}
<span class="">{chunk}</span>
{:else}
<span style={`border-bottom: 3px solid ${chunk[1]}; margin-right: -4px;`}>
{chunk[0]}
<span style={`margin-right: -4px;`}>
<span style={`border-bottom: 3px solid ${chunk[1]};`}>
{chunk[0]}
</span>
</span>
{/if}
{/each}
Expand Down
9 changes: 6 additions & 3 deletions web/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@
</script>

<div class="flex flex-row w-full h-screen">
<div class="flex-auto h-full p-5 grid z-10">
<div class="flex-auto h-full p-5 grid z-10 text-lg">
<div class="overflow-auto p-0" style="grid-row: 1; grid-column: 1">
<Underlines {content}></Underlines>
<Underlines {content} />
</div>
<div class="overflow-auto p-0" style="grid-row: 1; grid-column: 1">
<Highlights {content} />
</div>
<textarea
class="w-full h-full m-0 rounded-none p-0 z-0 bg-transparent border-none"
class="w-full h-full m-0 rounded-none p-0 z-0 bg-transparent border-none text-lg"
spellcheck="false"
style="grid-row: 1; grid-column: 1"
bind:value={content}
Expand Down
Binary file added web/static/fonts/outfit.ttf
Binary file not shown.

0 comments on commit f4dea4e

Please sign in to comment.