-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from AkinariHex/nextjs
Graph tooltip and provisional addition
- Loading branch information
Showing
9 changed files
with
263 additions
and
131 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import provisionalImage from '@/public/icons/provisional.png'; | ||
import Image from 'next/image'; | ||
import styles from './provisionalBadge.module.css'; | ||
|
||
export default function ProvisionalBadge() { | ||
return ( | ||
<div className={styles.badge}> | ||
<Image src={provisionalImage} alt="Provisional" fill /> | ||
</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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
.badge { | ||
width: 1.8em; | ||
height: 1.8em; | ||
aspect-ratio: 1; | ||
font-size: 0.26em; | ||
display: flex; | ||
flex-flow: column; | ||
align-items: center; | ||
justify-content: center; | ||
color: hsl(var(--badge-provisional-foreground)); | ||
user-select: none; | ||
position: relative; | ||
cursor: pointer; | ||
} | ||
|
||
.badge img { | ||
object-fit: cover; | ||
} | ||
|
||
.badge:after { | ||
content: 'Rating is provisional, must play more matches for an accurate ranking'; | ||
width: max-content; | ||
max-width: 500px; | ||
display: flex; | ||
flex-flow: row; | ||
background-color: hsla(var(--badge-provisional-background), 0.3); | ||
line-height: 1.2rem; | ||
backdrop-filter: blur(10px); | ||
position: absolute; | ||
left: 2.2rem; | ||
bottom: -0.3rem; | ||
font-size: 0.8rem; | ||
padding: 0.6rem 0.8rem; | ||
border-radius: 4px; | ||
visibility: hidden; | ||
opacity: 0; | ||
transition: opacity 0.2s ease-out, visibility 0.2s ease-out; | ||
z-index: 2; | ||
font-weight: 600; | ||
} | ||
|
||
.badge:hover::after { | ||
visibility: visible; | ||
opacity: 1; | ||
} |
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
Oops, something went wrong.