embroidery-viewer/src/App.svelte

86 lines
1.9 KiB
Svelte
Raw Normal View History

2022-11-10 20:46:23 +00:00
<script>
2022-11-22 12:34:50 +00:00
import SvelteSeo from "svelte-seo";
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";
import logo from "./assets/embroidery-viewer-logo.webp";
import logoMobile from "./assets/embroidery-viewer-logo-mobile.webp";
2022-11-22 12:34:50 +00:00
import thumbnail from "./assets/thumbnail.webp";
function configsFor(matches) {
2022-11-22 12:34:50 +00:00
return matches
? { src: logoMobile, width: 350, height: 96 }
: { src: logo, width: 460, height: 200 };
}
2022-11-10 20:46:23 +00:00
</script>
2022-11-22 12:34:50 +00:00
<SvelteSeo
title="Embroidery Viewer"
description="A free online tool to view embroidery files."
keywords="Free Emrbroidery Viewer, embroidery design, sewing machine, preview .pes files, preview embroider designs, brother machine."
/>
<SvelteSeo
openGraph={{
title: "Embroidery Viewer",
description: "A free online tool to view embroidery files.",
url: "https://embroideryviewer.xyz/",
type: "website",
images: [
{
url: thumbnail,
width: 1200,
height: 630,
alt: "Embroidery viewer thumbnail.",
},
],
}}
/>
2022-11-10 20:46:23 +00:00
<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 = configsFor(matches)}
2022-11-11 19:53:42 +00:00
<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>