-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ported alternative style for profile page
- Loading branch information
Showing
6 changed files
with
113 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import {listen as listenMatches} from "./matches"; | ||
import {listen as listenHover} from "./hover"; | ||
import {listen as listenSteamProfile} from "./steam-profile"; | ||
import {listen as listenProfile} from "./profile"; | ||
|
||
export function listen() { | ||
listenMatches(); | ||
listenHover(); | ||
listenSteamProfile(); | ||
listenProfile(); | ||
} |
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,25 @@ | ||
function secondsToReadable(seconds) { | ||
seconds = Number(seconds); | ||
const h = Math.floor(seconds / 3600); | ||
|
||
if (seconds < 60) { | ||
return "None"; | ||
} | ||
|
||
const hDisplay = h > 0 ? h + (h === 1 ? " h" : " h") : ""; | ||
|
||
if (hDisplay !== '') { | ||
return hDisplay | ||
} | ||
|
||
const m = Math.floor(seconds % 3600 / 60); | ||
return m > 0 ? m + (m === 1 ? " m" : " m") : ""; | ||
} | ||
|
||
export function listen() { | ||
$('.seconds-to-readable').each((k, v) => { | ||
v = $(v); | ||
|
||
v.html(secondsToReadable(v.html())); | ||
}); | ||
} |
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,3 +1,3 @@ | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.2/js/bootstrap.bundle.min.js"></script> | ||
<script src="/build/scripts.js?v=b3none"></script> | ||
<script src="/build/scripts.js?v=123"></script> |
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