embroidery-viewer/src/App.svelte

57 lines
1.2 KiB
Svelte
Raw Normal View History

2022-11-10 20:46:23 +00:00
<script>
2022-11-11 13:57:53 +00:00
import FileViewer from "./lib/FileViewer.svelte";
2022-11-11 19:53:42 +00:00
import MediaQuery from "./lib/MediaQuery.svelte";
2022-11-11 13:57:53 +00:00
import logo from "./assets/logo.webp";
2022-11-11 19:53:42 +00:00
import logoMobile from "./assets/logo-mobile.webp";
2022-11-10 20:46:23 +00:00
</script>
<header>
2022-11-10 22:24:12 +00:00
<a href="/">
2022-11-11 19:53:42 +00:00
<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 }}
<img
class="logo"
alt="Embroidery viewer logo."
src={configs.src}
width={configs.width}
height={configs.height}
/>
</MediaQuery>
2022-11-10 22:24:12 +00:00
</a>
2022-11-10 20:46:23 +00:00
</header>
<main>
2022-11-11 13:45:57 +00:00
<FileViewer />
2022-11-10 20:46:23 +00:00
</main>
<footer>
2022-11-11 13:57:53 +00:00
<p>
Copyright © 2022 <a
href="https://leomurca.xyz"
target="_blank"
rel="noreferrer">Leonardo Murça</a
>.
</p>
2022-11-10 20:46:23 +00:00
</footer>
<style>
2022-11-11 19:53:42 +00:00
.logo {
background-image: logo;
}
2022-11-10 20:46:23 +00:00
main {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
2022-11-10 22:24:12 +00:00
box-sizing: border-box;
2022-11-11 19:53:42 +00:00
padding: 15px;
}
@media only screen and (max-device-width: 812px) {
.logo {
width: 100%;
padding: 20px;
}
2022-11-10 20:46:23 +00:00
}
</style>