Fixed captions for SVGs, added translations for captions

This commit is contained in:
2026-08-13 16:00:24 +02:00
parent 081f9ec1e9
commit 02e7f9535f
3 changed files with 49 additions and 20 deletions
+45 -19
View File
@@ -386,23 +386,6 @@ ul.menuitems {
content: "Translations: "; content: "Translations: ";
} }
html[lang="de"] {
#pages:before {
content: "Seiten:";
}
#recent-articles:before {
content: "Neueste Artikel:";
}
#categories:before {
content: "Kategorien:";
}
#translations:before {
content: "Übersetzungen:";
}
}
.menuitems { .menuitems {
list-style: none; list-style: none;
@@ -617,13 +600,16 @@ svg.injected-svg tspan {
cursor: zoom-in; cursor: zoom-in;
} }
.entry-content img~em{ .entry-content img~em,
.entry-content svg.injected-svg~em{
display: block; display: block;
margin: 0 auto 0 auto; margin: 0 auto 0 auto;
text-align: center; text-align: center;
font-style: normal; font-style: normal;
} }
.entry-content img~em:before {
.entry-content img~em:before,
.entry-content svg.injected-svg~em:before {
content: 'Figure ' counter(figures) ': '; content: 'Figure ' counter(figures) ': ';
font-weight: bold; font-weight: bold;
} }
@@ -682,6 +668,10 @@ svg.injected-svg tspan {
font-weight: bold; font-weight: bold;
} }
.lightbox-overlay #lightbox-caption .fig-number:before {
content: 'Figure ' attr(data-num) ': ';
}
/* Fallback: Systemeinstellung, nur falls kein manueller Override gesetzt ist */ /* Fallback: Systemeinstellung, nur falls kein manueller Override gesetzt ist */
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
:root:not([data-theme]) .lightbox-overlay { :root:not([data-theme]) .lightbox-overlay {
@@ -838,3 +828,39 @@ svg.injected-svg tspan {
.footnotes { .footnotes {
border-top: 1px solid hsl(0, 0%, 39%); border-top: 1px solid hsl(0, 0%, 39%);
} }
html[lang="de"] {
#pages:before {
content: "Seiten:";
}
#recent-articles:before {
content: "Neueste Artikel:";
}
#categories:before {
content: "Kategorien:";
}
#translations:before {
content: "Übersetzungen:";
}
.entry-content img~em:before,
.entry-content svg.injected-svg~em:before {
content: 'Abbildung ' counter(figures) ': ';
}
.entry-content table~p > em:before {
content: 'Tabelle ' counter(tables) ': ';
}
.entry-content table.highlighttable~p > em:before,
.entry-content div.highlight~p > em:before {
content: 'Liste ' counter(listings) ': ';
}
.lightbox-overlay #lightbox-caption .fig-number:before {
content: 'Abbildung ' attr(data-num) ': ';
}
}
+1 -1
View File
@@ -23,7 +23,7 @@ document.addEventListener('DOMContentLoaded', function () {
function setCaption(figureNumber, captionText) { function setCaption(figureNumber, captionText) {
overlayCaption.innerHTML = captionText overlayCaption.innerHTML = captionText
? '<span class="fig-number">Figure ' + figureNumber + ':</span> ' + captionText ? '<span class="fig-number" data-num="' + figureNumber + '"></span> ' + captionText
: ''; : '';
} }
+3
View File
@@ -11,6 +11,9 @@
<link rel="stylesheet" type="text/css" href="{{ main_siteurl | default(SITEURL) }}/theme/css/site.css" /> <link rel="stylesheet" type="text/css" href="{{ main_siteurl | default(SITEURL) }}/theme/css/site.css" />
{% if EXTRA_HEAD %}
{{ EXTRA_HEAD | safe }}
{% endif %}
{% if FEED_ALL_ATOM %} {% if FEED_ALL_ATOM %}
<link href="{{ FEED_DOMAIN }}/{% if FEED_ALL_ATOM_URL %}{{ FEED_ALL_ATOM_URL }}{% else %}{{ FEED_ALL_ATOM }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Full Atom Feed" /> <link href="{{ FEED_DOMAIN }}/{% if FEED_ALL_ATOM_URL %}{{ FEED_ALL_ATOM_URL }}{% else %}{{ FEED_ALL_ATOM }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Full Atom Feed" />
{% endif %} {% endif %}