-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e113f0a
commit ac8fb05
Showing
17 changed files
with
330 additions
and
98 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,42 @@ | ||
<script> | ||
import { tooltip } from "../actions/tooltip"; | ||
export let characteristic; | ||
export let difficulty; | ||
const bgColorMap = { | ||
Easy: "--easyChipBackgroundColor", | ||
Normal: "--normalChipBackgroundColor", | ||
Hard: "--hardChipBackgroundColor", | ||
Expert: "--expertChipBackgroundColor", | ||
ExpertPlus: "--expertPlusChipBackgroundColor", | ||
}; | ||
const iconMap = { | ||
Standard: "icons/standard.svg", | ||
OneSaber: "icons/onesaber.svg", | ||
NoArrows: "icons/noarrows.svg", | ||
"90Degree": "icons/90degree.svg", | ||
"360Degree": "icons/360degree.svg", | ||
Lightshow: "icons/lightshow.svg", | ||
Lawless: "icons/lawless.svg", | ||
}; | ||
$: bgColor = bgColorMap[difficulty]; | ||
$: icon = iconMap[characteristic]; | ||
</script> | ||
|
||
<span use:tooltip={{ text: `${difficulty} ${characteristic}` }} class="chip" style="--chipBackgroundColor:var({bgColor})"> | ||
<img src={icon} width="24px" alt="Song Characteristic: {difficulty} {characteristic}" /> | ||
</span> | ||
|
||
<style> | ||
.chip { | ||
color: white; | ||
background-color: var(--chipBackgroundColor); | ||
border-radius: 16px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
padding: 2px 8px 2px 8px; | ||
} | ||
</style> |
Oops, something went wrong.