Skip to content

Commit

Permalink
Fixed #242, better tutorial advance buttons.
Browse files Browse the repository at this point in the history
  • Loading branch information
amyjko committed Oct 31, 2023
1 parent 727117d commit c91f2e7
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 13 deletions.
42 changes: 30 additions & 12 deletions src/components/app/TutorialView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -229,18 +229,6 @@
)}</Header
>
<nav>
<Button
tip={$locales.get((l) => l.ui.page.learn.button.previous)}
action={() => navigate(progress.previousPause() ?? progress)}
active={progress.previousPause() !== undefined}
bind:view={previousButton}>⇦</Button
>
<Button
tip={$locales.get((l) => l.ui.page.learn.button.next)}
action={() => navigate(progress.nextPause() ?? progress)}
active={progress.nextPause() !== undefined}
bind:view={nextButton}>⇨</Button
>
<!-- A hierarchical select of tutorial units and lessons -->
<select
bind:value={selection}
Expand Down Expand Up @@ -281,6 +269,29 @@
<div class="content">
<div role="article" class="dialog">
<div class="turns" aria-live="assertive">
<div class="controls">
<Button
large
tip={$locales.get(
(l) => l.ui.page.learn.button.previous
)}
action={() =>
navigate(progress.previousPause() ?? progress)}
active={progress.previousPause() !== undefined}
bind:view={previousButton}>⇦</Button
>
{#if act !== undefined && scene !== undefined && (scene.subtitle ?? scene.title)}<Note
>{scene.subtitle ?? scene.title}</Note
>{/if}
<Button
large
tip={$locales.get((l) => l.ui.page.learn.button.next)}
action={() =>
navigate(progress.nextPause() ?? progress)}
active={progress.nextPause() !== undefined}
bind:view={nextButton}>⇨</Button
>
</div>
{#if act === undefined}
<div class="title play"
>{$locales.get((l) => l.wordplay)}</div
Expand Down Expand Up @@ -482,4 +493,11 @@
select::after {
content: 'a';
}
.controls {
display: flex;
width: 100%;
align-items: center;
justify-content: space-between;
}
</style>
1 change: 0 additions & 1 deletion src/components/widgets/Button.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@
border-radius: var(--wordplay-border-radius);
}
button.scale:focus[aria-disabled='false'],
button.scale:hover[aria-disabled='false'] {
transform: rotate(-3deg);
}
Expand Down

0 comments on commit c91f2e7

Please sign in to comment.