image logic / cdn update

This commit is contained in:
matthieu42morin 2024-01-30 10:26:41 +01:00
parent b424dae9ce
commit 2b358f92f2
7 changed files with 177 additions and 11 deletions

View File

@ -7,8 +7,8 @@
<!-- <div class="container px-5 py-8 mx-auto flex items-center sm:flex-row flex-col"> --> <!-- <div class="container px-5 py-8 mx-auto flex items-center sm:flex-row flex-col"> -->
<a class="flex items-center md:justify-start justify-center" href="/"> <a class="flex items-center md:justify-start justify-center" href="/">
<img class="w-4 h-4 md:w-8 md:h-8" src="/images/Logo.png" alt="logo" /> <img class="w-4 h-4 md:w-8 md:h-8" src="/images/Logo.png" alt="logo" />
<p class="sm:pl-4 text-base sm:py-2 sm:mt-0 mt-4">© 2023 Klára Morinová</p> <p class="sm:pl-4 text-base sm:py-2 sm:mt-0 mt-4"><i class="fa-regular fa-copyright"></i> 2023 Klára Morinová</p>
<a href="https://github.com/matthieu42morin" class="sm:pl-4 text-base sm:py-2 sm:mt-0 mt-4">Web vyvíjel Matthieu Morin</a> <a href="https://github.com/matthieu42morin" class="sm:pl-4 text-base sm:py-2 sm:mt-0 mt-4"><p class="sm:pl-4 text-base sm:py-2 sm:mt-0 mt-4">Web vyvíjel Matthieu Morin </p></a>
</a> </a>
</div> </div>
<hr class="opacity-20" /> <hr class="opacity-20" />

View File

@ -16,14 +16,15 @@
<svelte:fragment slot="trail"> <svelte:fragment slot="trail">
<!-- Links --> <!-- Links -->
<a href="/blog">Blog</a> <a class="flex-none" href="/fotogalerie">Fotogalerie</a>
<a href="/projects">Projects</a> <a class="flex-none" href="/sluzby">Služby</a>
<a href="/about">About</a> <a class="flex-none" href="/o-mne">O mně</a>
<!-- Social --> <!-- Social -->
<section class="hidden sm:inline-flex space-x-1"> <section class=" sm:inline-flex space-x-1">
<a <a
class="btn-icon hover:variant-soft-primary" class="brand-icon"
href="{config.instagram}" href="{config.instagram}"
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
@ -31,7 +32,7 @@
<i class="fa-brands fa-instagram text-lg" /> <i class="fa-brands fa-instagram text-lg" />
</a> </a>
<a <a
class="btn-icon hover:variant-soft-primary" class="brand-icon"
href="{config.facebook}" href="{config.facebook}"
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
@ -39,5 +40,21 @@
<i class="fa-brands fa-facebook text-lg" /> <i class="fa-brands fa-facebook text-lg" />
</a> </a>
</section> </section>
<section class="space-x-1">
<a
class=" btn btn-md variant-glass-secondary"
href="/sluzby"
target="_blank"
rel="noreferrer"
>
<span><i class="fa-regular fa-cart text-lg"/><h6 class="h6 semibold" >Objednejte se</h6></span>
</a>
</svelte:fragment> </svelte:fragment>
</AppBar> </AppBar>
<style lang="postcss">
.brand-icon {
@apply btn-icon hover:variant-soft-primary;
}
</style>

View File

@ -1,3 +0,0 @@
export async function getInstagramPosts() {
}

View File

@ -0,0 +1,33 @@
<section class="text-gray-600 body-font">
<div class="container px-5 py-24 mx-auto">
<div class="flex flex-wrap -m-4">
<div class="lg:w-1/3 lg:mb-0 mb-6 p-4">
<div class="h-full text-center">
<img alt="testimonial" class="w-20 h-20 mb-8 object-cover object-center rounded-full inline-block border-2 border-gray-200 bg-gray-100" src="https://dummyimage.com/302x302">
<p class="leading-relaxed">Edison bulb retro cloud bread echo park, helvetica stumptown taiyaki taxidermy 90's cronut +1 kinfolk. Single-origin coffee ennui shaman taiyaki vape DIY tote bag drinking vinegar cronut adaptogen squid fanny pack vaporware.</p>
<span class="inline-block h-1 w-10 rounded bg-indigo-500 mt-6 mb-4"></span>
<h2 class="text-gray-900 font-medium title-font tracking-wider text-sm">HOLDEN CAULFIELD</h2>
<p class="text-gray-500">Senior Product Designer</p>
</div>
</div>
<div class="lg:w-1/3 lg:mb-0 mb-6 p-4">
<div class="h-full text-center">
<img alt="testimonial" class="w-20 h-20 mb-8 object-cover object-center rounded-full inline-block border-2 border-gray-200 bg-gray-100" src="https://dummyimage.com/300x300">
<p class="leading-relaxed">Edison bulb retro cloud bread echo park, helvetica stumptown taiyaki taxidermy 90's cronut +1 kinfolk. Single-origin coffee ennui shaman taiyaki vape DIY tote bag drinking vinegar cronut adaptogen squid fanny pack vaporware.</p>
<span class="inline-block h-1 w-10 rounded bg-indigo-500 mt-6 mb-4"></span>
<h2 class="text-gray-900 font-medium title-font tracking-wider text-sm">ALPER KAMU</h2>
<p class="text-gray-500">UI Develeoper</p>
</div>
</div>
<div class="lg:w-1/3 lg:mb-0 p-4">
<div class="h-full text-center">
<img alt="testimonial" class="w-20 h-20 mb-8 object-cover object-center rounded-full inline-block border-2 border-gray-200 bg-gray-100" src="https://dummyimage.com/305x305">
<p class="leading-relaxed">Edison bulb retro cloud bread echo park, helvetica stumptown taiyaki taxidermy 90's cronut +1 kinfolk. Single-origin coffee ennui shaman taiyaki vape DIY tote bag drinking vinegar cronut adaptogen squid fanny pack vaporware.</p>
<span class="inline-block h-1 w-10 rounded bg-indigo-500 mt-6 mb-4"></span>
<h2 class="text-gray-900 font-medium title-font tracking-wider text-sm">HENRY LETHAM</h2>
<p class="text-gray-500">CTO</p>
</div>
</div>
</div>
</div>
</section>

119
src/lib/images.ts Normal file
View File

