86 lines
No EOL
2 KiB
HTML
86 lines
No EOL
2 KiB
HTML
<style>
|
|
.theme-beige .custom-header,
|
|
.theme-beige .custom-footer {
|
|
background-color: #ffffde;
|
|
/* Beige Hintergrundfarbe */
|
|
color: #222222;
|
|
/* Textfarbe für bessere Lesbarkeit auf Beige */
|
|
}
|
|
|
|
.theme-black .custom-header,
|
|
.theme-black .custom-footer {
|
|
background-color: #292929;
|
|
/* Schwarzer Hintergrund */
|
|
color: #f5f5dc;
|
|
/* Beige Textfarbe für bessere Lesbarkeit auf Schwarz */
|
|
}
|
|
|
|
.custom-header,
|
|
.custom-footer {
|
|
position: fixed;
|
|
left: 0;
|
|
right: 0;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
padding: 4px;
|
|
z-index: 10;
|
|
}
|
|
|
|
.custom-header {
|
|
top: 0;
|
|
font-size: 16px;
|
|
}
|
|
|
|
.custom-footer {
|
|
bottom: 0;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.left,
|
|
.center,
|
|
.right {
|
|
flex: 1;
|
|
}
|
|
|
|
.center {
|
|
text-align: center;
|
|
}
|
|
|
|
.right {
|
|
text-align: right;
|
|
}
|
|
|
|
.left {
|
|
text-align: left;
|
|
}
|
|
|
|
.reveal-viewport {
|
|
background-size: 14%;
|
|
background-repeat: no-repeat;
|
|
background-position: 2% 3.2%;
|
|
position: relative;
|
|
}
|
|
</style>
|
|
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
// Funktion, um das Theme zu ändern
|
|
function changeTheme(themeHref) {
|
|
// Ändern Sie das Stylesheet basierend auf dem Theme
|
|
if (themeHref.includes('beige')) {
|
|
document.body.classList.add('theme-beige');
|
|
} else if (themeHref.includes('black')) {
|
|
document.body.classList.add('theme-black');
|
|
}
|
|
}
|
|
|
|
// Bestimmen des aktuellen Themes und Anwenden der entsprechenden Stylesheets
|
|
const themeLink = document.getElementById('theme');
|
|
if (themeLink) {
|
|
const themeHref = themeLink.getAttribute('href');
|
|
changeTheme(themeHref);
|
|
} else {
|
|
console.error('Das Theme-Stylesheet-Element wurde nicht gefunden.');
|
|
}
|
|
});
|
|
</script> |