From 54cdbeb490769cf7c4f6c57784a2bd9b856a260d Mon Sep 17 00:00:00 2001 From: Keplyx Date: Thu, 24 May 2018 14:01:44 +0200 Subject: [PATCH] Added stats page --- assets/css/stats.css | 78 ++++++++++++++++++++++++++++++++++++++++++++ assets/css/style.css | 3 +- historique.json | 14 +++----- stats.php | 69 +++++++++++++++++++++++++++++---------- 4 files changed, 136 insertions(+), 28 deletions(-) create mode 100644 assets/css/stats.css diff --git a/assets/css/stats.css b/assets/css/stats.css new file mode 100644 index 0000000..a3a6017 --- /dev/null +++ b/assets/css/stats.css @@ -0,0 +1,78 @@ +#stats_container { + display: inline-flex; + width: 100%; +} + +.stats_table { + width: 48%; + border: none; + margin: 1% 1% 1% 1%; +} + +.stats_table th{ + border-radius: 10px 10px 0 0; + font-family: 'Russo One', sans-serif; +} + + +.stats_table .stat_log, .stats_table .stat_points { + color: #1c1c1c; + border-radius: 0; + font-weight: bold; +} + +#stats_usa th { + background-color: #1a5dad; + border-color: #1a5dad; +} + +#stats_usa .stat_log, #stats_usa .stat_points { + background-color: #639fad; + border-color: #639fad; +} + +#stats_usa td { + border-color: #639fad; +} + +#stats_urss th { + background-color: #d72229; + border-color: #d72229; +} + +#stats_urss .stat_log, #stats_urss .stat_points { + background-color: #d75556; + border-color: #d75556; +} + +#stats_urss td { + border-color: #d75556; +} + +.stat_log { + width: 80%; +} + +.stat_points { + width: 20%; +} + +#positive{ + color: #e9b600; + font-weight: bold; +} + +#negative{ + color: #cea380; +} + +@media screen and (max-width: 480px) { + #stats_container { + display: block; + width: 100%; + } + + .stats_table { + width: 100%; + } +} \ No newline at end of file diff --git a/assets/css/style.css b/assets/css/style.css index 4784e23..17fd03a 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -373,7 +373,7 @@ Full-Width Styles } #score_urss{ - color: #ee293d; + color: #d72229; } #score_separator{ @@ -384,7 +384,6 @@ Full-Width Styles width: 100px; } - /******************************************************************************* Small Device Styles *******************************************************************************/ diff --git a/historique.json b/historique.json index 0f5fa14..05e160e 100644 --- a/historique.json +++ b/historique.json @@ -2,25 +2,21 @@ "usa": [ { "text": "whoa, des points!", - "points": 99, - "date": "19/07/2018" + "points": 99 }, { "text": "whoa, encore des points!", - "points": 2, - "date": "19/07/2018" + "points": 2 } ], "urss":[ { - "text": "merde, mes points!", - "points": -99, - "date": "19/07/2018" + "text": "non ! Mes points!", + "points": -99 }, { "text": "yes, des points!", - "points": 45, - "date": "19/07/2018" + "points": 45 } ] } \ No newline at end of file diff --git a/stats.php b/stats.php index f5ce9d7..237f4f6 100644 --- a/stats.php +++ b/stats.php @@ -1,25 +1,60 @@ 0) + echo ""; + else + echo ""; + echo "".$v['text'].""; + echo "".$v['points'].""; + echo ""; + } +} + ?>

Stats

- - - - - - - - - - - - - - -
USAURSS
LogPointsLogPoints
9h30
- - +

+ Les stats de la semaine. +
+ Remporte le plus de points possible pour faire gagner ton équipe, mais attention à ne pas lui en faire perdre ! +

+
+ + + + + + + + + +
USA
LogPoints
+ + + + + + + + + +
URSS
LogPoints
+
+ + +