Skip to content

Commit b4a7bb6

Browse files
committed
Preparing for light and dark and plugins correct use
1 parent 4cd1bc9 commit b4a7bb6

File tree

7 files changed

+9
-24
lines changed

7 files changed

+9
-24
lines changed

frontend/app.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<nuxt-layout>
2+
<nuxt-layout name="default">
33
<nuxt-page></nuxt-page>
44
</nuxt-layout>
55
</template>

frontend/components/Navbar.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@
5353
let mode = ref(false);
5454
watch(mode, () => {
5555
if (!mode.value) {
56-
document.body.parentElement?.classList.add("dark");
5756
} else {
58-
document.body.parentElement?.classList.remove("dark");
5957
}
6058
});
6159
let toggleUI = {

frontend/pages/about/index.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<script setup lang="ts">
2-
import { definePageMeta } from "#imports";
32
import highlightjs from "~/assets/highlightjs.png";
43
import vue from "~/assets/vue.png";
54
import nitro from "~/assets/nitro.svg";
@@ -24,9 +23,6 @@ useAsyncData(async () => {
2423
myInfo.value = data2 ?? null;
2524
console.log(data2);
2625
});
27-
definePageMeta({
28-
layout: "default"
29-
});
3026
3127
useHead({
3228
title: "About Page"

frontend/pages/create/index.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ let pairedVales: Record<string, string> = {
3333
"<": ">",
3434
"`": "`"
3535
};
36-
definePageMeta({
37-
layout: "default"
38-
});
3936
4037
useHead({
4138
title: "Create Page"
@@ -200,7 +197,7 @@ function update(e = eKeyDefault) {
200197
<UAccordion :items="snipAccordian" size="xl">
201198
<template #default>
202199
<UButton color="emerald">
203-
<Icon :name="icons(langSelect)" />
200+
<Icon :name="iconFn(langSelect)" />
204201
{{ langLabels[langSelect] }}
205202
</UButton>
206203
</template>

frontend/pages/index.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ function goto() {
3030
navigateTo("/search/" + search.value);
3131
}
3232
33-
definePageMeta({
34-
layout: "default"
35-
});
36-
3733
onMounted(async function () {
3834
let search = document.querySelector<HTMLInputElement>("#search");
3935
if (search == null) return;

frontend/pages/search/[title].vue

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import "./../../app.css";
44
import hljs from "highlight.js";
55
import "highlight.js/styles/vs2015.css";
66
7-
import { useGQLFetch } from "~/plugins/gql-fetch";
7+
let langNamesPrint = useNuxtApp().$langNamesPrint as (lang: string) => string;
8+
let useGQLFetch = useNuxtApp().$useGQLFetch as UseGQLFetch;
89
910
let route = useRoute();
1011
let title: string = route.params.title;
@@ -27,12 +28,12 @@ const nuxtApp = useNuxtApp();
2728
2829
onMounted(async function () {
2930
if (nuxtApp.$useGQLFetch == undefined) return;
30-
({ data: titleFind.value, error: error.value } = await useGQLFetch<{
31-
titleFind: {
31+
({ data: titleFind.value, error: error.value } = await useGQLFetch<
32+
{
3233
langName: string;
3334
codeBoxes: { title: string; code: string }[];
34-
}[];
35-
}>(
35+
}[]
36+
>(
3637
"http://localhost:3300/",
3738
`#graphql
3839
{
@@ -93,9 +94,7 @@ onMounted(async function () {
9394
>
9495
<span class="truncate"
9596
>{{ index + 1 }}.
96-
{{
97-
useNuxtApp().$langNamesPrint(item.langName)
98-
}}</span
97+
{{ langNamesPrint(item.langName) }}</span
9998
>
10099

101100
<template #trailing>

frontend/pages/test/index.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ onMounted(async function () {
3939
"http://localhost:3300/",
4040
query
4141
));
42-
console.log(data.value, loading.value);
4342
});
4443
</script>
4544

0 commit comments

Comments
 (0)