mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-22 09:52:50 +00:00
chord display site
This commit is contained in:
53
src/routes/config/chords/+page.svelte
Normal file
53
src/routes/config/chords/+page.svelte
Normal file
@@ -0,0 +1,53 @@
|
||||
<script>
|
||||
import {chords} from "$lib/serial/connection.js"
|
||||
import keySymbols from "$lib/assets/key-symbols.json"
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>Chord Manager</title>
|
||||
</svelte:head>
|
||||
|
||||
<section>
|
||||
<p>You have {$chords.length} chords</p>
|
||||
<table>
|
||||
{#each $chords as { phrase, actions }}
|
||||
<tr>
|
||||
<th>{phrase}</th>
|
||||
<td>
|
||||
{#each actions as action}
|
||||
<i>{keySymbols[action] || action}</i>
|
||||
{/each}
|
||||
</td>
|
||||
</tr>
|
||||
{/each}
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<style lang="scss">
|
||||
section {
|
||||
position: relative;
|
||||
overflow-y: auto;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
table i {
|
||||
display: block;
|
||||
|
||||
padding-block: 4px;
|
||||
padding-inline: 8px;
|
||||
|
||||
font-style: normal;
|
||||
|
||||
border: 1px solid var(--md-sys-color-outline);
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: start;
|
||||
}
|
||||
|
||||
td {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user