diff --git a/package-lock.json b/package-lock.json index 8fe6299..a8669a8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1198,6 +1198,11 @@ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, + "batch-processor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/batch-processor/-/batch-processor-1.0.0.tgz", + "integrity": "sha1-dclcMrdI4IUNEMKxaPa9vpiRrOg=" + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1403,6 +1408,14 @@ "integrity": "sha512-g5cGpg6rOCXxyfaLCQIWz9Fx+raFfbZ6sc4QLfvvaiCERBzY6YD6rh5d12QN++bEF1Tm9osYnxP37lbN/92j4A==", "dev": true }, + "element-resize-detector": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/element-resize-detector/-/element-resize-detector-1.2.1.tgz", + "integrity": "sha512-BdFsPepnQr9fznNPF9nF4vQ457U/ZJXQDSNF1zBe7yaga8v9AdZf3/NElYxFdUh7SitSGt040QygiTo6dtatIw==", + "requires": { + "batch-processor": "1.0.0" + } + }, "error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -2338,6 +2351,14 @@ "integrity": "sha512-OX/IBVUJSFo1rnznXdwf9rv6LReJ3qQ0PwRjj76vfUWyTfbHbR9OXqJBnUrpjyis2dwYcbT2Zm1DFjOOF1ZbbQ==", "dev": true }, + "svelte-watch-resize": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/svelte-watch-resize/-/svelte-watch-resize-1.0.3.tgz", + "integrity": "sha512-ktqTnkdqfx4YRqeMJcX1jeSnQ2kJUVlj4/rLdaLbhM+RrxN87vS2EZ0cxlGZ7eXV86Ef05Q3dVqEiR+12PeoIw==", + "requires": { + "element-resize-detector": "^1.1" + } + }, "terser": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/terser/-/terser-5.2.1.tgz", diff --git a/package.json b/package.json index 3c315cf..eaf73d5 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "sirv": "^1.0.0" }, "devDependencies": { + "svelte-watch-resize": "^1.0.3", "@babel/core": "^7.0.0", "@babel/plugin-syntax-dynamic-import": "^7.0.0", "@babel/plugin-transform-runtime": "^7.0.0", diff --git a/src/routes/index.svelte b/src/routes/index.svelte index bd2fa2f..84b44df 100644 --- a/src/routes/index.svelte +++ b/src/routes/index.svelte @@ -23,7 +23,7 @@ } .label { position: absolute; - font-size: calc(var(--font-size) / 1.7); + font-size: 20px !important; transition: .2s ease; } .label2:hover { @@ -269,7 +269,7 @@ height: 100vh; top: 0; left: 0; - trasnform: scale(1); + transform: scale(0.9); } } @@ -278,6 +278,7 @@ import Logo from '../components/logo.svelte'; import anime from 'animejs/lib/anime.es.js'; import { onMount, afterUpdate } from 'svelte'; + //import { watchResize } from 'svelte-watch-resize'; let clicked = false; let what = { @@ -369,6 +370,26 @@ return result; } + function resize() { + if (document.querySelector("#predseda")) { + let predseda = document.getElementById("predseda"); + let prebiram = document.getElementById("prebiram"); + let zapojit = document.getElementById("zapojit"); + let zalozit = document.getElementById("zalozit"); + let oborovky = document.getElementById("oborovky"); + let plusko = document.getElementById("plusko") + + what["predseda"] = [ predseda.clientHeight, predseda.clientWidth, predseda.offsetLeft, predseda.offsetTop ]; + what["prebiram"] = [ prebiram.clientHeight, prebiram.clientWidth, prebiram.offsetLeft, prebiram.offsetTop ]; + what["zapojit"] = [ zapojit.clientHeight, zapojit.clientWidth, zapojit.offsetLeft, zapojit.offsetTop ]; + what["zalozit"] = [ zalozit.clientHeight, zalozit.clientWidth, zalozit.offsetLeft, zalozit.offsetTop ]; + what["oborovky"] = [ oborovky.clientHeight, oborovky.clientWidth, oborovky.offsetLeft, oborovky.offsetTop ]; + what["plusko"] = [ plusko.clientHeight, plusko.clientWidth, plusko.offsetLeft, plusko.offsetTop ]; + + console.log(what); + } + } + onMount(() => { if (window.innerWidth <= 800) clicked = true; @@ -378,6 +399,7 @@ Spolky a SORky PedF UK | Chci se zapojit +