fix: show the RSS icon and the W3C badges on one line at the same height

- move the RSS icon inside the badges paragraph
- scale every footer icon to 32 px high
- lay the badges out in a flex row
This commit is contained in:
squid 2026-11-12 18:45:58 +01:00
commit 1b81184187
5 changed files with 11 additions and 10 deletions

View file

@ -322,9 +322,9 @@ def build():
ctx["content"] = render(p["body"].strip("\n") + "\n", ctx, name)
lead = p.get("lead", "back")
ctx["lead"] = render(tpl["lead-" + lead], ctx, f"templates/lead-{lead}.html")
ctx["feed"] = render(tpl["feed"], ctx, "templates/feed.html")
ctx["badges"] = render(tpl["badges"], dict(ctx, doc_q=ctx["doc_url"].replace(":", "%3A").replace("/", "%2F")),
"templates/badges.html")
ctx["feed"] = render(tpl["feed"], ctx, "templates/feed.html")
ctx["header"] = render(tpl["header"], ctx, "templates/header.html")
ctx["footer"] = render(tpl["footer"], ctx, "templates/footer.html")
rel = p["path"].lstrip("/")

View file

@ -106,8 +106,11 @@ code {
height: auto;
}
svg {
vertical-align: middle;
.badges {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: .5em;
}
@media print {
@ -119,7 +122,7 @@ svg {
--link: #000;
}
header, .badges, .feed {
header, .badges {
display: none;
}

View file

@ -1,4 +1,5 @@
<p class="badges">
<a href="https://validator.w3.org/nu/?doc={{doc_q}}"><img src="/badges/w3c-html5.png" alt="Valid HTML5" width="63" height="64"></a>
<a href="https://jigsaw.w3.org/css-validator/validator?uri={{doc_q}}&amp;profile=css3svg"><img src="/badges/w3c-css.png" alt="Valid CSS" width="88" height="31"></a>
{{feed}}
<a href="https://validator.w3.org/nu/?doc={{doc_q}}"><img src="/badges/w3c-html5.png" alt="Valid HTML5" width="31" height="32"></a>
<a href="https://jigsaw.w3.org/css-validator/validator?uri={{doc_q}}&amp;profile=css3svg"><img src="/badges/w3c-css.png" alt="Valid CSS" width="91" height="32"></a>
</p>

View file

@ -1,3 +1 @@
<p class="feed">
<a href="{{url_news}}feed.xml" title="RSS"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="28" height="28" role="img" aria-label="RSS"><rect width="32" height="32" rx="6" fill="#D9480F"/><circle cx="9" cy="23" r="3" fill="#fff"/><path d="M6 14a12 12 0 0 1 12 12M6 6a20 20 0 0 1 20 20" fill="none" stroke="#fff" stroke-width="3"/></svg></a>
</p>
<a href="{{url_news}}feed.xml" title="RSS"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" role="img" aria-label="RSS"><rect width="32" height="32" rx="6" fill="#D9480F"/><circle cx="9" cy="23" r="3" fill="#fff"/><path d="M6 14a12 12 0 0 1 12 12M6 6a20 20 0 0 1 20 20" fill="none" stroke="#fff" stroke-width="3"/></svg></a>

View file

@ -3,6 +3,5 @@
<p>
{{nojs}}
</p>
{{feed}}
{{badges}}
</footer>