Updated some css

Added yet more documentation
Made the song info container match the other containers offsets
This commit is contained in:
RealFascinated 2022-04-02 07:37:59 +01:00
parent 3f24046a1f
commit 5d58ed8175
2 changed files with 14 additions and 6 deletions

@ -1,6 +1,4 @@
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 {
@ -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 {