Trauma Zombie
Trauma Zombie
Explore posts from servers
NNuxt
Created by Trauma Zombie on 10/14/2024 in #❓・help
SOLVED: How to get full URL including domain?
Hi guys, how to get full URL of current page including domain?
useRoute().fullPath
useRoute().fullPath
returns it without domain.
4 replies
NNuxt
Created by Trauma Zombie on 6/19/2023 in #❓・help
Codegen node is missing for element/if/for node. Apply appropriate transforms first.
Hey guys, can you help me? I am getting this error: Codegen node is missing for element/if/for node. Apply appropriate transforms first. I have custom layout auth.vue:
<template>
<slot name="header" />
<slot />
<slot name="footer" />
</template>
<template>
<slot name="header" />
<slot />
<slot name="footer" />
</template>
Then I have page login.vue:
<script setup lang="ts">
definePageMeta({
layout: 'auth',
middleware: 'guest'
})
</script>
<template>
<template #header>
//
</template>
<form>
//
</form>
<template #footer>
//
</template>
</template>
<script setup lang="ts">
definePageMeta({
layout: 'auth',
middleware: 'guest'
})
</script>
<template>
<template #header>
//
</template>
<form>
//
</form>
<template #footer>
//
</template>
</template>
1 replies
NNuxt
Created by Trauma Zombie on 2/8/2023 in #❓・help
How to create contact form for static site?
Hey guys, can you help me with contact form with SMTP server for static sites generated with nuxi generate? Is it even possible?
2 replies
NNuxt
Created by Trauma Zombie on 2/7/2023 in #❓・help
Am I right with useServerSeoMeta?
Hey guys, I am trying to setup SEO meta tags. I found useServerSeoMeta, but I have a question. When I want to use titleTemplate inside useHead on my app.vue and then on each page I want to setup title and description I have to do it like this:
<script setup>
useHead({
title: 'Home',
});

useServerSeoMeta({
// title: 'Home - My Site',
description: 'My Description',
});
</script>
<script setup>
useHead({
title: 'Home',
});

useServerSeoMeta({
// title: 'Home - My Site',
description: 'My Description',
});
</script>
When I try to use title from my useServerSeoMeta function it doesn't use titleTemplate from my app.vue. Is there any option to do it simpler?
2 replies
NNuxt
Created by Trauma Zombie on 1/20/2023 in #❓・help
Help with GSAP animations
Hey guys, I am trying to setup animations for my fullscreen menu. When I click button I see the menu, but links are not animated.
<script setup>
import { ref, onMounted, onUnmounted } from 'vue';
import gsap from 'gsap';

const showNavigation = ref(false);
const timeline = gsap.timeline({paused: true});

function toggleNavigation() {
showNavigation.value = true;
timeline.reversed(!timeline.reversed());
}

onMounted(() => {
timeline
.addLabel('navigation')
.to(
'ul#main-navigation li',
{
webkitClipPath: 'polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)',
clipPath: 'polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)',
duration: 1,
stagger: 0.1,
},
'navigation'
)
.to(
'ul#main-navigation li a',
{
y: 0,
duration: 1,
stagger: 0.1,
},
'navigation'
)
.reverse();
});
</script>
<script setup>
import { ref, onMounted, onUnmounted } from 'vue';
import gsap from 'gsap';

const showNavigation = ref(false);
const timeline = gsap.timeline({paused: true});

function toggleNavigation() {
showNavigation.value = true;
timeline.reversed(!timeline.reversed());
}

onMounted(() => {
timeline
.addLabel('navigation')
.to(
'ul#main-navigation li',
{
webkitClipPath: 'polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)',
clipPath: 'polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)',
duration: 1,
stagger: 0.1,
},
'navigation'
)
.to(
'ul#main-navigation li a',
{
y: 0,
duration: 1,
stagger: 0.1,
},
'navigation'
)
.reverse();
});
</script>
2 replies
NNuxt
Created by Trauma Zombie on 1/9/2023 in #❓・help
Problem with formatting
2 replies
NNuxt
Created by Trauma Zombie on 11/19/2022 in #❓・help
How to simply integrate Fathom Analytics?
Hey guys, I am trying to figure it out how to implement Fathom Analytics as plugin in Nuxt3 without any other package. I created plugin in my plugins folder: fathom.client.ts, but I am not sure if I am right. Can you help me?
import * as Fathom from 'fathom-client';

export default defineNuxtPlugin((nuxtApp) => {
Fathom.load('###', {
url: '###',
});

Fathom.trackPageview();
});
import * as Fathom from 'fathom-client';

export default defineNuxtPlugin((nuxtApp) => {
Fathom.load('###', {
url: '###',
});

Fathom.trackPageview();
});
If it is possible I want to define variables in my nuxt.config.ts file like this:
export default defineNuxtConfig({
fathom: {
siteId: '###',
url: '###',
},
});
export default defineNuxtConfig({
fathom: {
siteId: '###',
url: '###',
},
});
5 replies