code-style: centralize CSS styling into stylesheet file

This commit is contained in:
Johannes 2023-07-09 13:01:01 +02:00
parent 4d7d98feed
commit 0046bc39db
6 changed files with 30 additions and 23 deletions

View file

@ -55,9 +55,9 @@ func (b *BaseHandler) printTimetable(timetable map[models.Date]map[int]models.Of
for minute := 0; minute < 60; minute += b.config.Date.MinuteGranularity {
tableBody += "<tr>"
if minute == 0 {
tableBody += fmt.Sprintf("<td>%d Uhr</td>\n", hour)
tableBody += fmt.Sprintf("<td class=\"timetableRightBorder\">%d Uhr</td>\n", hour)
} else {
tableBody += "<td></td>\n"
tableBody += "<td class=\"timetableRightBorder\"></td>\n"
}
for day := 0; day < 5; day += 1 {
for slot := 0; slot < slots[day]; slot += 1 {
@ -96,7 +96,7 @@ func (b *BaseHandler) printTimetable(timetable map[models.Date]map[int]models.Of
}
} else {
if slot+1 == slots[day] {
tableBody += "<td style=\"border-right: 1px dotted\"></td>\n"
tableBody += "<td class=\"timetableRightBorder\"></td>\n"
} else {
tableBody += "<td></td>\n"
}