-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'mgr8/about' into mgr8/error
- Loading branch information
Showing
27 changed files
with
1,141 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<script lang="ts"> | ||
export let defaultValue = ''; | ||
export let options: string[] = []; | ||
let currentValue: string = defaultValue; | ||
let active = false; | ||
function toggleDropdown() { | ||
active = !active; | ||
} | ||
function handleOption(term: string) { | ||
currentValue = term; | ||
defaultValue = currentValue; | ||
active = false; | ||
} | ||
</script> | ||
|
||
<div class="term" name="school-year"> | ||
<div class="option-box" class:active> | ||
<div class="selected" on:click={toggleDropdown}>{currentValue}</div> | ||
|
||
<div class="option"> | ||
{#each options as optionValue (optionValue)} | ||
<div class="option-choice" on:click={() => handleOption(optionValue)}> | ||
{optionValue} | ||
</div> | ||
{/each} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<style lang="scss"> | ||
.term { | ||
font-weight: 600; | ||
.option-box { | ||
flex-direction: column; | ||
display: flex; | ||
justify-content: center; | ||
font-size: var(--size-sm); | ||
user-select: none; | ||
text-align: center; | ||
width: 9em; | ||
.option-choice, | ||
.selected { | ||
color: var(--perma-light); | ||
} | ||
.selected { | ||
background-color: var(--button-bg); | ||
padding: 8px 24px; | ||
cursor: pointer; | ||
border-radius: 8px; | ||
transition: 0.25s ease-in-out; | ||
&:hover { | ||
background-color: var(--button-hover); | ||
} | ||
} | ||
.option { | ||
cursor: pointer; | ||
opacity: 0; | ||
transition: 0.25s ease-in-out; | ||
.option-choice { | ||
text-align: center; | ||
cursor: pointer; | ||
transition: 0.25s ease-in-out; | ||
&:hover { | ||
color: var(--acm-blue); | ||
} | ||
} | ||
} | ||
} | ||
.active { | ||
& > .selected { | ||
border-radius: 8px 8px 0 0; | ||
} | ||
& > .option { | ||
opacity: 100%; | ||
background-color: var(--button-bg); | ||
padding: 8px 24px; | ||
margin-top: 0.2rem; | ||
border-radius: 0 0 8px 8px; | ||
transition: 0.25s ease-in-out; | ||
} | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import type { Officer } from '$lib/public/board/types'; | ||
import { Term } from '$lib/public/board/types'; | ||
import OFFICERS_JSON from './officers.json'; | ||
import TIERS_JSON from './tiers.json'; | ||
|
||
export const VISIBLE_TERMS = [Term.Fall22, Term.Spring22, Term.Fall21, Term.Spring21]; | ||
|
||
export const OFFICERS: Officer[] = [...OFFICERS_JSON]; | ||
|
||
export const TIERS: string[] = [...TIERS_JSON]; |
Oops, something went wrong.