Enforced presentation order, updated CSS variable names.
This commit is contained in:
@@ -47,19 +47,19 @@ HTML_CONTENT_HEADER = """
|
||||
</head>
|
||||
<body style="padding: 0px; margin: 0px;">
|
||||
|
||||
<div style="width: 100%; padding: 0px; margin: 0px; background-color: var(--dark-color);">
|
||||
<div style="margin-left: auto; margin-right: auto; width: fit-content; background-color: var(--secondary-accent); margin-top: 0px; padding: 12px; border-radius: 0 0 9px 9px;">
|
||||
<div style="width: 100%; padding: 0px; margin: 0px; background-color: var(--A0);">
|
||||
<div style="margin-left: auto; margin-right: auto; width: fit-content; background-color: var(--C1); color: var(--A0); margin-top: 0px; padding: 12px; border-radius: 0 0 9px 9px;">
|
||||
Ballast-Data Product <br>
|
||||
Contact: Non-Doxxing Email Lorum Ipsum <br>
|
||||
Some Header Content
|
||||
</div>
|
||||
<br>
|
||||
<div style="width: fit-content; margin-left: auto; margin-right: auto; border: 9px solid var(--light-color); border-radius: 3px; padding: 12px; background-color: white; border-radius: 9px;">
|
||||
<div style="width: fit-content; margin-left: auto; margin-right: auto; border: 9px solid var(--B2); border-radius: 3px; padding: 12px; background-color: white; border-radius: 9px;">
|
||||
|
||||
<div style="width: fit-content; margin-left: auto; margin-right: auto; border-bottom: 9px solid var(--secondary-accent);">
|
||||
<div style="width: fit-content; margin-left: auto; margin-right: auto; border-bottom: 9px solid var(--C1);">
|
||||
<br>
|
||||
<img height=80px src="https://cdn.ballast-data.co.uk/Logo.svg">
|
||||
<b style="font-size: 60px; line-height: 1; font-weight: 400;"> RailFares </b> <br>
|
||||
<b style="font-size: 4em; line-height: 1; font-weight: 600;"> Fares </b> <br>
|
||||
</div>
|
||||
<br>
|
||||
"""
|
||||
@@ -67,7 +67,7 @@ Some Header Content
|
||||
HTML_CONTENT_FOOTER = """
|
||||
</div>
|
||||
<br>
|
||||
<div style="margin-left: auto; margin-right: auto; width: fit-content; background-color: var(--primary-accent); margin-top: 0px; padding: 12px; border-radius: 9px 9px 0 0;">
|
||||
<div style="margin-left: auto; margin-right: auto; width: fit-content; background-color: var(--D1); color: var(--A0); margin-top: 0px; padding: 12px; border-radius: 9px 9px 0 0;">
|
||||
Open Rail Data Disclaimer Etc. | No Guarantees or Whatever | We do freelance and dont want to be poor.
|
||||
</div>
|
||||
</div>
|
||||
@@ -100,7 +100,7 @@ class FaresHandler(BaseHTTPRequestHandler):
|
||||
text += (
|
||||
'<tr style="font-size: 1.6em;"> <th> Flow </th> <th> Fares </th> </tr>\n'
|
||||
)
|
||||
for flow_fares in data:
|
||||
for flow_fares in sorted(data, key=lambda d: d["flow_id"]["flow_id"]):
|
||||
flow_table = (
|
||||
pd.json_normalize(flow_fares["flow_id"])
|
||||
.rename(COLUMN_RENAMES, axis=1)
|
||||
@@ -116,9 +116,9 @@ class FaresHandler(BaseHTTPRequestHandler):
|
||||
)
|
||||
_ = fares_table.hide(axis=0)
|
||||
|
||||
text += '<tr> \n <td style="border-top: 6px solid var(--primary-accent); vertical-align: top;">'
|
||||
text += '<tr> \n <td style="border-top: 6px solid var(--D1); vertical-align: top;">'
|
||||
text += flow_table.to_html()
|
||||
text += '</td> <td style="border-top: 6px solid var(--primary-accent); vertical-align: top;">'
|
||||
text += '</td> <td style="border-top: 6px solid var(--D1); vertical-align: top;">'
|
||||
text += fares_table.to_html()
|
||||
text += "</td> \n </tr>"
|
||||
text += "</table>"
|
||||
|
||||
Reference in New Issue
Block a user