diff --git a/assets/css/app.css b/assets/css/app.css new file mode 100644 index 0000000..b879ab9 --- /dev/null +++ b/assets/css/app.css @@ -0,0 +1,103 @@ +/* Navbar */ + +.navbar .main { + background: #15171e; + color: white; +} + +.navbar a { + display: block; + color: white; +} + +.navbar span { + display: block; +} + +.navbar li img { + height: 24px; +} + +.nav-menu ul { + margin: 0; + padding: 0; + list-style: none; +} + +.nav-menu > ul { + display: flex; + /* align-items: center; */ +} + +.nav-menu > ul > li { + position: relative; + white-space: nowrap; + padding: 15px 25px; + text-align: center; +} + +.nav-menu li:hover { + position: relative; + background: #1a1c25; +} + +.nav-menu .active { + background: #1a1c25; +} + +.nav-menu .active::after { + position: absolute; + content: ""; + height: 2px; + bottom: 0; + width: 100%; + left: 0; + background: linear-gradient(90deg, #838281 0%, #ffba08 100%); +} + +/* Button */ +.button-solid-orange { + margin-left: 25px; + background: linear-gradient(90deg, #f26a3e 0%, #fb8133 100%); + border-radius: 5px; + color: #fff; + padding: 9px 25px 10px 25px; + white-space: nowrap; + transition: 0.3s; + font-size: 14px; + display: inline-block; + border: 0; + font-weight: normal; +} + +.button-solid-orange:hover { + background-position: 100%; + color: #fff; +} + +@media (max-width: 991px) { + .button-solid-orange { + margin: 0; + padding: 4px 10px 5px 10px; + } +} + + +/*-------------------Custom------------------*/ +.logo { + font-size: 30px; + margin: 0; + padding: 0; + line-height: 1; + font-weight: 500; + letter-spacing: 2px; + text-transform: uppercase; +} + +.logo a { + color: #fff; +} + +.logo img { + max-height: 56px; +} \ No newline at end of file diff --git a/components/Base/LoginDialog.vue b/components/Base/LoginDialog.vue new file mode 100644 index 0000000..f4e5f4b --- /dev/null +++ b/components/Base/LoginDialog.vue @@ -0,0 +1,82 @@ + + + \ No newline at end of file diff --git a/components/Base/Modal.vue b/components/Base/Modal.vue new file mode 100644 index 0000000..3acbe78 --- /dev/null +++ b/components/Base/Modal.vue @@ -0,0 +1,113 @@ + + + + diff --git a/components/Footer.vue b/components/Footer.vue index 57df54f..9959f45 100644 --- a/components/Footer.vue +++ b/components/Footer.vue @@ -277,12 +277,6 @@ class="white" >Blog -
- URL Shortener -
diff --git a/components/Navbar.vue b/components/Navbar.vue index 7e40e4d..fc3715c 100644 --- a/components/Navbar.vue +++ b/components/Navbar.vue @@ -1,87 +1,67 @@ diff --git a/middleware/auth.js b/middleware/auth.js index 1ba5814..044d672 100644 --- a/middleware/auth.js +++ b/middleware/auth.js @@ -2,8 +2,8 @@ import config from '~/config' export default async function ({ store, app: { $cookies }, $axios }) { const isAuthenticated = !!store.state.session.user - const session = $cookies.get(config.COOKIE_NAME) - const jwt = session?.authenticated?.jwt + const token = $cookies.get(config.COOKIE_NAME) + const jwt = token if (isAuthenticated || !jwt) { return; diff --git a/middleware/redirectLoggedInHome.js b/middleware/redirectLoggedInHome.js index 28e9aa8..08b6bdf 100644 --- a/middleware/redirectLoggedInHome.js +++ b/middleware/redirectLoggedInHome.js @@ -5,6 +5,11 @@ export default async function ({ store, route, redirect }) { const isAuthenticated = !!store.state.session.user if (isAuthenticated && route.name == 'index') { + const redirectionPath = process.client && localStorage.getItem('redirectionPath') + if(redirectionPath) { + localStorage.removeItem('redirectionPath') + return redirect(redirectionPath) + } return redirect('/app/') } } \ No newline at end of file diff --git a/nuxt.config.js b/nuxt.config.js index 0c0349c..41c276b 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -1,4 +1,5 @@ import config from './config' +import path from 'path'; export default { mode: 'universal', @@ -16,8 +17,9 @@ export default { ], link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }], script: [ - { src: 'https://unpkg.com/@coding-blocks/web-components@0.0.12/dist/index.js' }, - { src: 'https://code.jivosite.com/widget.js', 'data-jv-id': 'ASYGLZQ6UC' } + { src: 'https://unpkg.com/@coding-blocks/web-components@1.12.3/dist/index.js' }, + { src: 'https://code.jivosite.com/widget.js', 'data-jv-id': 'ASYGLZQ6UC' }, + { src: 'https://accounts.google.com/gsi/client', async: true, defer: true} ] }, /* @@ -28,7 +30,8 @@ export default { ** Global CSS */ css: [ - { src: '@coding-blocks/motley/dist/hb/app.min.css' } + { src: '@coding-blocks/motley/dist/hb/app.min.css' }, + { src: '~/assets/css/app.css'} ], /* ** Plugins to load before mounting the App @@ -37,6 +40,7 @@ export default { { src: './plugins/vue-carousel.js', mode: 'client' }, { src: './plugins/ga.js', mode: 'client' }, { src: './plugins/axios.js' }, + { src: './plugins/vuency.js' }, { src: './plugins/jsonapi-datastore.js' } ], /* @@ -65,6 +69,6 @@ export default { ** */ router: { - middleware: ['auth', 'redirectLoggedInHome'] + middleware: ['auth'] }, } diff --git a/package.json b/package.json index c301765..f9e8a8c 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "eslint-config-prettier": "^6.10.0", "eslint-plugin-nuxt": ">=0.4.2", "eslint-plugin-prettier": "^3.1.2", - "prettier": "2.0.2" + "prettier": "2.0.2", + "vuency": "^0.1.7" } } diff --git a/pages/contests/_id.vue b/pages/contests/_id/index.vue similarity index 100% rename from pages/contests/_id.vue rename to pages/contests/_id/index.vue diff --git a/pages/contests/_id/result-report.vue b/pages/contests/_id/result-report.vue new file mode 100644 index 0000000..60c1c14 --- /dev/null +++ b/pages/contests/_id/result-report.vue @@ -0,0 +1,578 @@ + + + diff --git a/pages/index.vue b/pages/index.vue index 168e7e8..1847a22 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -1,5 +1,15 @@