style 수정
This commit is contained in:
@ -43,8 +43,8 @@ def get_precipitation_summary(retry=True):
|
||||
'<h3 style="font-size: 2em; margin: 20px 0;">[시간대별 강수량]</h3>',
|
||||
'<table style="border-collapse: collapse; border-spacing: 0; display: inline-table; margin: 0 auto;">',
|
||||
'<tr>',
|
||||
'<th style="padding: 0; border: 1px solid #333;">시간</th>',
|
||||
'<th style="padding: 0; border: 1px solid #333;">강수량</th>',
|
||||
'<th style="min-width: 150px; line-height: 2em; padding: 0; border: 1px solid #333;">시간</th>',
|
||||
'<th style="min-width: 150px; line-height: 2em; padding: 0; border: 1px solid #333;">강수량</th>',
|
||||
'</tr>'
|
||||
]
|
||||
|
||||
@ -54,11 +54,11 @@ def get_precipitation_summary(retry=True):
|
||||
if 900 < int(time) < 2300:
|
||||
mm = parse_precip(item['fcstValue'])
|
||||
time_str = f"{time[:2]}:{time[2:]}" # '11:00'
|
||||
lines.append(f'<tr><td style="padding: 0; border: 1px solid #333;">{time_str}</td><td style="padding: 0; border: 1px solid #333;">{mm}mm</td></tr>')
|
||||
lines.append(f'<tr><td style="line-height: 2em; padding: 0; border: 1px solid #333;">{time_str}</td><td style="line-height: 2em; padding: 0; border: 1px solid #333;">{mm}mm</td></tr>')
|
||||
total_rainfall += mm
|
||||
|
||||
lines.append(f'<tr><td colspan="2" style="line-height: 2em; padding: 0; border: 1px solid #333;">영업시간 중 총 예상 강수량: <strong>{total_rainfall:.1f}mm</strong></td></tr>')
|
||||
lines.append('</table></div>')
|
||||
lines.append(f'<p style="text-align:center;">영업시간 중 총 예상 강수량: <strong>{total_rainfall:.1f}mm</strong></p>')
|
||||
|
||||
return ''.join(lines)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user