Skip to content

Commit d05c3f6

Browse files
committed
finnally learned how to use the layout feature of nuxt so I put the appheader into the newly created default.vue also created a circle that follows the mouse for aestheics I also removed the <AppHeader /> tag from every thing because they are now uneeded due to the default.vue
1 parent 849acbc commit d05c3f6

File tree

10 files changed

+25
-19
lines changed

10 files changed

+25
-19
lines changed

components/mouseDot.vue

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,29 @@
11
<template>
22
<div
33
ref="circle"
4-
class="bg-accent w-3 h-3 rounded-full absolute pointer-events-none"
4+
class="backdrop-invert w-3 h-3 rounded-full absolute pointer-events-none z-50"
55
></div>
66
</template>
77

88
<script>
9+
import { ref, onMounted } from "vue";
10+
911
export default {
1012
setup() {
1113
const circle = ref(null);
1214
1315
onMounted(() => {
14-
document.addEventListener("mousemove", (event) => {
15-
if (circle.value) {
16-
circle.value.style.left = event.clientX - 6 + "px";
16+
if (process.client) {
17+
document.addEventListener("mousemove", (event) => {
18+
if (circle.value) {
19+
const scrollX = window.scrollX || 0;
20+
const scrollY = window.scrollY || 0;
1721
18-
circle.value.style.top = event.clientY - 7 + "px";
19-
}
20-
});
22+
circle.value.style.left = event.clientX + scrollX - 6 + "px";
23+
circle.value.style.top = event.clientY + scrollY - 7 + "px";
24+
}
25+
});
26+
}
2127
});
2228
2329
return { circle };

layouts/default.vue

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<template>
2+
<div>
3+
<AppHeader />
4+
<MouseDot />
5+
<slot />
6+
</div>
7+
</template>
8+
9+
<script lang="ts" setup>
10+
import AppHeader from "~/components/AppHeader.vue";
11+
</script>

pages/gameDev/clothesConundrum/0.0.1.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<template>
2-
<AppHeader />
32
<h1 class="text-center font-bold pb-10 text-4xl">
43
Clothes Conundrum Version v0.0.1
54
</h1>

pages/gamedev.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<template>
2-
<AppHeader />
32
<h1 class="text-center text-5xl font-bold pb-5">Game Development</h1>
43
<p class="text-center text-xl px-10">
54
I have begun to learn game development as it is something that has

pages/index.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<template>
22
<div>
3-
<AppHeader />
4-
53
<!--Hero for name picture and description-->
64
<div class="hero min-h-screen">
75
<div class="hero-content flex-col lg:flex-row">

pages/project.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<template>
2-
<AppHeader />
3-
42
<h1 class="text-5xl font-bold text-center mb-10">Projects</h1>
53
<div class="divider px-10"></div>
64
<div

pages/projects/hitboxv1.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<template>
2-
<AppHeader />
32
<h1 class="text-5xl font-bold text-center mb-10">Hitbox v1</h1>
43
<div class="divider px-10"></div>
54
<div>
@@ -37,15 +36,14 @@
3736
</div>
3837
<div class="px-10">
3938
<p class="sm:px-5 md:px-10 mb-10">
40-
I decided to before makeing any other harware decisions that I should
39+
I decided to before making any other harware decisions that I should
4140
test GP2040-CE on the PS5 what I would be using for playing Tekken at
4241
the tournaments, and I goti it working however there was a catch. That
4342
being that the controller was actaully unable too play any games on the
4443
PS5
4544
</p>
4645
</div>
4746
</div>
48-
<mouseDot />
4947
</template>
5048
<script setup lang="ts">
5149
useHead({

pages/robotic/week2.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<template>
2-
<AppHeader />
32
<div>
43
<h1 class="text-5xl font-bold text-center mb-10">Week Two</h1>
54
<div class="sm:px-10 lg:px-44 mb-10">

pages/robotic/weekone.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<template>
2-
<AppHeader />
32
<div>
43
<h1 class="text-5xl font-bold text-center mb-10">
54
First Documented Build Log For the Into the Deep Season

pages/robotics.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<template>
22
<div>
3-
<AppHeader />
43
<h1 class="text-5xl font-bold text-center mb-10">Robotics page</h1>
54
<div class="sm:flex-none md:flex mx-10">
65
<div>

0 commit comments

Comments
 (0)