Skip to content
This repository was archived by the owner on Dec 23, 2021. It is now read-only.

Commit d02b8dd

Browse files
committed
add header, messages + user login/panel to landing
1 parent b4423fb commit d02b8dd

3 files changed

Lines changed: 13 additions & 3 deletions

File tree

client/js/components/auth/user-panel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ module.exports = function (state, emit) {
8888
Signed in as <b>${state.township.profile.username}</b>
8989
</div>
9090
</div>
91-
<ul class="list">
91+
<ul class="list mb0">
9292
<li><a href="/${state.township.username}" data-no-routing>View Profile</a></li>
9393
<li><a href="/profile/edit" data-no-routing>Edit Profile</a></li>
9494
<li><a href="http://github.com/datproject/datproject.org/issues" target="_blank" class="color-neutral-50 hover-color-neutral-70">Report Bug</a></li>
95-
<li><a href="#" onclick=${() => emit('township:logout', {})}>Logout</a></li>
95+
<li class="mb0"><a href="#" onclick=${() => emit('township:logout', {})}>Logout</a></li>
9696
</ul>
9797
</div>`
9898
}

client/js/pages/landing/index.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ const css = require('sheetify')
33
const footer = require('../../elements/footer')
44
const datIcon = require('../../elements/icon')
55
const homeSection = require('../../elements/home-section')
6+
const panel = require('../../components/auth/user-panel')
7+
const loginButton = require('../../components/login-button')
8+
const message = require('../../elements/message')
69

710
module.exports = function (state, emit) {
811
const splash = css`
@@ -18,9 +21,15 @@ module.exports = function (state, emit) {
1821
`
1922
const backgroundImageUrl = '/public/img/bg-landing-page.svg'
2023
const star = datIcon('star-dat', {class: 'color-green'})
21-
2224
return html`
2325
<div class="min-vh-100 pb7">
26+
<div class="absolute w-100">
27+
${message(state.message)}
28+
<div class="tr pa2 ph4-l">
29+
${loginButton(state, emit)}
30+
${panel(state, emit)}
31+
</div>
32+
</div>
2433
<div class="${splash} pb6-ns pb4 w-100 center" style="background-image: url(${backgroundImageUrl})">
2534
<section class="tc pa3 pt5-ns">
2635
<h1 class="f3 f2-m f1-l fw2 black-90 mv3 tracked">

server/router.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ module.exports = function (config) {
7272
archiveRoute(req.query.query, function (state) {
7373
if (state.archive.error && state.archive.error.message === 'Invalid key') {
7474
// var url = '/' + req._parsedUrl.search
75+
// TODO: this needs to show an error message or something
7576
return res.redirect(301, '/')
7677
}
7778
return sendSPA(req, res, state)

0 commit comments

Comments
 (0)