fix broadcast stuff

sync_v2
Raz 6 months ago
parent 44776a0e1b
commit aaebde94b1
  1. 2
      tournaments/static/tournaments/css/broadcast.css
  2. 8
      tournaments/templates/tournaments/broadcast/broadcasted_auto.html
  3. 8
      tournaments/templates/tournaments/broadcast/broadcasted_auto_event.html
  4. 16
      tournaments/templates/tournaments/broadcast/broadcasted_planning.html
  5. 4
      tournaments/templates/tournaments/broadcast/broadcasted_rankings.html
  6. 4
      tournaments/templates/tournaments/broadcast/broadcasted_summons.html

@ -177,7 +177,6 @@ body {
}
#header {
margin-top: 20px;
margin-bottom: 40px;
}
.footer-broadcast {
@ -193,7 +192,6 @@ body {
}
#header {
margin-top: 40px;
margin-bottom: 80px;
}
.footer-broadcast {

@ -59,12 +59,12 @@
},
paginateSummons(array) {
let pageSize = 16
if (window.innerHeight < 768) {
if (window.innerHeight <= 720) {
pageSize = 12;
if (this.has_sponsors) {
pageSize = 10
}
} else if (window.innerHeight < 1024) {
} else if (window.innerHeight <= 1080) {
if (this.has_sponsors) {
pageSize = 12
}
@ -86,12 +86,12 @@
},
paginateRankings(array) {
let pageSize = 16
if (window.innerHeight < 768) {
if (window.innerHeight <= 720) {
pageSize = 12;
if (this.has_sponsors) {
pageSize = 10
}
} else if (window.innerHeight < 1024) {
} else if (window.innerHeight <= 1080) {
if (this.has_sponsors) {
pageSize = 12
}

@ -86,12 +86,12 @@
paginateSummons(array) {
let pageSize = 16
if (window.innerHeight < 768) {
if (window.innerHeight <= 720) {
pageSize = 12;
if (this.has_sponsors) {
pageSize = 10
}
} else if (window.innerHeight < 1024) {
} else if (window.innerHeight <= 1080) {
if (this.has_sponsors) {
pageSize = 12
}
@ -114,12 +114,12 @@
paginateRankings(array) {
let pageSize = 16
if (window.innerHeight < 768) {
if (window.innerHeight <= 720) {
pageSize = 12;
if (this.has_sponsors) {
pageSize = 10
}
} else if (window.innerHeight < 1024) {
} else if (window.innerHeight <= 1080) {
if (this.has_sponsors) {
pageSize = 12
}

@ -148,10 +148,9 @@
days: [],
currentDayIndex: 0,
currentPageIndex: 0,
has_sponsors: {{ tournament.has_sponsors|lower }},
matchGroups: [],
courtCount: {{ tournament.court_count|default:1 }},
groupsPerPage: 6,
retrieveData() {
fetch('/tournament/{{ tournament.id }}/planning/json/')
.then(res => res.json())
@ -167,13 +166,24 @@
},
getMatchGroupsForDay(day) {
let groupsPerPage = 12;
if (window.innerHeight <=720) {
groupsPerPage = 8;
} else if (window.innerHeight <=1080) {
groupsPerPage = 10;
}
if (this.has_sponsors) {
groupsPerPage = groupsPerPage - 2;
}
const formattedDay = day;
const filteredGroups = this.matchGroups.filter(group => {
if (!group.matches || group.matches.length === 0) return false;
return group.name && formattedDay && group.name.includes(formattedDay);
});
let groupsPerPageThreshold = this.courtCount >= 5 ? Math.ceil(this.groupsPerPage / 2) : this.groupsPerPage;
let groupsPerPageThreshold = this.courtCount >= 5 ? Math.ceil(groupsPerPage / 2) : groupsPerPage;
let columns = this.courtCount >= 5 ? 1 : 2; // Number of columns to display
const paginatedGroups = [];

@ -29,12 +29,12 @@
.then((data) => {
let pageSize = 16
if (window.innerHeight < 768) {
if (window.innerHeight <= 720) {
pageSize = 12;
if (this.has_sponsors) {
pageSize = 10
}
} else if (window.innerHeight < 1024) {
} else if (window.innerHeight <= 1080) {
if (this.has_sponsors) {
pageSize = 12
}

@ -29,12 +29,12 @@
.then((data) => {
let pageSize = 16
if (window.innerHeight < 768) {
if (window.innerHeight <= 720) {
pageSize = 12;
if (this.has_sponsors) {
pageSize = 10
}
} else if (window.innerHeight < 1024) {
} else if (window.innerHeight <= 1080) {
if (this.has_sponsors) {
pageSize = 12
}

Loading…
Cancel
Save