-
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.
Added tooltip for beatmap stats (#20)
- Loading branch information
1 parent
9fb08e1
commit 99268a4
Showing
10 changed files
with
82 additions
and
33 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
<script> | ||
import BeatmapStat from "./BeatmapStat.svelte"; | ||
import { tooltip } from "../actions/tooltip"; | ||
import { key } from "svelte-awesome/icons"; | ||
</script> | ||
|
||
<BeatmapStat icon={key} iconColor="var(--beatmapKeyIconColor)"> | ||
<slot /> | ||
</BeatmapStat> | ||
<div use:tooltip={{ text: 'Id', position: 'left' }}> | ||
<BeatmapStat icon={key} iconColor="var(--beatmapKeyIconColor)"> | ||
<slot /> | ||
</BeatmapStat> | ||
</div> |
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 |
---|---|---|
@@ -1,12 +1,15 @@ | ||
<script> | ||
import BeatmapStat from "./BeatmapStat.svelte"; | ||
import { tooltip } from "../actions/tooltip"; | ||
import { download } from "svelte-awesome/icons"; | ||
export let count; | ||
$: textVal = count.toLocaleString(); | ||
</script> | ||
|
||
<BeatmapStat icon={download} iconColor="var(--beatmapDownloadsIconColor)"> | ||
<span>{textVal}</span> | ||
</BeatmapStat> | ||
<div use:tooltip={{ text: 'Downloads', position: 'left' }}> | ||
<BeatmapStat icon={download} iconColor="var(--beatmapDownloadsIconColor)"> | ||
<span>{textVal}</span> | ||
</BeatmapStat> | ||
</div> |
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 |
---|---|---|
@@ -1,12 +1,15 @@ | ||
<script> | ||
import BeatmapStat from "./BeatmapStat.svelte"; | ||
import { thumbsDown } from "svelte-awesome/icons"; | ||
import { tooltip } from "../actions/tooltip"; | ||
export let count; | ||
$: textVal = count.toLocaleString(); | ||
</script> | ||
|
||
<BeatmapStat icon={thumbsDown} iconColor="var(--beatmapDownvotesIconColor)"> | ||
<span>{textVal}</span> | ||
</BeatmapStat> | ||
<div use:tooltip={{ text: 'Downvotes', position: 'left' }}> | ||
<BeatmapStat icon={thumbsDown} iconColor="var(--beatmapDownvotesIconColor)"> | ||
<span>{textVal}</span> | ||
</BeatmapStat> | ||
|
||
</div> |
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 |
---|---|---|
@@ -1,12 +1,14 @@ | ||
<script> | ||
import BeatmapStat from "./BeatmapStat.svelte"; | ||
import { percent } from "svelte-awesome/icons"; | ||
import { tooltip } from "../actions/tooltip"; | ||
export let percentage; | ||
$: textVal = Math.round(percentage * 100); | ||
</script> | ||
|
||
<BeatmapStat icon={percent} iconColor="var(--beatmapRatingIconColor)"> | ||
<span>{textVal}</span> | ||
</BeatmapStat> | ||
<div use:tooltip={{ text: 'Avg. Rating', position: 'left' }}> | ||
<BeatmapStat icon={percent} iconColor="var(--beatmapRatingIconColor)"> | ||
<span>{textVal}</span> | ||
</BeatmapStat> | ||
</div> |
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 |
---|---|---|
@@ -1,12 +1,14 @@ | ||
<script> | ||
import BeatmapStat from "./BeatmapStat.svelte"; | ||
import { thumbsUp } from "svelte-awesome/icons"; | ||
import { tooltip } from "../actions/tooltip"; | ||
export let count; | ||
$: textVal = count.toLocaleString(); | ||
</script> | ||
|
||
<BeatmapStat icon={thumbsUp} iconColor="var(--beatmapUpvotesIconColor)"> | ||
<span>{textVal}</span> | ||
</BeatmapStat> | ||
<div use:tooltip={{ text: 'Upvotes', position: 'left' }}> | ||
<BeatmapStat icon={thumbsUp} iconColor="var(--beatmapUpvotesIconColor)"> | ||
<span>{textVal}</span> | ||
</BeatmapStat> | ||
</div> |