Reduce data transmission on light mode (not loading the dark logos as well)
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
:root {
|
:root {
|
||||||
--external-link-icon: url({{ (resources.Get "img/download.png" | fingerprint).Permalink }})
|
--external-link-icon: url({{ (resources.Get "img/download.png" | fingerprint).Permalink }})
|
||||||
|
|
||||||
|
--logo-tsc-light: url({{ ((resources.Get "img/logo_tsc.png").Fit "400x68 webp" | fingerprint).Permalink }});
|
||||||
|
--logo-tsc-dark: url({{ ((resources.Get "img/logo_tsc_dark.png").Fit "400x68 webp" | fingerprint).Permalink }});
|
||||||
|
--logo-vfl-light: url({{ ((resources.Get "img/logo_hv.png").Fit "100x68 webp" | fingerprint).Permalink }});
|
||||||
|
--logo-vfl-dark: url({{ ((resources.Get "img/logo_hv_dark.png").Fit "100x68 webp" | fingerprint).Permalink }});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -226,19 +226,23 @@ table {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo-light {
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
.logo-dark {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
.logo-light {
|
.logo-light {
|
||||||
display: none;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
.logo-dark {
|
.logo-vfl {
|
||||||
display: inline;
|
--url: var(--logo-vfl-dark);
|
||||||
}
|
}
|
||||||
|
.logo {
|
||||||
|
--url: var(--logo-tsc-dark);
|
||||||
|
}
|
||||||
|
.space {
|
||||||
|
background-size: contain;
|
||||||
|
background-position: center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-image: var(--url);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
<div id="header">
|
<div id="header">
|
||||||
<div class="logo-row">
|
<div class="logo-row">
|
||||||
<a href="/" class="logo">
|
<a href="/" class="logo">
|
||||||
<img src="{{ ((resources.Get "img/logo_tsc.png").Fit "400x68 webp" | fingerprint).Permalink }}" class="logo-light">
|
<div class="space">
|
||||||
<img src="{{ ((resources.Get "img/logo_tsc_dark.png").Fit "400x68 webp" | fingerprint).Permalink }}" class="logo-dark">
|
<img src="{{ ((resources.Get "img/logo_tsc.png").Fit "400x68 webp" | fingerprint).Permalink }}" class="logo-light">
|
||||||
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<a href="https://www.vfl-sindelfingen.de/" class="logo-vfl">
|
<a href="https://www.vfl-sindelfingen.de/" class="logo-vfl">
|
||||||
<img src="{{ ((resources.Get "img/logo_hv.png").Fit "100x68 webp" | fingerprint).Permalink }}" class="logo-light" alt="VfL Sindelfingen">
|
<div class="space">
|
||||||
<img src="{{ ((resources.Get "img/logo_hv_dark.png").Fit "100x68 webp" | fingerprint).Permalink }}" class="logo-dark" alt="VfL Sindelfingen">
|
<img src="{{ ((resources.Get "img/logo_hv.png").Fit "100x68 webp" | fingerprint).Permalink }}" class="logo-light" alt="VfL Sindelfingen">
|
||||||
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="slider">
|
<div class="slider">
|
||||||
|
|||||||
Reference in New Issue
Block a user