BobLamarley
Layout and Pages
Hi guys,
I'm trying to have a pages/index.vue that route to components/HomePage.vue when connected and components/LandingPage.vue when non connected
And i also have layouts/default.vue for all pages when connected who contains a menu, and layouts/unauthenticated.vue for the LandingPage.vue only for now:
`
SO i have this code but the part :
definePageMeta({
layout: isAuthenticated.value ? 'default' : 'unauthenticated'
})
Is causing me an error :
index.vue?macro=true:2 Uncaught
ReferenceError: isAuthenticated is not defined
at index.vue?macro=true:2:11
Anyone has an idea ?
6 replies
Trying to get dynamically created ref
I'm trying to get ref that are dynamically created but it doesn't work very well
In my template i have :
where i'm creating a :ref=section-${indexsection} and index_section is 0,1,2,3etc
Then in my script i have:
But the console.log(document.querySelector([ref="section-${index}"]) ) give me null, as like it didn't has any ref section-0 for example, but there is because my template created it with the :ref=section-${index_section}
5 replies
SVG and CSS transitions
I'm trying to animate an svg but it doesn't work, it display the svg but doesn't interpret the CSS transitions properties in the <style scoped> part according to the svg
Is there something i need to configure in nuxt.config.js ?
Here is the playground:
https://stackblitz.com/edit/github-uzr4ak?file=public%2Flogo.svg,app.vue
14 replies