Merge branch 'feature/no-nuxt'
This commit is contained in:
commit
1efb11c4d6
|
|
@ -12,6 +12,3 @@ yarn-error.log*
|
||||||
*.ntvs*
|
*.ntvs*
|
||||||
*.njsproj
|
*.njsproj
|
||||||
*.sln
|
*.sln
|
||||||
|
|
||||||
# Nuxt Build
|
|
||||||
.nuxt
|
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ module.exports = {
|
||||||
extensions: ['.js', '.vue', '.json', '.gql', '.graphql'],
|
extensions: ['.js', '.vue', '.json', '.gql', '.graphql'],
|
||||||
alias: {
|
alias: {
|
||||||
'@': resolve('src'),
|
'@': resolve('src'),
|
||||||
|
'~': resolve('src'),
|
||||||
styles: resolve('styles')
|
styles: resolve('styles')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||||
|
<title>skillBox</title>
|
||||||
|
|
||||||
|
<link href='https://fonts.googleapis.com/css?family=Material+Icons' rel="stylesheet" type="text/css">
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Montserrat:500,800" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="app">
|
||||||
|
<div class="center">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- built files will be auto injected -->
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -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/'
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,17 +1,16 @@
|
||||||
{
|
{
|
||||||
"name": "frontend",
|
"name": "frontend",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "A Vue.js project",
|
"description": "skillBox vue client",
|
||||||
"author": "maersu <me@maersu.ch>",
|
"author": "pawel / ramon",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nuxt",
|
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
|
||||||
"build": "nuxt build",
|
"start": "npm run dev",
|
||||||
"start": "nuxt start",
|
"lint": "eslint --ext .js,.vue src",
|
||||||
"heroku-postbuild": "npm run build"
|
"build": "node build/build.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nuxtjs/apollo": "^4.0.0-rc1",
|
|
||||||
"apollo-cache-inmemory": "^1.2.2",
|
"apollo-cache-inmemory": "^1.2.2",
|
||||||
"apollo-client": "^2.3.2",
|
"apollo-client": "^2.3.2",
|
||||||
"apollo-link-http": "^1.5.4",
|
"apollo-link-http": "^1.5.4",
|
||||||
|
|
@ -49,7 +48,6 @@
|
||||||
"lodash": "^4.17.10",
|
"lodash": "^4.17.10",
|
||||||
"node-notifier": "^5.1.2",
|
"node-notifier": "^5.1.2",
|
||||||
"node-sass": "^4.9.2",
|
"node-sass": "^4.9.2",
|
||||||
"nuxt": "^1.4.2",
|
|
||||||
"optimize-css-assets-webpack-plugin": "^3.2.0",
|
"optimize-css-assets-webpack-plugin": "^3.2.0",
|
||||||
"ora": "^1.2.0",
|
"ora": "^1.2.0",
|
||||||
"portfinder": "^1.0.13",
|
"portfinder": "^1.0.13",
|
||||||
|
|
@ -57,12 +55,12 @@
|
||||||
"postcss-loader": "^2.0.8",
|
"postcss-loader": "^2.0.8",
|
||||||
"postcss-url": "^7.2.1",
|
"postcss-url": "^7.2.1",
|
||||||
"rimraf": "^2.6.0",
|
"rimraf": "^2.6.0",
|
||||||
"semver": "^5.3.0",
|
|
||||||
"sass-loader": "^7.1.0",
|
"sass-loader": "^7.1.0",
|
||||||
|
"semver": "^5.3.0",
|
||||||
"shelljs": "^0.7.6",
|
"shelljs": "^0.7.6",
|
||||||
"uglifyjs-webpack-plugin": "^1.1.1",
|
"uglifyjs-webpack-plugin": "^1.1.1",
|
||||||
"unfetch": "^3.1.1",
|
"unfetch": "^3.1.1",
|
||||||
"url-loader": "^0.5.8",
|
"url-loader": "^1.0.1",
|
||||||
"uuid": "^3.2.1",
|
"uuid": "^3.2.1",
|
||||||
"vue": "^2.5.17",
|
"vue": "^2.5.17",
|
||||||
"vue-apollo": "^3.0.0-beta.16",
|
"vue-apollo": "^3.0.0-beta.16",
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,24 @@
|
||||||
|
|
||||||
</aside>
|
</aside>
|
||||||
<main>
|
<main>
|
||||||
<nuxt/>
|
<router-view></router-view>
|
||||||
</main>
|
</main>
|
||||||
<footer>Footer</footer>
|
<footer>Footer</footer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'App',
|
||||||
|
data() {
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
@import "styles/main";
|
||||||
|
@import "@/assets/main.scss";
|
||||||
|
</style>
|
||||||
|
|
@ -4,8 +4,11 @@
|
||||||
- https://seesparkbox.com/foundry/bem_by_example
|
- https://seesparkbox.com/foundry/bem_by_example
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@import 'variables';
|
||||||
@import 'typography';
|
@import 'typography';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="module-teaser">
|
<div class="module-teaser">
|
||||||
<img src="~/assets/maggie.jpg" alt="" class="module-teaser__image">
|
<img src="@/assets/maggie.jpg" alt="" class="module-teaser__image">
|
||||||
<div class="module-teaser__body">
|
<div class="module-teaser__body">
|
||||||
<h3 class="module-teaser__meta-title">Modul 1</h3>
|
<h3 class="module-teaser__meta-title">Modul 1</h3>
|
||||||
<h3 class="module-teaser__title">Mein neues Umfeld</h3>
|
<h3 class="module-teaser__title">Mein neues Umfeld</h3>
|
||||||
|
|
@ -10,6 +10,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
@import "@/assets/_variables.scss";
|
||||||
|
|
||||||
.module-teaser {
|
.module-teaser {
|
||||||
box-shadow: 0 3px 9px 0 rgba(0, 0, 0, 0.12);
|
box-shadow: 0 3px 9px 0 rgba(0, 0, 0, 0.12);
|
||||||
border: 1px solid #E2E2E2;
|
border: 1px solid #E2E2E2;
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
})
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ALL_MODULES from '~/graphql/gql/allModules'
|
import ALL_MODULES from '@/graphql/gql/allModules'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ModuleTeaser from '~/components/ModuleTeaser.vue';
|
import ModuleTeaser from '@/components/ModuleTeaser.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
import axios from 'axios'
|
|
||||||
import VueAxios from 'vue-axios'
|
|
||||||
import Vue from 'vue'
|
|
||||||
|
|
||||||
Vue.use(VueAxios, axios)
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
import Vue from 'vue'
|
|
||||||
import VueVimeoPlayer from 'vue-vimeo-player'
|
|
||||||
|
|
||||||
Vue.use(VueVimeoPlayer)
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
import Vue from 'vue'
|
||||||
|
import Router from 'vue-router'
|
||||||
|
import Dashboard from '@/pages/PageDashboard'
|
||||||
|
import index from '@/pages/index'
|
||||||
|
import topic from '@/pages/topic'
|
||||||
|
import NotFound from '@/pages/PageNotFound'
|
||||||
|
|
||||||
|
const routerOptions = [
|
||||||
|
{path: '/', name: 'index', component: index},
|
||||||
|
{path: '/dashboard', name: 'dashboard', component: Dashboard},
|
||||||
|
{path: '/topic', name: 'topic', component: topic},
|
||||||
|
{path: '*', component: NotFound}
|
||||||
|
]
|
||||||
|
|
||||||
|
const routes = routerOptions.map(route => {
|
||||||
|
return {
|
||||||
|
...route
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
Vue.use(Router)
|
||||||
|
export default new Router({
|
||||||
|
routes,
|
||||||
|
mode: 'history'
|
||||||
|
})
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
module.exports = {
|
||||||
|
css: {
|
||||||
|
loaderOptions: {
|
||||||
|
sass: {
|
||||||
|
data: `
|
||||||
|
@import "@/assets/_variables.scss";
|
||||||
|
@import "@/assets/main.scss";
|
||||||
|
`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
@ -94,7 +94,6 @@ if DEBUG:
|
||||||
MIDDLEWARE += ['corsheaders.middleware.CorsMiddleware']
|
MIDDLEWARE += ['corsheaders.middleware.CorsMiddleware']
|
||||||
CORS_ORIGIN_WHITELIST = (
|
CORS_ORIGIN_WHITELIST = (
|
||||||
'localhost:8080',
|
'localhost:8080',
|
||||||
'localhost:3000',
|
|
||||||
)
|
)
|
||||||
CORS_ALLOW_CREDENTIALS = True
|
CORS_ALLOW_CREDENTIALS = True
|
||||||
|
|
||||||
|
|
@ -201,7 +200,7 @@ STATIC_ROOT = os.path.join(BASE_DIR, 'static')
|
||||||
STATIC_URL = '/static/'
|
STATIC_URL = '/static/'
|
||||||
|
|
||||||
STATICFILES_DIRS = (
|
STATICFILES_DIRS = (
|
||||||
os.path.join(BASE_DIR, '..', 'client/dist'),
|
os.path.join(BASE_DIR, '..', 'client/dist/static'),
|
||||||
)
|
)
|
||||||
|
|
||||||
if not TEST:
|
if not TEST:
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@ class PrivateGraphQLView(LoginRequiredMixin, GraphQLView):
|
||||||
def home(request):
|
def home(request):
|
||||||
if settings.DEBUG:
|
if settings.DEBUG:
|
||||||
try:
|
try:
|
||||||
return HttpResponse(requests.get('http://localhost:3000/{}'.format(request.get_full_path())).text)
|
return HttpResponse(requests.get('http://localhost:8080/{}'.format(request.get_full_path())).text)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print('Can not connect to dev server at http://localhost:3000:', e)
|
print('Can not connect to dev server at http://localhost:8080:', e)
|
||||||
|
|
||||||
return render(request, 'index.html', {})
|
return render(request, 'index.html', {})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue