Skip to content

Commit

Permalink
add footer
Browse files Browse the repository at this point in the history
  • Loading branch information
Rauliqbal committed Oct 5, 2024
1 parent c5dff90 commit 7767a57
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 26 deletions.
12 changes: 8 additions & 4 deletions .nuxt/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import type { DefineComponent, SlotsType } from 'vue'
type IslandComponent<T extends DefineComponent> = T & DefineComponent<{}, {refresh: () => Promise<void>}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, SlotsType<{ fallback: { error: unknown } }>>
interface _GlobalComponents {
'CardSurat': typeof import("../components/CardSurat.vue")['default']
'HeaderNavbar': typeof import("../components/header/Navbar.vue")['default']
'Footer': typeof import("../components/Footer.vue")['default']
'Navbar': typeof import("../components/Navbar.vue")['default']
'ToggleMode': typeof import("../components/toggleMode.vue")['default']
'UAccordion': typeof import("../node_modules/@nuxt/ui/dist/runtime/components/elements/Accordion.vue")['default']
'UAlert': typeof import("../node_modules/@nuxt/ui/dist/runtime/components/elements/Alert.vue")['default']
Expand Down Expand Up @@ -90,7 +91,8 @@ interface _GlobalComponents {
'USlideovers': IslandComponent<typeof import("../node_modules/nuxt/dist/app/components/server-placeholder")['default']>
'NuxtRouteAnnouncer': IslandComponent<typeof import("../node_modules/nuxt/dist/app/components/server-placeholder")['default']>
'LazyCardSurat': typeof import("../components/CardSurat.vue")['default']
'LazyHeaderNavbar': typeof import("../components/header/Navbar.vue")['default']
'LazyFooter': typeof import("../components/Footer.vue")['default']
'LazyNavbar': typeof import("../components/Navbar.vue")['default']
'LazyToggleMode': typeof import("../components/toggleMode.vue")['default']
'LazyUAccordion': typeof import("../node_modules/@nuxt/ui/dist/runtime/components/elements/Accordion.vue")['default']
'LazyUAlert': typeof import("../node_modules/@nuxt/ui/dist/runtime/components/elements/Alert.vue")['default']
Expand Down Expand Up @@ -183,7 +185,8 @@ declare module 'vue' {
}

export const CardSurat: typeof import("../components/CardSurat.vue")['default']
export const HeaderNavbar: typeof import("../components/header/Navbar.vue")['default']
export const Footer: typeof import("../components/Footer.vue")['default']
export const Navbar: typeof import("../components/Navbar.vue")['default']
export const ToggleMode: typeof import("../components/toggleMode.vue")['default']
export const UAccordion: typeof import("../node_modules/@nuxt/ui/dist/runtime/components/elements/Accordion.vue")['default']
export const UAlert: typeof import("../node_modules/@nuxt/ui/dist/runtime/components/elements/Alert.vue")['default']
Expand Down Expand Up @@ -270,7 +273,8 @@ export const UModals: IslandComponent<typeof import("../node_modules/nuxt/dist/a
export const USlideovers: IslandComponent<typeof import("../node_modules/nuxt/dist/app/components/server-placeholder")['default']>
export const NuxtRouteAnnouncer: IslandComponent<typeof import("../node_modules/nuxt/dist/app/components/server-placeholder")['default']>
export const LazyCardSurat: typeof import("../components/CardSurat.vue")['default']
export const LazyHeaderNavbar: typeof import("../components/header/Navbar.vue")['default']
export const LazyFooter: typeof import("../components/Footer.vue")['default']
export const LazyNavbar: typeof import("../components/Navbar.vue")['default']
export const LazyToggleMode: typeof import("../components/toggleMode.vue")['default']
export const LazyUAccordion: typeof import("../node_modules/@nuxt/ui/dist/runtime/components/elements/Accordion.vue")['default']
export const LazyUAlert: typeof import("../node_modules/@nuxt/ui/dist/runtime/components/elements/Alert.vue")['default']
Expand Down
2 changes: 1 addition & 1 deletion .nuxt/manifest/latest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":"dev","timestamp":1728123471456}
{"id":"dev","timestamp":1728132253230}
2 changes: 1 addition & 1 deletion .nuxt/manifest/meta/dev.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":"dev","timestamp":1728123471456,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
{"id":"dev","timestamp":1728132253230,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
6 changes: 3 additions & 3 deletions .nuxt/nitro.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"date": "2024-10-05T10:18:19.423Z",
"date": "2024-10-05T12:44:37.428Z",
"preset": "nitro-dev",
"framework": {
"name": "nuxt",
Expand All @@ -9,9 +9,9 @@
"nitro": "2.9.7"
},
"dev": {
"pid": 29888,
"pid": 68558,
"workerAddress": {
"socketPath": "/tmp/nitro/worker-29888-1.sock"
"socketPath": "/tmp/nitro/worker-68558-1.sock"
}
}
}
2 changes: 1 addition & 1 deletion .nuxt/nuxt.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
/// <reference types="@nuxtjs/color-mode" />
/// <reference types="@nuxtjs/google-fonts" />
/// <reference types="@nuxt/image" />
/// <reference types="@nuxt/telemetry" />
/// <reference types="@nuxt/devtools" />
/// <reference types="@nuxt/telemetry" />
/// <reference types="nuxt" />
/// <reference path="types/app-defaults.d.ts" />
/// <reference path="types/plugins.d.ts" />
Expand Down
2 changes: 1 addition & 1 deletion .nuxt/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
"./tailwind.config/*"
],
"#app-manifest": [
"./manifest/meta/dev.json"
"./manifest/meta/dev"
],
"#build": [
"."
Expand Down
12 changes: 12 additions & 0 deletions components/Footer.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<script setup>
const since = new Date().getFullYear();
</script>
<template>
<footer class="py-6">
<p class="text-sm text-center text-slate-600 dark:text-slate-300">
&copy;
<span class="font-semibold">2022 - {{ since }}</span> Ngajee. All rights
reserved
</p>
</footer>
</template>
4 changes: 3 additions & 1 deletion components/header/Navbar.vue → components/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ const toggleTheme = () => {
<div class="flex items-center justify-between">
<div class="relative">
<NuxtLink to="/">
<h1 class="text-lg md:text-2xl font-semibold dark:text-slate-100">
<h1
class="text-lg md:text-2xl font-semibold text-primary dark:text-slate-100"
>
Ngajee.
</h1>
</NuxtLink>
Expand Down
21 changes: 11 additions & 10 deletions pages/dashboard.vue
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<script setup>
const { data: surat } = await useFetch("https://equran.id/api/v2/surat");
// const userName = ref(getItem("username"));
const userName = ref("username");
// function getItem(item) {
// if (process.client) {
// return localStorage.getItem(item);
// } else {
// return undefined;
// }
// }
const userName = ref(getItem("username"));
function getItem(item) {
if (process.client) {
return localStorage.getItem(item);
} else {
return undefined;
}
}
</script>
<template>
<div>
<HeaderNavbar />
<Navbar />
<main class="pt-24 container">
<div
class="bg-primary dark:bg-teal-900 flex flex-col px-6 py-4 rounded-2xl shadow-md"
Expand All @@ -36,5 +36,6 @@ const userName = ref("username");
/>
</div>
</main>
<Footer />
</div>
</template>
9 changes: 5 additions & 4 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
const isOpen = ref(true);
const name = ref("");
// definePageMeta({
// middleware: "auth",
// });
definePageMeta({
middleware: "auth",
});
function setName() {
if (process.client) {
localStorage.setItem("username", name.value);
navigateTo("/dashboard");
} else {
return undefined;
}
}
</script>
Expand Down Expand Up @@ -40,7 +42,6 @@ function setName() {
type="text"
placeholder="Masukkan Namamu"
v-model="name"
required
/>
</label>

Expand Down

0 comments on commit 7767a57

Please sign in to comment.