Skip to content

Commit 2d04bc3

Browse files
committed
feat(home-page): add home page content in nuxt app, fix docs pipeline
1 parent 89fc65a commit 2d04bc3

File tree

3 files changed

+84
-23
lines changed

3 files changed

+84
-23
lines changed

.github/workflows/docs_publish_vuepress.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Setup Node
1515
uses: actions/setup-node@v4
1616
with:
17-
node-version: "14"
17+
node-version: "20"
1818

1919
- name: Cache dependencies
2020
uses: actions/cache@v4

nuxt-app/layouts/default.vue

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,13 @@
88
key="Home"
99
to="/"
1010
>
11-
Appoij
11+
MyApp
1212
</NuxtLink>
1313
</h1>
1414

1515
<div>
1616
<Button @click="toggleDark" variant="secondary" size="icon" class="rounded-full mx-4">
17-
<Icon
18-
:icon="colorMode.preference == 'dark' ? 'radix-icons:moon' : 'radix-icons:sun'"
19-
class="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"
20-
/>
21-
<!-- <Icon icon="radix-icons:sun" class="absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" /> -->
17+
<Icon :icon="icon" class="h-[1.2rem] w-[1.2rem] transition-all" />
2218
</Button>
2319
<DropdownMenu>
2420
<DropdownMenuTrigger as-child>
@@ -139,11 +135,11 @@ import { Icon } from '@iconify/vue'
139135
140136
import { Button } from '@/components/ui/button'
141137
142-
import { DarkMode } from '#components';
143-
144138
import { useRoute, useRouter } from 'vue-router'
145139
import { useAuthStore } from '@/stores/authStore';
146140
import { useProfileStore } from '@/stores/profileStore';
141+
// import useColorMode from '@nuxtjs/color-mode'
142+
import { computed } from 'vue'
147143
148144
const authStore = useAuthStore();
149145
const {getIsAuthenticated} = storeToRefs(authStore);
@@ -168,7 +164,12 @@ const logout = async () => {
168164
};
169165
170166
const colorMode = useColorMode()
167+
168+
// Set the initial icon based on the current color mode
169+
const icon = computed(() => colorMode.preference === 'dark' ? 'radix-icons:moon' : 'radix-icons:sun')
170+
171+
// Toggle function to switch color mode
171172
const toggleDark = () => {
172-
colorMode.preference = colorMode.preference == 'dark' ? 'light' : 'dark';
173+
colorMode.preference = colorMode.preference === 'dark' ? 'light' : 'dark'
173174
}
174175
</script>

nuxt-app/pages/index.vue

Lines changed: 73 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,89 @@
11
<template>
2-
<h1 class="text-xl">Welcome</h1>
3-
<div>
4-
<div>
5-
Color mode: {{ colorMode.preference }}
6-
</div>
7-
<div>
8-
User authenticated? {{ isAuthenticated }}
9-
</div>
2+
<div class="min-h-screen transition-colors duration-300">
3+
<!-- Header Section -->
4+
<header class="container mx-auto px-4 py-6 flex justify-end items-center">
5+
<!-- Removed h1 title and toggle button -->
6+
</header>
7+
8+
<!-- Hero Section -->
9+
<main class="container mx-auto px-4 py-16 text-center">
10+
<h2 class="text-4xl md:text-5xl font-extrabold mb-4">
11+
Welcome to <span>MyApp</span>
12+
</h2>
13+
<p class="text-lg md:text-xl mb-8 max-w-2xl mx-auto">
14+
Experience the future of whatever MyApp does. Join us and explore the amazing possibilities.
15+
</p>
16+
<div class="space-x-4">
17+
<Button class="font-bold py-3 px-6 rounded-lg transition-colors shadow-md">
18+
Get Started
19+
</Button>
20+
<Button class="font-bold py-3 px-6 rounded-lg transition-colors shadow-md">
21+
Learn More
22+
</Button>
23+
</div>
24+
25+
<div class="mt-12 text-sm">
26+
User is currently: {{ isAuthenticated ? 'Authenticated' : 'Not Authenticated' }}
27+
</div>
28+
</main>
29+
30+
<!-- Placeholder for Features Section -->
31+
<section class="container mx-auto px-4 py-16 border-t">
32+
<h3 class="text-3xl font-bold text-center mb-12">Features</h3>
33+
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
34+
<!-- Feature 1 -->
35+
<Card>
36+
<CardHeader class="text-center">
37+
<CardTitle>Feature One</CardTitle>
38+
</CardHeader>
39+
<CardContent>
40+
<p>Description of the first amazing feature.</p>
41+
</CardContent>
42+
</Card>
43+
<!-- Feature 2 -->
44+
<Card>
45+
<CardHeader class="text-center">
46+
<CardTitle>Feature Two</CardTitle>
47+
</CardHeader>
48+
<CardContent>
49+
<p>Description of the second incredible feature.</p>
50+
</CardContent>
51+
</Card>
52+
<!-- Feature 3 -->
53+
<Card>
54+
<CardHeader class="text-center">
55+
<CardTitle>Feature Three</CardTitle>
56+
</CardHeader>
57+
<CardContent>
58+
<p>Description of the third awesome feature.</p>
59+
</CardContent>
60+
</Card>
61+
</div>
62+
</section>
63+
64+
<!-- Footer Section -->
65+
<footer class="container mx-auto px-4 py-6 text-center border-t">
66+
&copy; {{ new Date().getFullYear() }} MyApp. All rights reserved.
67+
</footer>
1068
</div>
1169
</template>
1270
<script setup lang="ts">
71+
import { Button } from '@/components/ui/button'
72+
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
73+
import { storeToRefs } from 'pinia';
1374
import { useAuthStore } from '@/stores/authStore';
14-
const colorMode = useColorMode();
75+
1576
const store = useAuthStore();
1677
const { isAuthenticated } = storeToRefs(store);
1778
1879
useHead({
19-
title: 'App',
80+
title: 'Welcome to MyApp',
2081
meta: [
21-
{ name: 'description', content: 'An app' }
82+
{ name: 'description', content: 'Discover the amazing features of MyApp.' }
2283
],
2384
bodyAttrs: {
24-
class: 'test'
85+
class: 'antialiased font-sans'
2586
},
26-
script: [ { innerHTML: 'console.log(\'Hello world\')' } ]
2787
})
2888
2989
</script>

0 commit comments

Comments
 (0)