Skip to content

Commit

Permalink
Format type variables better in docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
amyjko committed Jul 22, 2024
1 parent 814c250 commit 630246b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
18 changes: 11 additions & 7 deletions src/components/concepts/ConceptView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import type LocaleText from '../../locale/LocaleText';
import Progress from '../../tutorial/Progress';
import Link from '../app/Link.svelte';
import { TYPE_CLOSE_SYMBOL, TYPE_OPEN_SYMBOL } from '@parser/Symbols';
export let concept: Concept;
export let type: Type | undefined = undefined;
Expand Down Expand Up @@ -70,13 +71,16 @@
{/if}
</svelte:fragment>
<svelte:fragment slot="aside"
>{#if variables}{#each variables.variables as variable, index}{#if index > 0},
{/if}{@const name = variable.names.getPreferredName(
$locales.getLocales(),
)}{#if name}<RootView
localized="symbolic"
node={name.withoutLanguage()}
/>{/if}{/each}{/if}</svelte:fragment
>{#if variables}
<small
>{TYPE_OPEN_SYMBOL}{#each variables.variables as variable, index}{#if index > 0},
{/if}{@const name = variable.names.getPreferredName(
$locales.getLocales(),
)}{#if name}<RootView
localized="symbolic"
node={name.withoutLanguage()}
/>{/if}{/each}{TYPE_CLOSE_SYMBOL}</small
>{/if}</svelte:fragment
>
</Speech>

Expand Down
8 changes: 7 additions & 1 deletion src/components/lore/Speech.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
class:big
class:scroll
>
<div>
<div class="speaker">
<div
class="glyphs {symbols.length >= 3
? 'small'
Expand Down Expand Up @@ -759,4 +759,10 @@
transform: scale(0.75);
}
}
.speaker {
display: flex;
flex-direction: row;
gap: var(--wordplay-spacing);
}
</style>

0 comments on commit 630246b

Please sign in to comment.