summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2022-09-18 11:37:45 +0200
committerSanto Cariotti <santo@dcariotti.me>2022-09-18 11:37:45 +0200
commit814dee483b642bcbeee28a4b0c24014d26d794f2 (patch)
tree55b7631a7bcf226f89bf77f0828a78b5a98a08c4
parenta5918f0f4ebb3a0fb1fef1bb3ceeabd1ade2ae93 (diff)
Use layouts template
-rw-r--r--layouts/default.vue8
-rw-r--r--pages/index.vue6
-rw-r--r--pages/signin.vue58
-rw-r--r--pages/signup.vue102
4 files changed, 88 insertions, 86 deletions
diff --git a/layouts/default.vue b/layouts/default.vue
new file mode 100644
index 0000000..128a9c6
--- /dev/null
+++ b/layouts/default.vue
@@ -0,0 +1,8 @@
+<template>
+ <div>
+ <VHeader />
+ <main>
+ <Nuxt />
+ </main>
+ </div>
+</template>
diff --git a/pages/index.vue b/pages/index.vue
index 1e45510..75876fa 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -1,13 +1,11 @@
<template lang="pug">
- div
- VHeader(pageName="Home")
- main
- .mx-auto.max-w-7xl.py-6(class="sm:px-6 lg:px-8")
+ .mx-auto.max-w-7xl.py-6(class="sm:px-6 lg:px-8")
</template>
<script>
export default {
name: "IndexPage",
+ layout: "default",
head: {
title: "Verden - Social for 3D artists",
},
diff --git a/pages/signin.vue b/pages/signin.vue
index 4215204..b35c9fb 100644
--- a/pages/signin.vue
+++ b/pages/signin.vue
@@ -1,34 +1,31 @@
<template lang="pug">
- div
- VHeader
- main
- .mx-auto.max-w-7xl.py-6(class="sm:px-6 lg:px-8")
- .flex.min-h-full.items-center.justify-center.py-12.px-4(class="sm:px-6 lg:px-8")
- .w-full.max-w-md.space-y-8
+ .mx-auto.max-w-7xl.py-6(class="sm:px-6 lg:px-8")
+ .flex.min-h-full.items-center.justify-center.py-12.px-4(class="sm:px-6 lg:px-8")
+ .w-full.max-w-md.space-y-8
+ div
+ h2.mt-6.text-center.text-3xl.font-bold.tracking-tight.text-gray-900 Sign in
+ p.mt-2.text-center.text-sm.text-gray-600 Or
+ a.font-medium.text-indigo-600(class="hover:text-indigo-500" href="/signup") create a new account
+ form.mt-8.space-y-6(method="POST")
+ input(type="hidden" name="remember" value="true")
+ .-space-y-px.rounded-md.shadow-sm
div
- h2.mt-6.text-center.text-3xl.font-bold.tracking-tight.text-gray-900 Sign in
- p.mt-2.text-center.text-sm.text-gray-600 Or
- a.font-medium.text-indigo-600(class="hover:text-indigo-500" href="/signup") create a new account
- form.mt-8.space-y-6(method="POST")
- input(type="hidden" name="remember" value="true")
- .-space-y-px.rounded-md.shadow-sm
- div
- label.sr-only(for="username") Username
- input#username.relative.block.w-full.appearance-none.rounded-none.rounded-t-md.border.border-gray-300.px-3.py-2.text-gray-900.placeholder-gray-500(name="username" type="text" autocomplete="username" required class="focus:z-10 focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm" placeholder="Username" v-model="form.username")
- div
- label.sr-only(for="password") Password
- input#password.relative.block.w-full.appearance-none.rounded-none.rounded-b-md.border.border-gray-300.px-3.py-2.text-gray-900.placeholder-gray-500(name="password" type="password" autocomplete="current-password" required class="focus:z-10 focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm" placeholder="Password" v-model="form.password")
- .flex.items-center.justify-between
- .flex.items-center
- input#remember-me.h-4.w-4.rounded.border-gray-300.text-indigo-600(name="remember-me" type="checkbox" class="focus:ring-indigo-500")
- label.ml-2.block.text-sm.text-gray-900(for="remember-me") Remember me
- div
- button.group.relative.flex.w-full.justify-center.rounded-md.border.border-transparent.bg-indigo-600.py-2.px-4.text-sm.font-medium.text-white(type="submit" class="hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2" @click="save")
- span.absolute.inset-y-0.left-0.flex.items-center.pl-3
- // Heroicon name: mini/lock-closed
- svg.h-5.w-5.text-indigo-500(class="group-hover:text-indigo-400" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 20 20" fill="currentColor" aria-hidden="true")
- path(fill-rule="evenodd" d="M10 1a4.5 4.5 0 00-4.5 4.5V9H5a2 2 0 00-2 2v6a2 2 0 002 2h10a2 2 0 002-2v-6a2 2 0 00-2-2h-.5V5.5A4.5 4.5 0 0010 1zm3 8V5.5a3 3 0 10-6 0V9h6z" clip-rule="evenodd")
- | Sign in
+ label.sr-only(for="username") Username
+ input#username.relative.block.w-full.appearance-none.rounded-none.rounded-t-md.border.border-gray-300.px-3.py-2.text-gray-900.placeholder-gray-500(name="username" type="text" autocomplete="username" required class="focus:z-10 focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm" placeholder="Username" v-model="form.username")
+ div
+ label.sr-only(for="password") Password
+ input#password.relative.block.w-full.appearance-none.rounded-none.rounded-b-md.border.border-gray-300.px-3.py-2.text-gray-900.placeholder-gray-500(name="password" type="password" autocomplete="current-password" required class="focus:z-10 focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm" placeholder="Password" v-model="form.password")
+ .flex.items-center.justify-between
+ .flex.items-center
+ input#remember-me.h-4.w-4.rounded.border-gray-300.text-indigo-600(name="remember-me" type="checkbox" class="focus:ring-indigo-500")
+ label.ml-2.block.text-sm.text-gray-900(for="remember-me") Remember me
+ div
+ button.group.relative.flex.w-full.justify-center.rounded-md.border.border-transparent.bg-indigo-600.py-2.px-4.text-sm.font-medium.text-white(type="submit" class="hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2" @click="save")
+ span.absolute.inset-y-0.left-0.flex.items-center.pl-3
+ // Heroicon name: mini/lock-closed
+ svg.h-5.w-5.text-indigo-500(class="group-hover:text-indigo-400" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 20 20" fill="currentColor" aria-hidden="true")
+ path(fill-rule="evenodd" d="M10 1a4.5 4.5 0 00-4.5 4.5V9H5a2 2 0 00-2 2v6a2 2 0 002 2h10a2 2 0 002-2v-6a2 2 0 00-2-2h-.5V5.5A4.5 4.5 0 0010 1zm3 8V5.5a3 3 0 10-6 0V9h6z" clip-rule="evenodd")
+ | Sign in
</template>
@@ -36,7 +33,8 @@
import { mapGetters } from "vuex";
export default {
- name: "IndexPage",
+ name: "SignInPage",
+ layout: "default",
head: {
title: "Signin · Verden",
},
diff --git a/pages/signup.vue b/pages/signup.vue
index c2e6115..7f9e9ae 100644
--- a/pages/signup.vue
+++ b/pages/signup.vue
@@ -1,56 +1,53 @@
<template lang="pug">
- div
- VHeader
- main
- .mx-auto.max-w-7xl.py-6(class="sm:px-6 lg:px-8")
- .flex.min-h-full.items-center.justify-center.py-12.px-4(class="sm:px-6 lg:px-8")
- .w-full.max-w-md.space-y-8
+ .mx-auto.max-w-7xl.py-6(class="sm:px-6 lg:px-8")
+ .flex.min-h-full.items-center.justify-center.py-12.px-4(class="sm:px-6 lg:px-8")
+ .w-full.max-w-md.space-y-8
+ div
+ h2.mt-6.text-center.text-3xl.font-bold.tracking-tight.text-gray-900 Create a new account
+ p.mt-2.text-center.text-sm.text-gray-600 Or
+ a.font-medium.text-indigo-600(class="hover:text-indigo-500" href="/signin") sign in
+ form.mt-8.space-y-6(method="POST")
+ input(type="hidden" name="remember" value="true")
+ .-space-y-px.rounded-md.shadow-sm
div
- h2.mt-6.text-center.text-3xl.font-bold.tracking-tight.text-gray-900 Create a new account
- p.mt-2.text-center.text-sm.text-gray-600 Or
- a.font-medium.text-indigo-600(class="hover:text-indigo-500" href="/signin") sign in
- form.mt-8.space-y-6(method="POST")
- input(type="hidden" name="remember" value="true")
- .-space-y-px.rounded-md.shadow-sm
- div
- label.sr-only(for="email") Email
- input#email.relative.block.w-full.appearance-none.rounded-none.rounded-t-md.border.border-gray-300.px-3.py-2.text-gray-900.placeholder-gray-500(
- name="email" type="email" autocomplete="username" required
- class="focus:z-10 focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm border-2"
- :class="{'border-red-500 z-10' : errors.email }"
- placeholder="Email" v-model="form.email"
- )
- div
- label.sr-only(for="username") Username
- input#username.relative.block.w-full.appearance-none.rounded-none.border.border-gray-300.px-3.py-2.text-gray-900.placeholder-gray-500(
- name="username" type="text" autocomplete="username" required
- class="focus:z-10 focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm"
- :class="{'border-red-500 z-10' : errors.username }"
- placeholder="Username" v-model="form.username"
- )
- div
- label.sr-only(for="password1") Password
- input#password.relative.block.w-full.appearance-none.rounded-none.border.border-gray-300.px-3.py-2.text-gray-900.placeholder-gray-500(
- name="password1" type="password" autocomplete="current-password" required
- class="focus:z-10 focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm"
- :class="{'border-red-500 z-10' : errors.password1 }"
- placeholder="Password" v-model="form.password1"
- )
- div
- label.sr-only(for="password2") Repeat password
- input#password.relative.block.w-full.appearance-none.rounded-none.rounded-b-md.border.border-gray-300.px-3.py-2.text-gray-900.placeholder-gray-500(
- name="password2" type="password" autocomplete="current-password" required
- class="focus:z-10 focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm"
- :class="{'border-red-500 z-10' : errors.password2 }"
- placeholder="Repeat password" v-model="form.password2"
- )
- div
- button.group.relative.flex.w-full.justify-center.rounded-md.border.border-transparent.bg-indigo-600.py-2.px-4.text-sm.font-medium.text-white(type="submit" class="hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2" @click="save")
- span.absolute.inset-y-0.left-0.flex.items-center.pl-3
- // Heroicon name: mini/lock-closed
- svg.h-5.w-5.text-indigo-500(class="group-hover:text-indigo-400" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 20 20" fill="currentColor" aria-hidden="true")
- path(fill-rule="evenodd" d="M10 1a4.5 4.5 0 00-4.5 4.5V9H5a2 2 0 00-2 2v6a2 2 0 002 2h10a2 2 0 002-2v-6a2 2 0 00-2-2h-.5V5.5A4.5 4.5 0 0010 1zm3 8V5.5a3 3 0 10-6 0V9h6z" clip-rule="evenodd")
- | Sign up
+ label.sr-only(for="email") Email
+ input#email.relative.block.w-full.appearance-none.rounded-none.rounded-t-md.border.border-gray-300.px-3.py-2.text-gray-900.placeholder-gray-500(
+ name="email" type="email" autocomplete="username" required
+ class="focus:z-10 focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm border-2"
+ :class="{'border-red-500 z-10' : errors.email }"
+ placeholder="Email" v-model="form.email"
+ )
+ div
+ label.sr-only(for="username") Username
+ input#username.relative.block.w-full.appearance-none.rounded-none.border.border-gray-300.px-3.py-2.text-gray-900.placeholder-gray-500(
+ name="username" type="text" autocomplete="username" required
+ class="focus:z-10 focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm"
+ :class="{'border-red-500 z-10' : errors.username }"
+ placeholder="Username" v-model="form.username"
+ )
+ div
+ label.sr-only(for="password1") Password
+ input#password.relative.block.w-full.appearance-none.rounded-none.border.border-gray-300.px-3.py-2.text-gray-900.placeholder-gray-500(
+ name="password1" type="password" autocomplete="current-password" required
+ class="focus:z-10 focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm"
+ :class="{'border-red-500 z-10' : errors.password1 }"
+ placeholder="Password" v-model="form.password1"
+ )
+ div
+ label.sr-only(for="password2") Repeat password
+ input#password.relative.block.w-full.appearance-none.rounded-none.rounded-b-md.border.border-gray-300.px-3.py-2.text-gray-900.placeholder-gray-500(
+ name="password2" type="password" autocomplete="current-password" required
+ class="focus:z-10 focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm"
+ :class="{'border-red-500 z-10' : errors.password2 }"
+ placeholder="Repeat password" v-model="form.password2"
+ )
+ div
+ button.group.relative.flex.w-full.justify-center.rounded-md.border.border-transparent.bg-indigo-600.py-2.px-4.text-sm.font-medium.text-white(type="submit" class="hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2" @click="save")
+ span.absolute.inset-y-0.left-0.flex.items-center.pl-3
+ // Heroicon name: mini/lock-closed
+ svg.h-5.w-5.text-indigo-500(class="group-hover:text-indigo-400" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 20 20" fill="currentColor" aria-hidden="true")
+ path(fill-rule="evenodd" d="M10 1a4.5 4.5 0 00-4.5 4.5V9H5a2 2 0 00-2 2v6a2 2 0 002 2h10a2 2 0 002-2v-6a2 2 0 00-2-2h-.5V5.5A4.5 4.5 0 0010 1zm3 8V5.5a3 3 0 10-6 0V9h6z" clip-rule="evenodd")
+ | Sign up
</template>
@@ -58,7 +55,8 @@
import { mapGetters } from "vuex";
export default {
- name: "IndexPage",
+ name: "SignUpPage",
+ layout: "default",
head: {
title: "Signup · Verden",
},