From 9e248829d72654928584d17ba854073e30cbb850 Mon Sep 17 00:00:00 2001 From: janko Date: Fri, 19 Jan 2024 15:29:25 +0100 Subject: [PATCH] dodaj pojem center, pojem css na pojem.vue (se mi zdi da je to to) --- nuxt/app.vue | 6 +++++- nuxt/components/Pojem.vue | 30 +++++++++++++++++++++++------- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/nuxt/app.vue b/nuxt/app.vue index 9df617c..abcd90e 100644 --- a/nuxt/app.vue +++ b/nuxt/app.vue @@ -40,10 +40,14 @@ padding: 0 32px; } - .gumb { + a.gumb { text-decoration: underline; font-size: 3rem; color: var(--crna); + position: relative; + display: flex; + width: 100%; + justify-content: center; } .stran { diff --git a/nuxt/components/Pojem.vue b/nuxt/components/Pojem.vue index 5da6cfa..507ca26 100644 --- a/nuxt/components/Pojem.vue +++ b/nuxt/components/Pojem.vue @@ -16,7 +16,6 @@ const revisionId = computed(() => pojem.value.id) await store.naloziPojme() const urejanje = ref(false) - const container = ref(null) const urediPojem = async () => { @@ -33,12 +32,8 @@ onMounted(() => { // Link na pojem direktno? Poskrolaj nanj + odpri editiranje if (route.params.guid === revisionId.value) { urejanje.value = true - //const element = document.getElementById("pojem-obrazec") - //if (document.offsetWidth > 768) { - setTimeout(() => container.value.scrollIntoView({ - behavior: 'smooth' - }), 50) - //} + window.container = container + setTimeout(() => window.container.value.scrollIntoView(), 50) } }) @@ -63,6 +58,20 @@ onMounted(() => {