Merge pull request #10 from hughrun/publishing-fixes

UI and bugfixes
This commit is contained in:
Hugh Rundle 2023-03-12 18:05:00 +11:00 committed by GitHub
commit e67b6f7fff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 2 deletions

View file

@ -48,7 +48,7 @@ app.set('view engine', 'spy');
// GET // GET
app.get('/', requireLoggedIn, (req, res) => { 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) => { app.get('/login', (req, res) => {

View file

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

View file

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