Compare commits

...

3 Commits

Author SHA1 Message Date
janko 7dce205f2c Merge branch 'nuxt-pojem-form' of git.kompot.si:yufu/manifest into nuxt-pojem-form 2024-01-17 20:36:14 +01:00
janko 9e5cd462a8 oblikoanje forma 1 2024-01-17 20:35:42 +01:00
janko df5048e4e1 max sirina na pojmih itd. 2024-01-17 19:05:12 +01:00
3 changed files with 61 additions and 18 deletions

View File

@ -13,6 +13,7 @@
--siva: #D9D9D9;
--bela: #fff;
--rdeca: #f00;
--roza: #ED008C;
}
body {
@ -30,6 +31,7 @@
.vsebina {
position: relative;
z-index: 50;
padding: 0 32px;
}
.stran {
@ -53,13 +55,12 @@
.gumb {
font-family: Trailers;
font-size: 2rem;
font-size: 3rem;
cursor: pointer;
}
.etherpad-textarea {
height: 25rem;
width: 100%;
border: none;
background: none;
text-decoration: underline;
width: fit-content;
}
</style>

View File

@ -46,7 +46,11 @@ onMounted(() => {
<h2>{{ pojem.naslov }}</h2>
<div class="tekst" v-html="pojem.tekst" />
</div>
<PojemForm v-if="urejanje" :revisionId="revisionId" :pojem="pojem" :urejanje="urejanje" />
<PojemForm v-if="urejanje"
:revisionId="revisionId"
:pojem="pojem"
:urejanje="urejanje"
:onZapri="()=>urejanje=false" />
<div>
<div v-if="!urejanje" class="gumb" @click="urediPojem">Uredi</div>
</div>
@ -54,7 +58,7 @@ onMounted(() => {
</template>
<style scoped>
.pojem {
section.pojem {
position: relative;
background: var(--bela);
margin: 2rem;
@ -63,9 +67,18 @@ onMounted(() => {
display: flex;
flex-wrap: wrap;
box-sizing: border-box;
max-width: 1216px;
margin-left: auto;
margin-right: auto;
}
.pojem > div {
form.pojem {
width: calc(50% - 32px);
margin-left: 32px;
gap: 1rem;
}
.pojem > div {
position: relative;
width: 50%;
}

View File

@ -7,7 +7,8 @@ const store = usePojmiStore()
const props = defineProps({
revisionId: String,
pojem: Object,
urejanje: Object
urejanje: Object,
onZapri: Function
})
let naslov = ref(props.pojem.naslov)
@ -35,18 +36,46 @@ const etherNalozen = ev => {
</script>
<template>
<section class="pojem">
<form class="pojem" @submit.prevent="oddajPredlog">
<label for="naslov">Naslov</label>
<input name="naslov" type="text" v-model="naslov">
<label for="tekst">Besedilo</label>
<EtherpadTextarea :onLoad="etherNalozen" :revisionId="props.revisionId" />
<label for="email">E-poštni naslov</label>
<input name="email" type="email" v-model="email">
<input type="submit" value="Predlagaj">
<input name="email" type="email" placeholder="E-poštni naslov" v-model="email">
<div class="gumbi">
<button class="gumb" @click="props.onZapri">Zapri</button>
<input class="gumb" type="submit" value="Predlagaj">
</div>
</form>
</section>
</template>
<style>
.etherpad-textarea {
width: 100%;
flex-grow: 1;
border-radius: 16px;
border: 2px solid var(--siva);
}
input {
border: 2px solid var(--siva);
border-radius: 8px;
padding: 15px;
}
.gumbi {
display: flex;
flex-direction: row;
justify-content: space-between;
}
.pojem.form .gumb {
width: 50%;
}
.pojem input[type=submit] {
color: var(--roza);
}
</style>