Change logo file names and smal function refactor
This commit is contained in:
parent
73dc3d4e09
commit
5e20ca53ce
3 changed files with 7 additions and 5 deletions
|
@ -1,16 +1,18 @@
|
||||||
<script>
|
<script>
|
||||||
import FileViewer from "./lib/FileViewer.svelte";
|
import FileViewer from "./lib/FileViewer.svelte";
|
||||||
import MediaQuery from "./lib/MediaQuery.svelte";
|
import MediaQuery from "./lib/MediaQuery.svelte";
|
||||||
import logo from "./assets/logo.webp";
|
import logo from "./assets/embroidery-viewer-logo.webp";
|
||||||
import logoMobile from "./assets/logo-mobile.webp";
|
import logoMobile from "./assets/embroidery-viewer-logo-mobile.webp";
|
||||||
|
|
||||||
|
function configsFor(matches) {
|
||||||
|
return matches ? { src: logoMobile, width: 350, height: 96 } : { src: logo, width: 460, height: 200 }
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<header>
|
<header>
|
||||||
<a href="/">
|
<a href="/">
|
||||||
<MediaQuery query="(min-width: 481px) and (max-width: 812px)" let:matches>
|
<MediaQuery query="(min-width: 481px) and (max-width: 812px)" let:matches>
|
||||||
{@const configs = matches
|
{@const configs = configsFor(matches)}
|
||||||
? { src: logoMobile, width: 350, height: 96 }
|
|
||||||
: { src: logo, width: 460, height: 200 }}
|
|
||||||
<img
|
<img
|
||||||
class="logo"
|
class="logo"
|
||||||
alt="Embroidery viewer logo."
|
alt="Embroidery viewer logo."
|
||||||
|
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Loading…
Reference in a new issue