Refactor footer context generation and enhance chart image styling for improved layout

This commit is contained in:
bolade
2025-09-26 22:32:39 +01:00
parent 894fbbcee3
commit 604ef375aa
4 changed files with 37 additions and 26 deletions
+16 -7
View File
@@ -15,16 +15,21 @@ header_context = {
"focus": "Endurance",
}
footer_context = [{
"contact_email": "info@ishplabs.com ",
"website": "www.ishplabs.com",
"social": "@ishplabs",
"page_number": i + 1,
} for i in range(len(context_list))]
footer_context = [
{
"contact_email": "info@ishplabs.com ",
"website": "www.ishplabs.com",
"social": "@ishplabs",
"page_number": i + 1,
}
for i in range(len(context_list))
]
header_html = env.get_template("header.html").render(header_context)
footer_html_list = [env.get_template("footer.html").render(context) for context in footer_context]
footer_html_list = [
env.get_template("footer.html").render(context) for context in footer_context
]
for i, context in enumerate(context_list):
template = env.get_template(f"page_{i + 1}.html").render(context)
@@ -84,6 +89,10 @@ html_doc = f"""
max-height: 200px;
object-fit: contain;
}}
/* Larger images for specific charts */
.chart-large {{
max-height: 500px !important;
}}
</style>
</head>
<body class="m-0 p-0">