Initial commit. Add application skeleton

This commit is contained in:
2019-02-16 12:29:33 +07:00
commit 03ce30468c
25 changed files with 8395 additions and 0 deletions

3
.browserslistrc Normal file
View File

@@ -0,0 +1,3 @@
> 1%
last 2 versions
not ie <= 8

17
.eslintrc.js Normal file
View File

@@ -0,0 +1,17 @@
module.exports = {
root: true,
env: {
node: true
},
'extends': [
'plugin:vue/essential',
'eslint:recommended'
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
},
parserOptions: {
parser: 'babel-eslint'
}
}

23
.gitignore vendored Normal file
View File

@@ -0,0 +1,23 @@
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
docker-compose.override.yml

16
Dockerfile Normal file
View File

@@ -0,0 +1,16 @@
FROM node:10.15.0-alpine
RUN npm config set cache /opt/pub/.npm
RUN apk upgrade --update \
&& apk add --no-cache curl yarn git
RUN yarn global add @vue/cli
ARG WEB_USER_ID=33
ARG WEB_USER_NAME=www-data
RUN echo "Building for web user: id=${WEB_USER_ID} name=${WEB_USER_NAME}"
RUN adduser -D -u ${WEB_USER_ID} ${WEB_USER_NAME} || echo "Users exists"
USER ${WEB_USER_ID}
CMD ["yarn", "serve"]

16
README.md Normal file
View File

@@ -0,0 +1,16 @@
# Ich Lerne Deutsch
## Project setup
```
yarn install
```
### Compiles and hot-reloads for development
```
yarn run serve
```
### Compiles and minifies for production
```
yarn run build
```

5
babel.config.js Normal file
View File

@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/app'
]
}

16
docker-compose.yml Normal file
View File

@@ -0,0 +1,16 @@
version: '3'
services:
app:
build:
context: ./
args:
WEB_USER_ID: 33
WEB_USER_NAME: www-data
working_dir: /var/www/vue
expose:
- 8000
- 8080
volumes:
- .:/var/www/vue

31
package.json Normal file
View File

@@ -0,0 +1,31 @@
{
"name": "dannc-ich-lerne-deutsch",
"author": {
"name": "Daniel Savosin",
"email": "dannc.sao@gmail.com",
"url": "https://dannecron.bitbucket.io"
},
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"material-design-icons-iconfont": "^4.0.4",
"vue": "^2.5.22",
"vue-router": "^3.0.1",
"vuetify": "^1.5.1",
"vuex": "^3.0.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.4.0",
"@vue/cli-plugin-eslint": "^3.4.0",
"@vue/cli-service": "^3.4.0",
"babel-eslint": "^10.0.1",
"eslint": "^5.8.0",
"eslint-plugin-vue": "^5.0.0",
"vue-template-compiler": "^2.5.21"
}
}

5
postcss.config.js Normal file
View File

@@ -0,0 +1,5 @@
module.exports = {
plugins: {
autoprefixer: {}
}
}

BIN
public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

17
public/index.html Normal file
View File

@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>ich-lerne-deutsch</title>
</head>
<body>
<noscript>
<strong>We're sorry but some-new-app doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

23
src/App.vue Normal file
View File

@@ -0,0 +1,23 @@
<template>
<v-app>
<app-header></app-header>
<v-content>
<router-view/>
</v-content>
<app-footer></app-footer>
</v-app>
</template>
<script>
import AppHeader from '@/components/AppHeader';
import AppFooter from '@/components/AppFooter';
export default {
components: {
AppHeader,
AppFooter,
}
};
</script>

BIN
src/assets/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@@ -0,0 +1,15 @@
<template>
<div>
<v-footer :fixed="true" app>
<span>
Ich Lerne Deutsch &copy;2018
</span>
</v-footer>
</div>
</template>
<script>
export default {
};
</script>

View File

