From 9e9aea930825b6f920e2f944960cabb4a73a12bb Mon Sep 17 00:00:00 2001 From: rexhent <dhannah10@outlook.com> Date: Tue, 2 Jul 2024 22:04:48 +1000 Subject: [PATCH 1/3] begin building homepage --- components/TheNav.vue | 4 +++- content/{0.index.md => 0.welcome.md} | 0 pages/index.vue | 12 ++++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) rename content/{0.index.md => 0.welcome.md} (100%) create mode 100644 pages/index.vue diff --git a/components/TheNav.vue b/components/TheNav.vue index 4239338..805b33a 100644 --- a/components/TheNav.vue +++ b/components/TheNav.vue @@ -4,10 +4,10 @@ const play = usePlaygroundStore() const guide = useGuideStore() const runtime = useRuntimeConfig() const commands = useCommandsStore() - const repo = 'https://github.com/nuxt/learn.nuxt.com' const buildTime = new Date(runtime.public.buildTime) const timeAgo = useTimeAgo(buildTime) +const route = useRoute() function downloadCurrentGuide() { if (!play.webcontainer) @@ -67,6 +67,7 @@ addCommands( :class="guide.embeddedDocs ? 'z-embedded-docs-raised' : ''" > <button + v-if="route.path === '/welcome'" rounded p2 hover="bg-active" title="Search" @@ -103,6 +104,7 @@ addCommands( </template> </VDropdown> <button + v-if="route.path === '/welcome'" rounded p2 title="Toggle terminal" hover="bg-active" diff --git a/content/0.index.md b/content/0.welcome.md similarity index 100% rename from content/0.index.md rename to content/0.welcome.md diff --git a/pages/index.vue b/pages/index.vue new file mode 100644 index 0000000..0823383 --- /dev/null +++ b/pages/index.vue @@ -0,0 +1,12 @@ +<template> + <TheNav /> + <!-- <div absolute top="1/2" left="1/2" translate=""> --> + <div h-screen flex items-center justify-center> + <nuxt-link to="/welcome"> + <button rounded bg-green-600 p-3> + Begin Tutorial + </button> + </nuxt-link> + </div> + <!-- Make Homepage --> +</template> From a600e8b81e3e75944dc0abb52cbc2b71e52b5c29 Mon Sep 17 00:00:00 2001 From: rexhent <dhannah10@outlook.com> Date: Tue, 2 Jul 2024 22:21:26 +1000 Subject: [PATCH 2/3] add about page --- components/TheNav.vue | 12 ++++++++++-- pages/about.vue | 4 ++++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 pages/about.vue diff --git a/components/TheNav.vue b/components/TheNav.vue index 805b33a..2bbf7b0 100644 --- a/components/TheNav.vue +++ b/components/TheNav.vue @@ -67,7 +67,7 @@ addCommands( :class="guide.embeddedDocs ? 'z-embedded-docs-raised' : ''" > <button - v-if="route.path === '/welcome'" + v-if="route.path === '/welcome' || route.path !== '/about'" rounded p2 hover="bg-active" title="Search" @@ -104,7 +104,7 @@ addCommands( </template> </VDropdown> <button - v-if="route.path === '/welcome'" + v-if="route.path === '/welcome' || route.path !== '/about'" rounded p2 title="Toggle terminal" hover="bg-active" @@ -114,6 +114,14 @@ addCommands( <div i-ph-terminal-window-duotone text-2xl /> </button> <ColorSchemeToggle /> + <NuxtLink + rounded p2 + title="About" + hover="bg-active" + to="/about" + > + <div i-carbon-help text-2xl /> + </NuxtLink> <NuxtLink rounded p2 title="GitHub" diff --git a/pages/about.vue b/pages/about.vue new file mode 100644 index 0000000..0fe6e1f --- /dev/null +++ b/pages/about.vue @@ -0,0 +1,4 @@ +<template> + <TheNav /> + <h1>About Page</h1> +</template> From d4eabfbbd25e63607292627df7e4ff14d09ba92b Mon Sep 17 00:00:00 2001 From: rexhent <dhannah10@outlook.com> Date: Tue, 2 Jul 2024 22:26:17 +1000 Subject: [PATCH 3/3] fix broken link to vue-basics page --- content/2.concepts/1.index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/2.concepts/1.index.md b/content/2.concepts/1.index.md index a15f0d4..3f34968 100644 --- a/content/2.concepts/1.index.md +++ b/content/2.concepts/1.index.md @@ -6,7 +6,7 @@ ogImage: true In this chapter, we will cover the core concepts of Nuxt. -Nuxt is a free and open-source framework with an intuitive and extendable way to create type-safe, performant and production-grade full-stack web applications and websites with Vue.js. If you are not familiar with Vue.js, we recommend you to start with the [Vue Basics](/vue/intro) section and read the [official Vue documentation](https://vuejs.org/) first. +Nuxt is a free and open-source framework with an intuitive and extendable way to create type-safe, performant and production-grade full-stack web applications and websites with Vue.js. If you are not familiar with Vue.js, we recommend you to start with the [Vue Basics](/vue) section and read the [official Vue documentation](https://vuejs.org/) first. ## Automation and Conventions