Updated some css
Added yet more documentation Made the song info container match the other containers offsets
This commit is contained in:
parent
3f24046a1f
commit
5d58ed8175
@ -1,9 +1,7 @@
|
|||||||
import {Component} from "react";
|
import {Component} from "react";
|
||||||
import Image from 'next/image'
|
|
||||||
import Config from "../config.json";
|
|
||||||
|
|
||||||
export default class SongInfo extends Component {
|
export default class SongInfo extends Component {
|
||||||
|
|
||||||
constructor(params) {
|
constructor(params) {
|
||||||
super(params);
|
super(params);
|
||||||
this.state = {
|
this.state = {
|
||||||
@ -16,6 +14,11 @@ export default class SongInfo extends Component {
|
|||||||
this.formatDiff(data.difficulty);
|
this.formatDiff(data.difficulty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the difficulity color from the given difficulity
|
||||||
|
*
|
||||||
|
* @param {string} diff
|
||||||
|
*/
|
||||||
formatDiff(diff) {
|
formatDiff(diff) {
|
||||||
if (diff === "Expert+") {
|
if (diff === "Expert+") {
|
||||||
this.setState({ diffColor: "#8f48db" });
|
this.setState({ diffColor: "#8f48db" });
|
||||||
@ -34,6 +37,12 @@ export default class SongInfo extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Format the given ms
|
||||||
|
*
|
||||||
|
* @param {Number} millis
|
||||||
|
* @returns The formatted time
|
||||||
|
*/
|
||||||
msToMinSeconds(millis) {
|
msToMinSeconds(millis) {
|
||||||
const minutes = Math.floor(millis / 60000);
|
const minutes = Math.floor(millis / 60000);
|
||||||
const seconds = Number(((millis % 60000) / 1000).toFixed(0));
|
const seconds = Number(((millis % 60000) / 1000).toFixed(0));
|
||||||
|
@ -76,7 +76,6 @@
|
|||||||
top:0;
|
top:0;
|
||||||
right:0;
|
right:0;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
margin-top: -5px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.score-stats-right {
|
.score-stats-right {
|
||||||
@ -107,8 +106,8 @@
|
|||||||
position: fixed;
|
position: fixed;
|
||||||
bottom:0;
|
bottom:0;
|
||||||
left:0;
|
left:0;
|
||||||
margin-left: 10px;
|
margin-left: 5px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.song-info-container img {
|
.song-info-container img {
|
||||||
|
Reference in New Issue
Block a user