Skip to content

Commit

Permalink
Preparing for light and dark and plugins correct use
Browse files Browse the repository at this point in the history
  • Loading branch information
BhJaipal committed May 14, 2024
1 parent 4cd1bc9 commit b4a7bb6
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 24 deletions.
2 changes: 1 addition & 1 deletion frontend/app.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<nuxt-layout>
<nuxt-layout name="default">
<nuxt-page></nuxt-page>
</nuxt-layout>
</template>
Expand Down
2 changes: 0 additions & 2 deletions frontend/components/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@
let mode = ref(false);
watch(mode, () => {
if (!mode.value) {
document.body.parentElement?.classList.add("dark");
} else {
document.body.parentElement?.classList.remove("dark");
}
});
let toggleUI = {
Expand Down
4 changes: 0 additions & 4 deletions frontend/pages/about/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script setup lang="ts">
import { definePageMeta } from "#imports";
import highlightjs from "~/assets/highlightjs.png";
import vue from "~/assets/vue.png";
import nitro from "~/assets/nitro.svg";
Expand All @@ -24,9 +23,6 @@ useAsyncData(async () => {
myInfo.value = data2 ?? null;
console.log(data2);
});
definePageMeta({
layout: "default"
});
useHead({
title: "About Page"
Expand Down
5 changes: 1 addition & 4 deletions frontend/pages/create/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ let pairedVales: Record<string, string> = {
"<": ">",
"`": "`"
};
definePageMeta({
layout: "default"
});
useHead({
title: "Create Page"
Expand Down Expand Up @@ -200,7 +197,7 @@ function update(e = eKeyDefault) {
<UAccordion :items="snipAccordian" size="xl">
<template #default>
<UButton color="emerald">
<Icon :name="icons(langSelect)" />
<Icon :name="iconFn(langSelect)" />
{{ langLabels[langSelect] }}
</UButton>
</template>
Expand Down
4 changes: 0 additions & 4 deletions frontend/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ function goto() {
navigateTo("/search/" + search.value);
}
definePageMeta({
layout: "default"
});
onMounted(async function () {
let search = document.querySelector<HTMLInputElement>("#search");
if (search == null) return;
Expand Down
15 changes: 7 additions & 8 deletions frontend/pages/search/[title].vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import "./../../app.css";
import hljs from "highlight.js";
import "highlight.js/styles/vs2015.css";
import { useGQLFetch } from "~/plugins/gql-fetch";
let langNamesPrint = useNuxtApp().$langNamesPrint as (lang: string) => string;
let useGQLFetch = useNuxtApp().$useGQLFetch as UseGQLFetch;
let route = useRoute();
let title: string = route.params.title;
Expand All @@ -27,12 +28,12 @@ const nuxtApp = useNuxtApp();
onMounted(async function () {
if (nuxtApp.$useGQLFetch == undefined) return;
({ data: titleFind.value, error: error.value } = await useGQLFetch<{
titleFind: {
({ data: titleFind.value, error: error.value } = await useGQLFetch<
{
langName: string;
codeBoxes: { title: string; code: string }[];
}[];
}>(
}[]
>(
"http://localhost:3300/",
`#graphql
{
Expand Down Expand Up @@ -93,9 +94,7 @@ onMounted(async function () {
>
<span class="truncate"
>{{ index + 1 }}.
{{
useNuxtApp().$langNamesPrint(item.langName)
}}</span
{{ langNamesPrint(item.langName) }}</span
>

<template #trailing>
Expand Down
1 change: 0 additions & 1 deletion frontend/pages/test/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ onMounted(async function () {
"http://localhost:3300/",
query
));
console.log(data.value, loading.value);
});
</script>

Expand Down

0 comments on commit b4a7bb6

Please sign in to comment.