From: Christian Heller <c.heller@plomlompom.de> Date: Fri, 3 Jul 2020 20:17:45 +0000 (+0200) Subject: Improve HTML code layout. X-Git-Url: https://plomlompom.com/repos/day?a=commitdiff_plain;h=a0908b9bfc9d12ab7b87af794045ebe361a9702f;p=berlin-corona-table Improve HTML code layout. --- diff --git a/enhance_table.py b/enhance_table.py index 66614c3..70a9501 100755 --- a/enhance_table.py +++ b/enhance_table.py @@ -131,16 +131,15 @@ for i in range(len(sorted_dates)): # Optimized for web browser viewing. if output_type == 'html': - print('<html>') - print('<style>') - print('table, tr, th, td { border: 1px solid black; }') - print('.day_row:nth-child(7n+2) { background-color: yellow; }') - print('.district_name { writing-mode: vertical-rl; ' - 'transform: rotate(180deg); }') - print('</style>') - print('<table>') - print('<tr>') - print('<th>date</th>') + print("""<html> +<style> +table, tr, th, td { border: 1px solid black; } +.day_row:nth-child(7n+2) { background-color: yellow; } +.district_name { writing-mode: vertical-rl; transform: rotate(180deg); } +</style> +<table> +<tr> +<th>date</th>""") sorted_dates.reverse() sum_district = sorted_districts[-1] for district in sorted_districts: