From 5769c0cea6e673c02feb0304d9d1f8998eac9553 Mon Sep 17 00:00:00 2001 From: AlexBocken Date: Thu, 13 Jul 2023 15:25:42 +0200 Subject: [PATCH] click on title image for full image --- .../components/CreateIngredientList.svelte | 4 +- src/lib/components/CreateStepList.svelte | 3 +- src/lib/components/TitleImgParallax.svelte | 59 ++++++++++++++++++- 3 files changed, 60 insertions(+), 6 deletions(-) diff --git a/src/lib/components/CreateIngredientList.svelte b/src/lib/components/CreateIngredientList.svelte index 5893d7f..ac9cb56 100644 --- a/src/lib/components/CreateIngredientList.svelte +++ b/src/lib/components/CreateIngredientList.svelte @@ -253,12 +253,12 @@ dialog{ box-sizing: content-box; width: 100%; height: 100%; - background-color: rgba(255,255,255, 0.001); + background-color: transparent; border: unset; margin: 0; transition: 500ms; } -dialog[open]{ +dialog[open]::backdrop{ animation: show 200ms ease forwards; } @keyframes show{ diff --git a/src/lib/components/CreateStepList.svelte b/src/lib/components/CreateStepList.svelte index 4f3ffdc..7278f1e 100644 --- a/src/lib/components/CreateStepList.svelte +++ b/src/lib/components/CreateStepList.svelte @@ -248,7 +248,6 @@ dialog{ height: 100%; background-color: rgba(255,255,255, 0.001); border: unset; - backdrop-filter: blur(10px); margin: 0; transition: 200ms; } @@ -282,7 +281,7 @@ dialog .adder input::placeholder{ width: 70%; } } -dialog[open]{ +dialog[open]::backdrop{ animation: show 200ms ease forwards; } @keyframes show{ diff --git a/src/lib/components/TitleImgParallax.svelte b/src/lib/components/TitleImgParallax.svelte index 16bdc79..98aa76d 100644 --- a/src/lib/components/TitleImgParallax.svelte +++ b/src/lib/components/TitleImgParallax.svelte @@ -10,6 +10,18 @@ } }) + function show_dialog_img(){ + if(document.querySelector("img").complete){ + document.querySelector("#img_carousel").showModal(); + } + } + function close_dialog_img(){ + document.querySelector("#img_carousel").close(); + } + import Cross from "$lib/assets/icons/Cross.svelte"; + import "$lib/css/action_button.css"; + import "$lib/css/shake.css"; + import { do_on_key } from "./do_on_key";
-
+ +
- {isloaded=true}} alt=""/> + {isloaded=true}} alt=""/>
+ + +
+ + +
+