add missing sourcecode

This commit is contained in:
thilo 2020-03-21 17:11:07 +01:00
parent 5ab26887d9
commit de12ea3f4b
4 changed files with 110 additions and 0 deletions

31
src/router/index.js Normal file
View file

@ -0,0 +1,31 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Warning from '../views/Warning'
import Questionnaire from "@/views/Questionnaire";
Vue.use(VueRouter)
const routes = [
{
path: '/',
name: 'Home',
component: Home
},
{
path: '/warning',
name: 'Warnung',
component: Warning
},
{
path: '/questionmaire',
name: 'Fragebogen',
component: Questionnaire
}
]
const router = new VueRouter({
routes
})
export default router

31
src/store/index.js Normal file
View file

@ -0,0 +1,31 @@
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
export default new Vuex.Store({
state: {
currentQuestion: 0,
answers: [],
questions: [{
question: "Test",
answers: ["Answer 1", "Answer 2", "Answer 3"]
}]
},
mutations: {
nextQuestion() {
if(this.state.currentQuestion <=
this.state.questions.length - 1)
this.state.currentQuestion += 1
},
previousQuestion() {
if(this.state.currentQuestion > 0) {
this.state.currentQuestion -= 1
}
}
},
actions: {
},
modules: {
}
})

32
src/views/Home.vue Normal file
View file

@ -0,0 +1,32 @@
<template>
<div class="home">
<img alt="Vue logo" src="../assets/welcome.png">
<!-- <HelloWorld msg="Welcome to Your Vue.js App"/> -->
<h1>COVIDassist</h1>
<p>Die COVID-19 Verhaltensdiagnose, die Ihre Daten respektiert.</p>
<router-link to="/warning"><button>Selbsttest starten</button></router-link>
<a href="/">Informationen zu COVID-19</a>
<small><a href="/">Imprint</a></small>
</div>
</template>
<script>
// @ is an alias to /src
// import HelloWorld from '@/components/HelloWorld.vue'
export default {
name: 'Home',
components: {
// HelloWorld
}
}
</script>
<style>
.home {
display: flex;
flex-flow: column;
justify-content: center;
padding: 0.5em;
}
</style>

16
src/views/Warning.vue Normal file
View file

@ -0,0 +1,16 @@
<template>
<div class="about">
<h1>Warnhinweis</h1>
<p>Dieser Test geht auf Ihr Verhalten ein und gibt Ihnen Tipps, wie Sie eine Infektion vermeiden können. Wenn Sie vermuten, dass Sie bereits infiziert sind, rufen Sie den ärztlichen Bereitschaftsdienst an:</p>
<p class="number">116117</p>
<router-link to="/questionmaire"><button>Fortfahren</button></router-link>
</div>
</template>
<style>
.number {
font-family: sans-serif;
color: #E94A47;
font-size: 1.6em;
}
</style>