home
·
contact
·
privacy
projects
/
berlin-corona-table
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3d86d1e
)
Horizontale "all of Berlin" header in HTML table.
author
Christian Heller
<c.heller@plomlompom.de>
Fri, 3 Jul 2020 20:15:25 +0000
(22:15 +0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Fri, 3 Jul 2020 20:15:25 +0000
(22:15 +0200)
enhance_table.py
patch
|
blob
|
history
diff --git
a/enhance_table.py
b/enhance_table.py
index a969895164f6a316123e1692d32762248533c15c..66614c36433a9e64422fe1768ee11ef217624fde 100755
(executable)
--- a/
enhance_table.py
+++ b/
enhance_table.py
@@
-135,18
+135,21
@@
if output_type == 'html':
print('<style>')
print('table, tr, th, td { border: 1px solid black; }')
print('.day_row:nth-child(7n+2) { background-color: yellow; }')
print('<style>')
print('table, tr, th, td { border: 1px solid black; }')
print('.day_row:nth-child(7n+2) { background-color: yellow; }')
- print('.district_
header
{ writing-mode: vertical-rl; '
+ print('.district_
name
{ writing-mode: vertical-rl; '
'transform: rotate(180deg); }')
print('</style>')
print('<table>')
print('<tr>')
print('<th>date</th>')
'transform: rotate(180deg); }')
print('</style>')
print('<table>')
print('<tr>')
print('<th>date</th>')
+ sorted_dates.reverse()
+ sum_district = sorted_districts[-1]
for district in sorted_districts:
long_form = translate[district]
for district in sorted_districts:
long_form = translate[district]
- print('<th class="district_header">%s</th>' % long_form)
+ if sum_district == district:
+ print('<th>%s</th>' % long_form)
+ else:
+ print('<th class="district_name">%s</th>' % long_form)
print('</tr>')
print('</tr>')
- sorted_dates.reverse()
- sum_district = sorted_districts[-1]
for date in sorted_dates:
print('<tr class="day_row">')
print('<td>%s</td>' % date)
for date in sorted_dates:
print('<tr class="day_row">')
print('<td>%s</td>' % date)