Skip to content

Commit

Permalink
imporve header
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 committed Aug 20, 2024
1 parent 9594b7f commit 58c2873
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
16 changes: 14 additions & 2 deletions server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,13 @@ async def show_user_contrib(user_id: int, request: Request) -> Template:
user_id,
)
return Template(
"list.html.jinja2", context={"rows": rows, "auth": request.auth, "user_id": user_id}
"list.html.jinja2",
context={
"rows": rows,
"auth": request.auth,
"user_id": user_id,
"title": f"{user_id} 的历史贡献",
},
)


Expand All @@ -114,7 +120,13 @@ async def show_user_review(user_id: int, request: Request) -> Template:
user_id,
)
return Template(
"list.html.jinja2", context={"rows": rows, "auth": request.auth, "user_id": user_id}
"list.html.jinja2",
context={
"rows": rows,
"auth": request.auth,
"user_id": user_id,
"title": f"{user_id} 的历史审核",
},
)


Expand Down
19 changes: 16 additions & 3 deletions server/templates/component/header.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
<div class="row">
<a href="/" class="link-underline link-underline-opacity-0"><h2>返回首页</h2></a>
<hr>
<div class="row d-flex flex-row">
<div class="col">
<a href="/" class="link-underline link-underline-opacity-0"><h3>
返回首页</h3>
</a>
</div>

<div class="col">
{% if title is defined %}
<h3>{{ title }}</h3>
{% endif %}
</div>

<div class="col"></div>
</div>

<hr>

0 comments on commit 58c2873

Please sign in to comment.