@ -0,0 +1,119 @@
type ImageLinkArgs = {
/** Image ID */
id: ImageKey;
/** Image Height */
h: number;
/** Image Width */
w: number;
/** Adds the fit=max query param */
max?: boolean;
};
export function getImageLink({ id, h, w, max }: ImageLinkArgs): string {
const path = images[id].raw;
return `${path}&w=${w}&h=${h}&auto=format&fit=${max ? 'max' : 'crop'}`;
}
type ImageKey = keyof typeof images;
export const images = {
oboci: {
raw: '/images/services/oboci.jpg'
},
linky: {
raw: 'https://images.unsplash.com/photo-1510111652602-195fc654aa83?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY0Nzl8&ixlib=rb-4.0.3',
},
'classic-linky': {
raw: 'https://images.unsplash.com/photo-1617296537916-291a105cd2f4?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY1MTl8&ixlib=rb-4.0.3'
},
'classic-linky+spodni': {
raw: 'https://images.unsplash.com/photo-1620562303747-ba21ca6f1530?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY2MjR8&ixlib=rb-4.0.3'
},
rty: {
raw: 'https://images.unsplash.com/photo-1597077962467-be16edcc6a43?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY2MzZ8&ixlib=rb-4.0.3'
},
'3d-rty': {
raw: 'https://images.unsplash.com/photo-1553184570-557b84a3a308?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY2NTF8&ixlib=rb-4.0.3'
},
aquarelle: {
raw: 'https://images.unsplash.com/photo-1509130446053-899ae7358ce6?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY2NjF8&ixlib=rb-4.0.3'
},
korekce: {
raw: 'https://images.unsplash.com/photo-1620005839871-7ac4aed5ddbc?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY2NzN8&ixlib=rb-4.0.3'
},
'oprava-oboci': {
raw: 'https://images.unsplash.com/photo-1597531072931-8fceba101e4e?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY2OTB8&ixlib=rb-4.0.3'
},
'zakladni-calm': {
raw: 'https://images.unsplash.com/photo-1612145342709-eadb6e22acca?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY3MDh8&ixlib=rb-4.0.3'
},
'zakladni-calm-plus': {
raw: 'https://images.unsplash.com/photo-1597077917598-97ca3922a317?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY3MjF8&ixlib=rb-4.0.3'
},
relaxacni: {
raw: 'https://images.unsplash.com/photo-1591775161903-497839a443c1?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY3MzR8&ixlib=rb-4.0.3'
},
'liftingove-anti-age': {
raw: 'https://images.unsplash.com/photo-1617296539691-67feaadf389e?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY3NjF8&ixlib=rb-4.0.3'
},
'clear-anti-akne': {
raw: 'https://images.unsplash.com/photo-1542835435-4fa357baa00b?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY3NzN8&ixlib=rb-4.0.3'
},
'odliceni-serum-alginatova-maska': {
raw: 'https://images.unsplash.com/photo-1603855873822-0931a843ee3a?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY3ODJ8&ixlib=rb-4.0.3'
},
'lifting-ras-booster': {
raw: 'https://images.unsplash.com/photo-1508931133503-b1944a4ecdd5?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY3OTV8&ixlib=rb-4.0.3'
},
'laminace-oboci-vyziva': {
raw: 'https://images.unsplash.com/photo-1633053663400-655b31fb88ac?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY4MDV8&ixlib=rb-4.0.3'
},
'uprava-oboci-tvar-barva': {
raw: 'https://images.unsplash.com/photo-1578170222009-c7893aa20afd?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY4MTZ8&ixlib=rb-4.0.3'
},
'uprava-oboci-rasy-tvar-barveni': {
raw: 'https://images.unsplash.com/photo-1610220941077-1ec123e7c043?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY4NjV8&ixlib=rb-4.0.3'
},
'depilace-horni-ret': {
raw: 'https://images.unsplash.com/photo-1605055618128-b2db3f874a0c?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY4Nzh8&ixlib=rb-4.0.3'
},
'depilace-brada': {
raw: 'https://images.unsplash.com/photo-1502768040783-423da5fd5fa0?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY4ODd8&ixlib=rb-4.0.3'
},
'depilace-oboci': {
raw: 'https://images.unsplash.com/photo-1423110041833-0d5dfcc552e1?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY4OTl8&ixlib=rb-4.0.3'
},
'depilace-tvare': {
raw: 'https://images.unsplash.com/photo-1516450360452-9312f5e86fc7?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY5MzR8&ixlib=rb-4.0.3'
},
'depilace-podpazi': {
raw: 'https://images.unsplash.com/photo-1516450360452-9312f5e86fc7?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY5MzR8&ixlib=rb-4.0.3'
},
'depilace-predlokti': {
raw: 'https://images.unsplash.com/photo-1516450360452-9312f5e86fc7?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY5MzR8&ixlib=rb-4.0.3'
},
'depilace-cele-ruce': {
raw: 'https://images.unsplash.com/photo-1516450360452-9312f5e86fc7?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY5MzR8&ixlib=rb-4.0.3'
},
'depilace-lytka': {
raw: 'https://images.unsplash.com/photo-1516450360452-9312f5e86fc7?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY5MzR8&ixlib=rb-4.0.3'
},
'depilace-cele-nohy': {
raw: 'https://images.unsplash.com/photo-1516450360452-9312f5e86fc7?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY5MzR8&ixlib=rb-4.0.3'
},
'vakuslim-48-zestihlujici-procedura-horni-koncetiny': {
raw: 'https://images.unsplash.com/photo-1516450360452-9312f5e86fc7?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY5MzR8&ixlib=rb-4.0.3'
},
'vakuslim-48-zestihlujici-procedura-spodni-cast-tela': {
raw: 'https://images.unsplash.com/photo-1516450360452-9312f5e86fc7?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY5MzR8&ixlib=rb-4.0.3'
},
'vakuslim-48-zestihlujici-procedura-komplet-horni-dolni-cast': {
raw: 'https://images.unsplash.com/photo-1516450360452-9312f5e86fc7?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY5MzR8&ixlib=rb-4.0.3'
},
'vakuslim-48-zestihlujici-procedura-6-o-setreni-predplatne-kompet': {
raw: 'https://images.unsplash.com/photo-1516450360452-9312f5e86fc7?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY5MzR8&ixlib=rb-4.0.3'
},
'vakuslim-48-zestihlujici-procedura-12-o-setreni-predplatne-komplet': {
raw: 'https://images.unsplash.com/photo-1516450360452-9312f5e86fc7?ixid=M3w0Njc5ODF8MHwxfGFsbHx8fHx8fHx8fDE2ODc5NzY5MzR8&ixlib=rb-4.0.3'
}
} as const;

0
src/lib/stores/hello.ts Normal file
View File