Change logo file names and smal function refactor

This commit is contained in:
Leonardo Murça 2022-11-18 11:21:34 -03:00
parent 73dc3d4e09
commit 5e20ca53ce
3 changed files with 7 additions and 5 deletions

View file

@ -1,16 +1,18 @@
<script>
import FileViewer from "./lib/FileViewer.svelte";
import MediaQuery from "./lib/MediaQuery.svelte";
import logo from "./assets/logo.webp";
import logoMobile from "./assets/logo-mobile.webp";
import logo from "./assets/embroidery-viewer-logo.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>
<header>
<a href="/">
<MediaQuery query="(min-width: 481px) and (max-width: 812px)" let:matches>
{@const configs = matches
? { src: logoMobile, width: 350, height: 96 }
: { src: logo, width: 460, height: 200 }}
{@const configs = configsFor(matches)}
<img
class="logo"
alt="Embroidery viewer logo."

View file

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View file

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB