Skip to content

Commit

Permalink
Add "Expand all" button intended for JS users
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanThatOneKid committed Jan 18, 2023
1 parent 6ae8ce8 commit a2ec585
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/routes/(site)/s23positions/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
import PositionList from './position-list.svelte';
import { POSITIONS } from './data';
function expandAll() {
const positions = document.querySelectorAll('.position');
positions.forEach((el) => (el.setAttribute('open', 'true')));
}
</script>

<Spacing --min="175px" --med="200px" --max="200px" />
Expand All @@ -22,8 +27,8 @@
Last updated January 18th, 2023
<br />
<br />
<span class="apply-btn">
<Button link="/s23apply" text="Apply now!" />
<span class="center-btn" on:click={expandAll} on:keypress={expandAll}>
<Button text="Expand all!" />
</span>
</p>
</Block>
Expand All @@ -36,6 +41,12 @@

<Spacing --med="64px" />

<span class="center-btn">
<Button link="/s23apply" text="Apply now!" />
</span>

<Spacing --med="64px" />

<Block align={TextAlignment.LEFT}>
<h1 id="contact-information" slot="headline" class="size-lg">Contact information</h1>
<div slot="text" class="contact-text">
Expand Down Expand Up @@ -71,7 +82,7 @@
margin: 0 1rem;
}
.apply-btn {
.center-btn {
display: flex;
justify-content: center;
}
Expand Down

0 comments on commit a2ec585

Please sign in to comment.