design index

This commit is contained in:
0nano
2022-10-19 13:33:06 +02:00
parent 4c3945e388
commit dfdd3c79bb
2 changed files with 19 additions and 2 deletions

View File

@@ -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;
}
}

View File

@@ -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 = "<div class=\"capsule\">"+
"<div class=\"capTeam\">"+
"<h3>"+ tname[0] +"</h3></div>"+
"<div class=\"capTeam\">"+
"<h3>"+ tname[1] +"</h3></div>"+
match['sport_name'] +"</div>";
"<h3>"+ tname[1] +"</h3></div><p>"+
match['sport_name'] + " à " + hour +":"+ min +"</p></div>";
$("#nextMatch").append(cap);
}