UI and bugfixes #10

Merged
hughrun merged 2 commits from publishing-fixes into main 2023-03-12 18:05:01 +11:00
3 changed files with 8 additions and 2 deletions

View file

@ -48,7 +48,7 @@ app.set('view engine', 'spy');
// GET
app.get('/', requireLoggedIn, (req, res) => {
res.render('index.spy', {title: 'Soyuz home', writeNew: getSavedFile(req.session.user.username)? 'Return to draft' : 'New'})
res.render('index.spy', {title: 'Home', writeNew: getSavedFile(req.session.user.username)? 'Return to draft' : 'New'})
})
app.get('/login', (req, res) => {

View file

@ -2,6 +2,8 @@ html {
margin: 0;
padding: 0;
height: 100%;
width: 100vw;
font: 1.3em sans-serif;
}
body {
@ -49,6 +51,7 @@ header form {
textarea,
main {
font: 1em sans-serif;
outline: none;
width: 90%;
min-height:80vh;
@ -78,7 +81,7 @@ main {
}
.home-menu {
margin: auto;
margin: 2em auto;
padding: 0;
text-align: center;
}

View file

@ -1,5 +1,8 @@
<< partials/head >>
<body class="{{ disabled }}">
<header>
<h1>Soyuz</h1>
</header>
<menu class="home-menu">
<a class="home-button" href="/new">{{ writeNew }}</a><br/>
<a class="home-button" href="/edit">Edit previous</a><br/>