@@ -0,0 +1,78 @@
<template>
<div>
<v-navigation-drawer absolute temporary app v-model="drawer" class="hidden-md-and-up">
<v-list>
<v-list-tile v-for="(item, i) in menuItems" :key="`drawer-item-${i}`">
<v-list-tile-action>
<v-icon left v-html="item.icon"></v-icon>
</v-list-tile-action>
<v-list-tile-content>
<v-list-tile-title v-text="item.title"></v-list-tile-title>
</v-list-tile-content>
</v-list-tile>
</v-list>
</v-navigation-drawer>
<v-toolbar app dark class="primary">
<v-toolbar-side-icon @click.stop="drawer = !drawer;" class="hidden-md-and-up"></v-toolbar-side-icon>
<router-link to="/" tag="span" style="cursor: pointer;">
<v-toolbar-title v-text="'Dannc Ich Lerne Deutsch'"></v-toolbar-title>
</router-link>
<v-spacer></v-spacer>
<v-toolbar-items class="hidden-sm-and-down">
<v-btn v-for="(item, i) in menuItems" flat :key="`menuitem-${i}`" :to="item.route">
<v-icon left v-html="item.icon"></v-icon>
{{item.title}}
</v-btn>
</v-toolbar-items>
</v-toolbar>
</div>
</template>
<script>
export default {
data() {
return {
drawer: false,
};
},
computed: {
menuItems() {
return [
{
icon: 'visibility',
title: 'Статьи',
route: '/articles',
},
{
icon: 'extension',
title: 'Учить слова',
route: '/words',
},
{
icon: 'account_circle',
title: 'Мой профиль',
route: '/profile',
},
{
icon: 'exit_to_app',
title: 'Выйти',
route: '/sign_out',
},
{
icon: 'input',
title: 'Войти',
route: '/sign_in',
},
{
icon: 'lock_open',
title: 'Регистрация',
route: '/sign_up',
},
];
}
},
};
</script>
<style scoped>
</style>

18
src/main.js Normal file
View File

@@ -0,0 +1,18 @@
import Vue from 'vue';
import Vuetify from 'vuetify';
import 'vuetify/dist/vuetify.min.css';
import 'material-design-icons-iconfont/dist/material-design-icons.css';
import App from './App.vue';
import router from './router';
import store from './store';
Vue.config.productionTip = false;
Vue.use(Vuetify);
new Vue({
router,
store,
render: h => h(App)
}).$mount('#app');

41
src/router.js Normal file
View File

@@ -0,0 +1,41 @@
import Vue from 'vue';
import Router from 'vue-router';
import Home from '@/views/Home';
Vue.use(Router);
export default new Router({
routes: [
{
path: '/',
name: 'home',
component: Home
},
{
path: '/articles',
name: 'articles',
component: () => import(/* webpackChunkName: "articles" */ '@/views/Articles.vue'),
},
{
path: '/words',
name: 'words',
component: () => import(/* webpackChunkName: "words" */ '@/views/Words.vue'),
},
{
path: '/profile',
name: 'profile',
component: () => import(/* webpackChunkName: "words" */ '@/views/Profile.vue'),
},
{
path: '/sign_in',
name: 'signIn',
component: () => import(/* webpackChunkName: "sign_in" */ '@/views/SignIn.vue'),
},
{
path: '/sign_up',
name: 'signUp',
component: () => import(/* webpackChunkName: "sign_up" */ '@/views/SignUp.vue'),
},
],
mode: 'history',
});

16
src/store.js Normal file
View File

@@ -0,0 +1,16 @@
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
export default new Vuex.Store({
state: {
},
mutations: {
},
actions: {
}
})

11
src/views/Articles.vue Normal file
View File

@@ -0,0 +1,11 @@
<template>
<div>
<h2>Articles</h2>
</div>
</template>
<script>
export default {
};
</script>

11
src/views/Home.vue Normal file
View File

@@ -0,0 +1,11 @@
<template>
</template>
<script>
export default {
name: 'home',
components: {
}
}
</script>

12
src/views/Profile.vue Normal file
View File

@@ -0,0 +1,12 @@
<template>
<div>
<h2>Profile</h2>
</div>
</template>
<script>
export default {
}
</script>

12
src/views/SignIn.vue Normal file
View File

@@ -0,0 +1,12 @@
<template>
<div>
<h2>Sign-in</h2>
</div>
</template>
<script>
export default {
}
</script>

12
src/views/SignUp.vue Normal file
View File

@@ -0,0 +1,12 @@
<template>
<div>
<h2>Sign-up</h2>
</div>
</template>
<script>
export default {
}
</script>

12
src/views/Words.vue Normal file
View File

@@ -0,0 +1,12 @@
<template>
<div>
<h2>Words</h2>
</div>
</template>
<script>
export default {
}
</script>

7985
yarn.lock Normal file

File diff suppressed because it is too large Load Diff