mirror of
https://github.com/vinta/awesome-python.git
synced 2026-03-25 05:33:05 +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 re
|
||||
import shutil
|
||||
from datetime import datetime, timezone
|
||||
from pathlib import Path
|
||||
from typing import TypedDict
|
||||
|
||||
@@ -191,6 +192,7 @@ def build(repo_root: str) -> None:
|
||||
entries=entries,
|
||||
total_entries=total_entries,
|
||||
total_categories=len(categories),
|
||||
build_date=datetime.now(timezone.utc).strftime("%B %d, %Y"),
|
||||
),
|
||||
encoding="utf-8",
|
||||
)
|
||||
|
||||
@@ -908,12 +908,23 @@ th[data-sort].sort-asc::after {
|
||||
text-underline-offset: 0.2em;
|
||||
}
|
||||
|
||||
.footer-left {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.3rem;
|
||||
}
|
||||
|
||||
.footer-brand {
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.03em;
|
||||
color: oklch(82% 0.02 75);
|
||||
}
|
||||
|
||||
.footer-date {
|
||||
font-size: 0.7rem;
|
||||
color: oklch(50% 0.02 55);
|
||||
}
|
||||
|
||||
.footer-links {
|
||||
display: block;
|
||||
text-align: right;
|
||||
|
||||
@@ -44,7 +44,10 @@
|
||||
<main id="content">{% block content %}{% endblock %}</main>
|
||||
|
||||
<footer class="footer">
|
||||
<span class="footer-brand">Awesome Python</span>
|
||||
<div class="footer-left">
|
||||
<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">
|
||||
<span
|
||||
>Made by
|
||||
|
||||
Reference in New Issue
Block a user