generated from hjess/PythonTemplateProject
Lets make the frontpage in markdown too
All checks were successful
Build, Push, and Deploy to Nomad / docker-nomad (push) Successful in 34s
All checks were successful
Build, Push, and Deploy to Nomad / docker-nomad (push) Successful in 34s
This commit is contained in:
@@ -48,10 +48,22 @@ class CategoryController:
|
||||
Returns:
|
||||
TemplateResponse: A rendered HTML page for the index (home) route.
|
||||
"""
|
||||
|
||||
unix_time_now = int( time.time() )
|
||||
with open(f"data/_frontpage/index.html", "r") as fp:
|
||||
content = fp.read()
|
||||
|
||||
return self.templates.TemplateResponse(
|
||||
"index.html",
|
||||
{"request": request, "data": self.data, "page_title": "Forside", "author": "Henrik"},
|
||||
)
|
||||
"category.html",
|
||||
{
|
||||
"request": request,
|
||||
"data": self.data,
|
||||
"page_title": "Frontpage",
|
||||
"author": "Henrik Jess",
|
||||
"content": content,
|
||||
"timestamp": unix_time_now
|
||||
})
|
||||
|
||||
|
||||
async def get_category(self, request: Request, category_name: str):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user