From cbdd40cb5ad50642114624f2ea252102d7281b1b Mon Sep 17 00:00:00 2001 From: Kevin ANATOLE Date: Sun, 8 Nov 2020 17:21:45 +0000 Subject: [PATCH] Home Page - Got a page design from TailwindUI - Added to the default layout - Added a header to the home page --- .eslintrc.js | 21 +- components/Navbar.vue | 6 + layouts/default.vue | 688 ++++++++++++++++++++++++++++++++++++++++-- nuxt.config.js | 2 +- pages/index.vue | 88 ++---- 5 files changed, 694 insertions(+), 111 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 95c13c7..4ba52ba 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,20 +1 @@ -module.exports = { - root: true, - env: { - browser: true, - node: true, - }, - parserOptions: { - parser: 'babel-eslint', - }, - extends: [ - '@nuxtjs', - 'prettier', - 'prettier/vue', - 'plugin:prettier/recommended', - 'plugin:nuxt/recommended', - ], - plugins: ['prettier'], - // add your custom rules here - rules: {}, -} +module.exports = {} diff --git a/components/Navbar.vue b/components/Navbar.vue index c673387..50d0bb8 100644 --- a/components/Navbar.vue +++ b/components/Navbar.vue @@ -12,6 +12,12 @@ export default { this.$store.commit('auth/setToken', null) this.$store.commit('auth/setLoggedIn', false) }, + async login() { + const token = await this.$magic.auth.loginWithMagicLink({ + email: this.email, + }) + this.$store.commit('auth/setToken', token) + }, }, } diff --git a/layouts/default.vue b/layouts/default.vue index a480f5a..f919f01 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -1,17 +1,674 @@ @@ -34,33 +691,4 @@ html { box-sizing: border-box; margin: 0; } - -.button--green { - display: inline-block; - border-radius: 4px; - border: 1px solid #3b8070; - color: #3b8070; - text-decoration: none; - padding: 10px 30px; -} - -.button--green:hover { - color: #fff; - background-color: #3b8070; -} - -.button--grey { - display: inline-block; - border-radius: 4px; - border: 1px solid #35495e; - color: #35495e; - text-decoration: none; - padding: 10px 30px; - margin-left: 15px; -} - -.button--grey:hover { - color: #fff; - background-color: #35495e; -} diff --git a/nuxt.config.js b/nuxt.config.js index b911566..acf0b82 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -22,7 +22,7 @@ export default { // Modules for dev and build (recommended) (https://go.nuxtjs.dev/config-modules) buildModules: [ // https://go.nuxtjs.dev/eslint - '@nuxtjs/eslint-module', + // '@nuxtjs/eslint-module', // https://go.nuxtjs.dev/tailwindcss '@nuxtjs/tailwindcss', ], diff --git a/pages/index.vue b/pages/index.vue index 1eef776..6290b09 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -1,22 +1,32 @@ @@ -30,51 +40,9 @@ export default { loading: false, } }, - methods: { - async login() { - const token = await this.$magic.auth.loginWithMagicLink({ - email: this.email, - }) - this.$store.commit('auth/setToken', token) - }, - }, + methods: {}, }