From dfdd3c79bbb507e4cb4cdb8b5e6a4f4d4950c44f Mon Sep 17 00:00:00 2001 From: 0nano <35236525+0nano@users.noreply.github.com> Date: Wed, 19 Oct 2022 13:33:06 +0200 Subject: [PATCH] design index --- public_html/css/styleList.css | 14 ++++++++++++++ public_html/js/script_direct.js | 7 +++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/public_html/css/styleList.css b/public_html/css/styleList.css index b7ab6c3..e6166c7 100644 --- a/public_html/css/styleList.css +++ b/public_html/css/styleList.css @@ -28,4 +28,18 @@ body{ overflow: auto; +} + +@media (max-width: 1200px) { + .match_list { + flex-direction: column; + align-items: center; + } + .list { + width: 75%; + margin-bottom: 10%; + } + .capsule { + flex-flow: column wrap; + } } \ No newline at end of file diff --git a/public_html/js/script_direct.js b/public_html/js/script_direct.js index be19317..009cedb 100644 --- a/public_html/js/script_direct.js +++ b/public_html/js/script_direct.js @@ -21,13 +21,16 @@ function aspect(matchs) { //show next matches with a gap of 20 min if(date > (Date.now() - 2700000) /*&& date < (Date.now() + 1200000)*/){ let tname = JSON.parse(match['teams_name']) + let time = match['date'].split(/\D/); + let hour = parseInt(time[3])+2; + let min = time[4]; let cap = "
"+ "
"+ "

"+ tname[0] +"

"+ "
"+ - "

"+ tname[1] +"

"+ - match['sport_name'] +"
"; + "

"+ tname[1] +"

"+ + match['sport_name'] + " à " + hour +":"+ min +"

"; $("#nextMatch").append(cap); }