@@ -0,0 +1,49 @@ | |||
<style> | |||
body { | |||
font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif; | |||
font-size: 14px; | |||
line-height: 1.4; | |||
background: #D3D8E8; | |||
color: #252830; | |||
} | |||
.blue { | |||
color: #0275D8; | |||
} | |||
</style> | |||
<template> | |||
<div> | |||
<lesspass-header></lesspass-header> | |||
<lesspass-headlines></lesspass-headlines> | |||
<password-generator></password-generator> | |||
<lesspass-how-it-works></lesspass-how-it-works> | |||
<lesspass-feedback></lesspass-feedback> | |||
<lesspass-faq></lesspass-faq> | |||
<lesspass-footer></lesspass-footer> | |||
</div> | |||
</template> | |||
<script> | |||
import LesspassHeader from './components/header.vue'; | |||
import LesspassHeadlines from './components/headlines.vue'; | |||
import PasswordGenerator from './components/password-generator.vue'; | |||
import LesspassFeedback from './components/feedback.vue'; | |||
import LesspassHowItWorks from './components/howitworks.vue'; | |||
import LesspassFaq from './components/faq.vue'; | |||
import LesspassFooter from './components/footer.vue'; | |||
export default { | |||
data: function () { | |||
return {} | |||
}, | |||
components: { | |||
LesspassHeader, | |||
LesspassHeadlines, | |||
PasswordGenerator, | |||
LesspassFeedback, | |||
LesspassHowItWorks, | |||
LesspassFaq, | |||
LesspassFooter | |||
} | |||
} | |||
</script> |
@@ -1,32 +0,0 @@ | |||
<style> | |||
body { | |||
font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif; | |||
font-size: 14px; | |||
line-height: 1.4; | |||
background: #D3D8E8; | |||
color: #252830; | |||
} | |||
.blue { | |||
color: #0275D8; | |||
} | |||
</style> | |||
<template> | |||
<div id="App"> | |||
<lesspass-header></lesspass-header> | |||
<router-view></router-view> | |||
</div> | |||
</template> | |||
<script> | |||
var LesspassHeader = require('./components/header.vue'); | |||
export default { | |||
data: function () { | |||
return {} | |||
}, | |||
components: { | |||
LesspassHeader | |||
} | |||
} | |||
</script> |
@@ -6,37 +6,6 @@ | |||
</style> | |||
<template> | |||
<div id="header"> | |||
<div id="SignInCollapseNavbar" class="bg-inverse collapse"> | |||
<div class="container p-t-1"> | |||
<form> | |||
<div class="form-group row"> | |||
<div class="col-lg-2 col-lg-offset-4 m-b-1"> | |||
<label class="sr-only" for="email">{{$t('header.Email')}}</label> | |||
<input type="email" class="form-control form-control-sm" id="email" | |||
placeholder="{{$t('header.Email')}}" | |||
v-model="credentials.email"> | |||
</div> | |||
<div class="col-lg-2 m-b-1"> | |||
<label class="sr-only" for="password">{{$t('header.Password')}}</label> | |||
<input type="password" class="form-control form-control-sm" id="password" | |||
placeholder="{{$t('header.Password')}}" | |||
v-model="credentials.password"> | |||
</div> | |||
<div class="col-lg-2 m-b-1"> | |||
<button type="submit" class="btn btn-primary btn-sm btn-block" @click="signin()"> | |||
{{$t('header.Sign_in')}} | |||
</button> | |||
</div> | |||
<div class="col-lg-2 m-b-1"> | |||
<button type="submit" class="btn btn-primary-outline btn-sm btn-block" | |||
@click="register()"> | |||
{{$t('header.Register')}} | |||
</button> | |||
</div> | |||
</div> | |||
</form> | |||
</div> | |||
</div> | |||
<div class="container"> | |||
<nav id="navbar" class="navbar"> | |||
<div class="container"> | |||
@@ -47,62 +16,8 @@ | |||
</a> | |||
</li> | |||
</ul> | |||
<!--<ul class="nav navbar-nav pull-xs-right"> | |||
<li class="nav-item" v-if="!user.authenticated"> | |||
<button class="navbar-toggler" type="button" data-toggle="collapse" | |||
data-target="#SignInCollapseNavbar"> | |||
☰ | |||
</button> | |||
</li> | |||
<li class="nav-item" v-if="user.authenticated"> | |||
<a class="btn btn-primary" @click="logout()"> | |||
logout | |||
</a> | |||
</li> | |||
</ul>--> | |||
</div> | |||
</nav> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
var auth = require('../services/auth.js'); | |||
var router = require('../router.js'); | |||
export default { | |||
data: function () { | |||
return { | |||
user: auth.user, | |||
credentials: { | |||
email: '', | |||
password: '' | |||
}, | |||
error: '' | |||
} | |||
}, | |||
methods: { | |||
signin() { | |||
var credentials = { | |||
email: this.credentials.email, | |||
password: this.credentials.password | |||
}; | |||
auth.login(this, credentials, function () { | |||
$('#SignInCollapseNavbar').collapse('hide'); | |||
router.go('/'); | |||
}); | |||
}, | |||
register() { | |||
var credentials = { | |||
email: this.credentials.email, | |||
password: this.credentials.password | |||
}; | |||
auth.register(this, credentials) | |||
}, | |||
logout() { | |||
auth.logout(function () { | |||
router.go('/presentation/'); | |||
}) | |||
} | |||
} | |||
} | |||
</script> | |||
</template> |
@@ -1,32 +0,0 @@ | |||
<template> | |||
<lesspass-headlines></lesspass-headlines> | |||
<password-generator></password-generator> | |||
<lesspass-how-it-works></lesspass-how-it-works> | |||
<lesspass-feedback></lesspass-feedback> | |||
<lesspass-faq></lesspass-faq> | |||
<lesspass-footer></lesspass-footer> | |||
</template> | |||
<script> | |||
import LesspassHeadlines from './headlines.vue'; | |||
import PasswordGenerator from './password-generator.vue'; | |||
import LesspassFeedback from './feedback.vue'; | |||
import LesspassHowItWorks from './howitworks.vue'; | |||
import LesspassFaq from './faq.vue'; | |||
import LesspassFooter from './footer.vue'; | |||
export default { | |||
data: function () { | |||
return {} | |||
}, | |||
components: { | |||
LesspassHeadlines, | |||
PasswordGenerator, | |||
LesspassFeedback, | |||
LesspassHowItWorks, | |||
LesspassFaq, | |||
LesspassFooter | |||
} | |||
} | |||
</script> |
@@ -1,15 +1,15 @@ | |||
require('../node_modules/bootstrap/dist/css/bootstrap.css'); | |||
require('../node_modules/font-awesome/css/font-awesome.min.css'); | |||
require('../node_modules/bootstrap/dist/js/umd/collapse.js'); | |||
var Vue = require('vue'); | |||
Vue.config.debug = true; | |||
var App = require('./App.vue'); | |||
require('./locales.js'); | |||
require('./router.js'); | |||
var Resource = require('vue-resource'); | |||
Vue.use(Resource); | |||
new Vue({ | |||
el: 'body', | |||
components: { | |||
App | |||
} | |||
}); | |||
require('offline-plugin/runtime').install(); |
@@ -25,7 +25,7 @@ | |||
<meta name="theme-color" content="#252830"> | |||
</head> | |||
<body> | |||
<div id="app"></div> | |||
<App></App> | |||
<script src="dist/bundle.js"></script> | |||
</body> | |||
</html> |
@@ -35,8 +35,7 @@ | |||
"toastr": "^2.1.2", | |||
"vue": "^1.0.16", | |||
"vue-i18n": "^2.4.0", | |||
"vue-resource": "^0.7.0", | |||
"vue-router": "^0.7.10" | |||
"vue-resource": "^0.7.0" | |||
}, | |||
"devDependencies": { | |||
"babel-core": "^6.5.1", | |||
@@ -23,13 +23,7 @@ module.exports = { | |||
{test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=image/svg+xml"} | |||
] | |||
}, | |||
plugins: [ | |||
new webpack.ProvidePlugin({ | |||
$: "jquery", | |||
jQuery: "jquery", | |||
"window.jQuery": "jquery" | |||
}) | |||
] | |||
plugins: [] | |||
}; | |||
if (process.env.NODE_ENV === 'production') { | |||
@@ -42,7 +36,7 @@ if (process.env.NODE_ENV === 'production') { | |||
caches: 'all', | |||
scope: '/dist/', | |||
updateStrategy: 'all', | |||
ServiceWorker: { output: 'sw.js'}, | |||
ServiceWorker: {output: 'sw.js'}, | |||
AppCache: false | |||
}) | |||
]) |