Skip to content

Commit

Permalink
tabular nums
Browse files Browse the repository at this point in the history
  • Loading branch information
rossrobino committed Jul 28, 2023
1 parent 0d6b502 commit 0dbd52b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
4 changes: 3 additions & 1 deletion src/lib/components/Metrics.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
};
</script>

<div class="flex flex-wrap items-center gap-4 text-sm">
<div
class="ml-4 hidden h-full flex-wrap items-center gap-4 text-sm tabular-nums sm:flex"
>
<div>
{content.length} char
</div>
Expand Down
18 changes: 12 additions & 6 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
let currentSlide: number;
let placeholder = "";
let file: File;
let fileHandle: FileSystemFileHandle;
Expand Down Expand Up @@ -173,11 +175,6 @@
},
];
let placeholder = gettingStarted;
contentElements.forEach((el) => {
if (el.key) placeholder += `\n- ${el.name}: \`CTRL\`+\`${el.key}\``;
});
const options: FilePickerOptions = {
types: [
{
Expand Down Expand Up @@ -281,6 +278,15 @@
}
};
const setPlaceholder = () => {
placeholder = gettingStarted;
contentElements.forEach((el) => {
if (el.key) placeholder += `\n- ${el.name}: \`CTRL\`+\`${el.key}\``;
});
};
setPlaceholder();
onMount(() => {
const saved = localStorage.getItem("preferences");
if (saved) {
Expand Down Expand Up @@ -430,7 +436,7 @@
</button>
{/each}
<div
class="ml-4 hidden items-center transition group-hover:opacity-100 sm:flex"
class="transition group-hover:opacity-100"
class:opacity-0={viewMode}
>
<Metrics {content} />
Expand Down

0 comments on commit 0dbd52b

Please sign in to comment.