From f2fa1aad51e2fec976657855e9da4020dcd8b512 Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Wed, 12 Aug 2020 19:57:27 -0500 Subject: [PATCH] Improve portable display of site, improve individual display song separation. --- frontend/src/App.css | 9 ++++++ frontend/src/App.js | 69 ++++++++++++++++++++++++++++---------------- 2 files changed, 53 insertions(+), 25 deletions(-) diff --git a/frontend/src/App.css b/frontend/src/App.css index 00354c4..efbc5cc 100644 --- a/frontend/src/App.css +++ b/frontend/src/App.css @@ -19,6 +19,15 @@ badge-danger {exex}*/ font-size:12px; } +.moveDown{ + top:-16px; +} + +.fadein{ + animation-name: fadein; + animation-duration: 1s; +} + .display-tooltipside{ position:absolute; diff --git a/frontend/src/App.js b/frontend/src/App.js index ffd8c89..f705c82 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -328,35 +328,54 @@ function Play(p) { if (hours<24) {return <>{hours} {"hour"+((hours!==1)?"s":"")} ago} return <>{days} {"day"+((days!==1)?"s":"")} ago } - function GetDateDisplay() { + function GetDateDisplay(timeStampBelow) { var date = new Date(p.play.date); var months = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"] - return <>{months[date.getMonth()]+" "+date.getDate()+" "+date.getFullYear()+" "+date.getHours()+":"+((date.getMinutes()<10)?"0"+date.getMinutes():date.getMinutes())}{GetDateDiff()} + return <>{months[date.getMonth()]+" "+date.getDate()+" "+date.getFullYear()+" "+date.getHours()+":"+((date.getMinutes()<10)?"0"+date.getMinutes():date.getMinutes())}{GetDateDiff()} } if (p.mini) { return ( <> -
-
{Math.floor(p.play.score)} pts
{((p.play.fine==0&&p.play.safe==0&&p.play.sad==0&&p.play.worst==0)?✪PFC:(p.play.safe==0&&p.play.sad==0&&p.play.worst==0)?★FC:<>)}
-
{GetDateDisplay()}
-
-
-
- {p.play.cool+"/"+p.play.fine+"/"+p.play.safe+"/"+p.play.sad+"/"+p.play.worst} -
-
- {(p.play.mod!==null&&p.play.mod.length>0)? - - :<> - } -
-
- {p.play.percent}% +
+
+
{Math.floor(p.play.score)} pts
{((p.play.fine==0&&p.play.safe==0&&p.play.sad==0&&p.play.worst==0)?✪PFC:(p.play.safe==0&&p.play.sad==0&&p.play.worst==0)?★FC:<>)}
+
{GetDateDisplay()}
+
+
+
+ {p.play.cool+"/"+p.play.fine+"/"+p.play.safe+"/"+p.play.sad+"/"+p.play.worst} +
+
+ {(p.play.mod!==null&&p.play.mod.length>0)? + + :<> + } +
+
+ {p.play.percent}% +
+
+ {
{((p.play.fine==0&&p.play.safe==0&&p.play.sad==0&&p.play.worst==0)?✪PFC:(p.play.safe==0&&p.play.sad==0&&p.play.worst==0)?★FC:<>)}
} +
+
+ {Math.floor(p.play.score)} pts +
+ {p.play.cool+"/"+p.play.fine+"/"+p.play.safe+"/"+p.play.sad+"/"+p.play.worst} +
+
+ {p.play.percent}% +
+ {GetDateDisplay(true)} +
+
+
+
); } else { @@ -650,12 +669,14 @@ function HoverSongName(p) { var [toggle,setToggle] = useState(false) return ( <> - { + { if (!toggle) { - setExpand() + setExpand( + + ) setToggle(true) } else { + setExpand(<>) setToggle(false) } } @@ -665,9 +686,7 @@ function HoverSongName(p) { - - {expand} - + {expand} ) }