mirror of
https://github.com/vinta/awesome-python.git
synced 2026-05-28 12:15:48 +08:00
feat: add build date to footer
Displays the UTC date the site was last built in the footer so visitors can see how fresh the data is. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
import json
|
import json
|
||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
|
from datetime import datetime, timezone
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import TypedDict
|
from typing import TypedDict
|
||||||
|
|
||||||
@@ -191,6 +192,7 @@ def build(repo_root: str) -> None:
|
|||||||
entries=entries,
|
entries=entries,
|
||||||
total_entries=total_entries,
|
total_entries=total_entries,
|
||||||
total_categories=len(categories),
|
total_categories=len(categories),
|
||||||
|
build_date=datetime.now(timezone.utc).strftime("%B %d, %Y"),
|
||||||
),
|
),
|
||||||
encoding="utf-8",
|
encoding="utf-8",
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -908,12 +908,23 @@ th[data-sort].sort-asc::after {
|
|||||||
text-underline-offset: 0.2em;
|
text-underline-offset: 0.2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.footer-left {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.3rem;
|
||||||
|
}
|
||||||
|
|
||||||
.footer-brand {
|
.footer-brand {
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
letter-spacing: 0.03em;
|
letter-spacing: 0.03em;
|
||||||
color: oklch(82% 0.02 75);
|
color: oklch(82% 0.02 75);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.footer-date {
|
||||||
|
font-size: 0.7rem;
|
||||||
|
color: oklch(50% 0.02 55);
|
||||||
|
}
|
||||||
|
|
||||||
.footer-links {
|
.footer-links {
|
||||||
display: block;
|
display: block;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
|||||||
@@ -44,7 +44,10 @@
|
|||||||
<main id="content">{% block content %}{% endblock %}</main>
|
<main id="content">{% block content %}{% endblock %}</main>
|
||||||
|
|
||||||
<footer class="footer">
|
<footer class="footer">
|
||||||
|
<div class="footer-left">
|
||||||
<span class="footer-brand">Awesome Python</span>
|
<span class="footer-brand">Awesome Python</span>
|
||||||
|
{% if build_date %}<span class="footer-date">Data refreshed {{ build_date }}</span>{% endif %}
|
||||||
|
</div>
|
||||||
<div class="footer-links">
|
<div class="footer-links">
|
||||||
<span
|
<span
|
||||||
>Made by
|
>Made by
|
||||||
|
|||||||
Reference in New Issue
Block a user