manifest/nuxt/pages/manifest/index.vue

48 lines
1.0 KiB
Vue
Raw Normal View History

<script setup="setup">
2024-01-19 13:35:03 +01:00
const store = usePojmiStore()
const { poskrolaj } = useUi()
2024-04-01 21:20:07 +02:00
const { getRandomUUID } = useCrypto()
2024-01-08 01:05:54 +01:00
await store.naloziPojme()
2024-01-24 18:54:28 +01:00
const navodila = ref(null)
onMounted(() => {
if (location && location.hash == '#skrol') {
poskrolaj(navodila.value)
2024-01-24 18:54:28 +01:00
}
})
</script>
<template>
2024-04-01 19:59:09 +02:00
<h3 class="navodila" ref="navodila">{{ $t('Vsak lahko prispeva k vsebinam manifesta. Predlaga lahko nov pojem ali ureja, dopolni ali predela obstoječe.') }}</h3>
2024-04-01 21:20:07 +02:00
<NuxtLink class="gumb" :to="localePath({ name: 'pojem_dodaj', params: { guid: getRandomUUID() }})">
2024-04-01 19:59:09 +02:00
{{ $t('Dodaj nov pojem') }}
2024-01-19 13:35:03 +01:00
</NuxtLink>
<NuxtLink
v-for="pojem in Object.keys(store.pojmi)"
:naslov="pojem"
2024-04-01 21:20:07 +02:00
:to="localePath({ name: 'pojem_poglej', params: { naslov: encodeURIComponent(pojem) }})"
class="okvir">
<h2>{{ pojem }}</h2>
</NuxtLink>
</template>
<style scoped>
a {
clear: both;
}
h2 {
margin-bottom: 0;
}
2024-01-24 18:54:28 +01:00
.navodila {
padding-left: 2rem;
padding-right: 2rem;
text-align: center;
}
</style>