From 4b47a99b78b9b6aec44c5e377e1630305d383d79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurij=20Podgor=C5=A1ek?= Date: Fri, 19 Jan 2024 13:35:03 +0100 Subject: [PATCH] Popravki za dodajanje pojma --- nuxt/app.vue | 26 ++++++++++++++++++++++++- nuxt/components/DodajPojem.vue | 28 --------------------------- nuxt/components/Pojem.vue | 31 +++++++----------------------- nuxt/components/PojemForm.vue | 35 ++++++++++++++++++++-------------- nuxt/nuxt.config.js | 4 ++++ nuxt/pages/nov_pojem.vue | 35 ++++++++++++++++++++++++++++++++++ nuxt/pages/pojmi.vue | 10 ++++------ 7 files changed, 96 insertions(+), 73 deletions(-) delete mode 100644 nuxt/components/DodajPojem.vue create mode 100644 nuxt/pages/nov_pojem.vue diff --git a/nuxt/app.vue b/nuxt/app.vue index 1e36d51..9df617c 100644 --- a/nuxt/app.vue +++ b/nuxt/app.vue @@ -12,6 +12,7 @@ :root { --siva: #D9D9D9; --bela: #fff; + --crna: #000; --rdeca: #f00; --roza: #ED008C; } @@ -28,12 +29,23 @@ margin: .2rem 0 1rem 0; } + h2 { + text-transform: uppercase; + margin-top: 0; + } + .vsebina { position: relative; z-index: 50; padding: 0 32px; } + .gumb { + text-decoration: underline; + font-size: 3rem; + color: var(--crna); + } + .stran { position: relative; background: var(--bela); @@ -70,5 +82,17 @@ } } - + section.pojem { + position: relative; + background: var(--bela); + margin: 2rem; + border-radius: 24px; + padding: 2rem; + display: flex; + flex-wrap: wrap; + box-sizing: border-box; + max-width: 1216px; + margin-left: auto; + margin-right: auto; + } diff --git a/nuxt/components/DodajPojem.vue b/nuxt/components/DodajPojem.vue deleted file mode 100644 index f964720..0000000 --- a/nuxt/components/DodajPojem.vue +++ /dev/null @@ -1,28 +0,0 @@ - - - diff --git a/nuxt/components/Pojem.vue b/nuxt/components/Pojem.vue index b6f5d5a..5da6cfa 100644 --- a/nuxt/components/Pojem.vue +++ b/nuxt/components/Pojem.vue @@ -16,6 +16,7 @@ const revisionId = computed(() => pojem.value.id) await store.naloziPojme() const urejanje = ref(false) + const container = ref(null) const urediPojem = async () => { @@ -32,9 +33,12 @@ onMounted(() => { // Link na pojem direktno? Poskrolaj nanj + odpri editiranje if (route.params.guid === revisionId.value) { urejanje.value = true - window.container = container //const element = document.getElementById("pojem-obrazec") - setTimeout(() => window.container.value.scrollIntoView(), 50) + //if (document.offsetWidth > 768) { + setTimeout(() => container.value.scrollIntoView({ + behavior: 'smooth' + }), 50) + //} } }) @@ -59,41 +63,20 @@ onMounted(() => { diff --git a/nuxt/pages/pojmi.vue b/nuxt/pages/pojmi.vue index d4cf9b5..5cb6533 100644 --- a/nuxt/pages/pojmi.vue +++ b/nuxt/pages/pojmi.vue @@ -1,16 +1,14 @@