diff --git a/nuxt/app.vue b/nuxt/app.vue index 503788a..cfff88b 100644 --- a/nuxt/app.vue +++ b/nuxt/app.vue @@ -83,6 +83,7 @@ background: none; text-decoration: underline; width: fit-content; + z-index: 100; } footer { diff --git a/nuxt/components/Pojem.vue b/nuxt/components/Pojem.vue index 84ed8d9..a6068f6 100644 --- a/nuxt/components/Pojem.vue +++ b/nuxt/components/Pojem.vue @@ -3,6 +3,8 @@ import { stripHtml } from 'string-strip-html' const { etherFetch } = useEtherpadApi() +const { poskrolaj } = useUi() + const store = usePojmiStore() const route = useRoute() @@ -40,16 +42,15 @@ onMounted(() => { // Link na editiranje pojma? Poskrolaj nanj + odpri editiranje if (route.params.guid === revisionId.value) { urejanje.value = true - setTimeout(() => obrazec.value.scrollIntoView({ behavior: 'smooth' }), 50) } else { // Sicer samo poskrolaj na pojem - setTimeout(() => { - const sekcija = container.value.parentNode - console.log('skrolam?', sekcija) - if (sekcija) { - sekcija.scrollIntoView({ behavior: 'smooth' }) - } - }, 50) + poskrolaj(container.value.parentNode) + } +}) + +onUpdated(() => { + if (route.params.guid === revisionId.value) { + poskrolaj(obrazec.value) } }) @@ -62,11 +63,13 @@ onMounted(() => {

{{ naslov }}

- +
+ +
@@ -87,9 +90,12 @@ onMounted(() => { } form.pojem { + width: 100%; + } + + .obrazec { width: calc(50% - 32px); margin-left: 32px; - gap: 1rem; float: right; } @@ -106,8 +112,12 @@ onMounted(() => { width: 100%; } - form.pojem { + .obrazec { + width: 100%; margin-left: 0; + } + + form.pojem { min-height: 70vh; width: 100%; margin-left: 0; diff --git a/nuxt/components/PojemForm.vue b/nuxt/components/PojemForm.vue index 831e3ce..e99f015 100644 --- a/nuxt/components/PojemForm.vue +++ b/nuxt/components/PojemForm.vue @@ -78,6 +78,10 @@ const etherNalozen = ev => {