home · contact · privacy
Improve HTML code layout.
authorChristian Heller <c.heller@plomlompom.de>
Fri, 3 Jul 2020 20:17:45 +0000 (22:17 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Fri, 3 Jul 2020 20:17:45 +0000 (22:17 +0200)
enhance_table.py

index 66614c36433a9e64422fe1768ee11ef217624fde..70a9501cab411936b5644c53a5906b4975bdc32e 100755 (executable)
@@ -131,16 +131,15 @@ for i in range(len(sorted_dates)):
 
 # Optimized for web browser viewing.
 if output_type == 'html':
 
 # 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:
     sorted_dates.reverse()
     sum_district = sorted_districts[-1]
     for district in sorted_districts: