Skip to content

Commit 7ced109

Browse files
SnugugSam Richard
andauthored
🐛(site) Fix step reinforcements and content overflow (#776)
* Fix step reinforcements and content overflow * Swap to clip --------- Co-authored-by: Sam Richard <samrichard@google.com>
1 parent 71b9a47 commit 7ced109

File tree

1 file changed

+23
-10
lines changed

1 file changed

+23
-10
lines changed

site/src/layouts/views/Tutorial.astro

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -203,16 +203,28 @@ if (intro) {
203203
client:only="svelte"
204204
/>
205205
<ul class="reinforcements">
206-
{tutorial.outro.next.steps.map((g, i) => (
207-
<Reinforcement
208-
tutorial={slugify(tutorial.title)}
209-
task={slugify(tutorial.tasks[task].title)}
210-
step={i}
211-
client:load
212-
>
213-
<Text body={g} inline={true} wrapped={false} />
214-
</Reinforcement>
215-
))}
206+
{tutorial?.tasks[task]?.reinforcement &&
207+
tutorial?.tasks[task]?.reinforcement.map((g, i) => (
208+
<Reinforcement
209+
tutorial={slugify(tutorial.title)}
210+
task={slugify(tutorial.tasks[task].title)}
211+
step={i}
212+
client:load
213+
>
214+
<Text body={g} inline={true} wrapped={false} />
215+
</Reinforcement>
216+
))}
217+
{outro &&
218+
tutorial.outro.next.steps.map((g, i) => (
219+
<Reinforcement
220+
tutorial={slugify(tutorial.title)}
221+
task={slugify(tutorial.tasks[task].title)}
222+
step={i}
223+
client:load
224+
>
225+
<Text body={g} inline={true} wrapped={false} />
226+
</Reinforcement>
227+
))}
216228
</ul>
217229
</section>
218230
</>
@@ -397,6 +409,7 @@ if (intro) {
397409
display: flex;
398410
flex-direction: column;
399411
gap: 2rem;
412+
overflow-x: clip;
400413
}
401414

402415
.pagination {

0 commit comments

Comments
 (0)