diff --git a/client/index.html b/client/index.html new file mode 100644 index 00000000..5832fde9 --- /dev/null +++ b/client/index.html @@ -0,0 +1,18 @@ + + + + + + skillBox + + + + + +
+
+
+
+ + + diff --git a/client/nuxt.config.js b/client/nuxt.config.js deleted file mode 100644 index 51bf1b53..00000000 --- a/client/nuxt.config.js +++ /dev/null @@ -1,43 +0,0 @@ -const webpack = require('webpack') - - -module.exports = { - build: { - plugins: [ - new webpack.ProvidePlugin({ - '_': 'lodash' - }) - ] - }, - css: [ - '~/assets/main.scss' - ], - router: { - base: process.env.NODE_ENV === 'production' ? '/static/' : '/' - }, - env: { - baseUrl: process.env.BASE_URL || 'http://localhost:3000' - }, - head: { - link: [ - {rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Montserrat:400,800'} - ] - }, - mode: 'spa', - modules: ['@nuxtjs/apollo'], - apollo: { - clientConfigs: { - default: { - httpEndpoint: 'http://localhost:8000/api/graphql/', - httpLinkOptions: { - credentials: 'same-origin' - }, - } - } - }, - plugins: [ - '~plugins/vue-axios', - '~plugins/vue-vimeo-player' - ], - srcDir: 'src/' -} diff --git a/client/package.json b/client/package.json index 4eeaa07e..af4f720d 100644 --- a/client/package.json +++ b/client/package.json @@ -5,7 +5,9 @@ "author": "maersu ", "private": true, "scripts": { - "dev": "nuxt", + "serve": "vue serve", + "nux": "nuxt", + "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", "build": "nuxt build", "start": "nuxt start", "heroku-postbuild": "npm run build" diff --git a/client/src/App.vue b/client/src/App.vue new file mode 100644 index 00000000..83444b89 --- /dev/null +++ b/client/src/App.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/client/src/assets/_variables.scss b/client/src/assets/_variables.scss new file mode 100644 index 00000000..30a5afc7 --- /dev/null +++ b/client/src/assets/_variables.scss @@ -0,0 +1,2 @@ +$red: blue; +$blue: orange; diff --git a/client/src/assets/main.scss b/client/src/assets/main.scss index 2f850ecf..96bbecaf 100644 --- a/client/src/assets/main.scss +++ b/client/src/assets/main.scss @@ -4,9 +4,13 @@ - https://seesparkbox.com/foundry/bem_by_example */ +@import 'variables'; @import 'typography'; + + .container { + color: $red; margin: 0 auto; width: 100%; max-width: 1440px; diff --git a/client/src/components/ModuleTeaser.vue b/client/src/components/ModuleTeaser.vue index 79af41f9..bf2ee3bb 100644 --- a/client/src/components/ModuleTeaser.vue +++ b/client/src/components/ModuleTeaser.vue @@ -16,6 +16,7 @@ height: 330px; width: 300px; border-radius: 12px; + color: $blue; &__image { width: 100%; diff --git a/client/src/main.js b/client/src/main.js new file mode 100644 index 00000000..ff8b7e5a --- /dev/null +++ b/client/src/main.js @@ -0,0 +1,29 @@ +import 'babel-polyfill' +import Vue from 'vue' +import axios from 'axios' +import VueAxios from 'vue-axios' +import VueVimeoPlayer from 'vue-vimeo-player' +import apolloClient from './graphql/client' +import VueApollo from 'vue-apollo' +import App from './App' +import router from './router' +import store from '@/store/index' + +Vue.config.productionTip = false + +Vue.use(VueApollo) +Vue.use(VueAxios, axios) +Vue.use(VueVimeoPlayer) + +const apolloProvider = new VueApollo({ + defaultClient: apolloClient +}) + +/* eslint-disable no-new */ +new Vue({ + el: '#app', + store, + router, + provide: apolloProvider.provide(), + render: h => h(App) +}) diff --git a/client/src/router/index.js b/client/src/router/index.js new file mode 100644 index 00000000..ceba4269 --- /dev/null +++ b/client/src/router/index.js @@ -0,0 +1,22 @@ +import Vue from 'vue' +import Router from 'vue-router' +import Dashboard from '@/pages/PageDashboard' +import NotFound from '@/pages/PageNotFound' + +const routerOptions = [ + { path: '/', name: 'dashboard', component: Dashboard }, + { path: '/dashboard', name: 'dashboard', component: Dashboard }, + { path: '*', component: NotFound } +] + +const routes = routerOptions.map(route => { + return { + ...route + } +}) + +Vue.use(Router) +export default new Router({ + routes, + mode: 'history' +}) diff --git a/client/vue.config.js b/client/vue.config.js new file mode 100644 index 00000000..adb5f4c4 --- /dev/null +++ b/client/vue.config.js @@ -0,0 +1,12 @@ +module.exports = { + css: { + loaderOptions: { + sass: { + data: ` + @import "@/assets/_variables.scss"; + @import "@/assets/main.scss"; + ` + } + } + } +}; diff --git a/server/core/settings.py b/server/core/settings.py index 91e653db..93fd5a54 100644 --- a/server/core/settings.py +++ b/server/core/settings.py @@ -201,7 +201,7 @@ STATIC_ROOT = os.path.join(BASE_DIR, 'static') STATIC_URL = '/static/' STATICFILES_DIRS = ( - os.path.join(BASE_DIR, '..', 'client/dist'), + os.path.join(BASE_DIR, '..', 'client/dist/static'), ) if not TEST: