Create login view; Add footer
This commit is contained in:
parent
0934fea892
commit
d5de474368
|
@ -27,7 +27,7 @@ app.use((state, emitter) => {
|
|||
}
|
||||
});
|
||||
|
||||
emitter.on('changeView', newView => {
|
||||
emitter.on('change-view', newView => {
|
||||
// Change the view and call render. Makes it easier to call within views.
|
||||
state.currentView = newView;
|
||||
emitter.emit('render', () => {});
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
import html from 'choo/html';
|
||||
|
||||
export const loginPartial = (state, emit) => {
|
||||
return html`<section>
|
||||
|
||||
<article class="card">
|
||||
<div class="container wide">
|
||||
<label>
|
||||
<span>Email</span>
|
||||
<input type="email" name="email">
|
||||
</label>
|
||||
<label>
|
||||
<span>Password</span>
|
||||
<input type="password" name="password">
|
||||
</label>
|
||||
<input type="submit" value="Log In!">
|
||||
</div>
|
||||
</article>
|
||||
|
||||
</section>`;
|
||||
}
|
|
@ -13,6 +13,10 @@ export const viewManager = (state, emit) => {
|
|||
htmlContent = homeView(state, emit);
|
||||
break;
|
||||
}
|
||||
case 'login': {
|
||||
htmlContent = loginView(state, emit);
|
||||
break;
|
||||
}
|
||||
case 'search': {
|
||||
htmlContent = searchView(state, emit);
|
||||
break;
|
||||
|
@ -49,6 +53,15 @@ export const viewManager = (state, emit) => {
|
|||
<main class="container">
|
||||
${htmlContent}
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<nav>
|
||||
<div class="links">
|
||||
<a href="https://gitlab.com/Alamantus/book-tracker" class="pseudo button">Repo</a>
|
||||
<a href="https://gitter.im/book-tracker/general" class="pseudo button">Chat</a>
|
||||
</div>
|
||||
</nav>
|
||||
</footer>
|
||||
</body>`;
|
||||
|
||||
return view;
|
||||
|
|
Loading…
Reference in New Issue