mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2024-11-22 16:17:29 +00:00
Fix #15
This commit is contained in:
parent
29e56134ce
commit
e8e565605f
@ -15,7 +15,8 @@ module.exports = [
|
||||
return render(400, "pug/friendlyerror.pug", {
|
||||
statusCode: 400,
|
||||
title: "Bad request",
|
||||
message: "Expected a username."
|
||||
message: "Expected a username",
|
||||
explanation: "Write /u/{username} or /u?u={username}."
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -54,7 +55,7 @@ module.exports = [
|
||||
return {
|
||||
statusCode: 400,
|
||||
contentType: "text/html",
|
||||
content: "That page does not exist"
|
||||
content: "That page does not exist."
|
||||
}
|
||||
}
|
||||
}).catch(error => {
|
||||
@ -80,7 +81,8 @@ module.exports = [
|
||||
return render(400, "pug/friendlyerror.pug", {
|
||||
statusCode: 400,
|
||||
title: "Bad request",
|
||||
message: "Expected a username."
|
||||
message: "Expected a shortcode",
|
||||
explanation: "Write /p/{shortcode} or /p?u={shortcode}."
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -15,4 +15,6 @@ html
|
||||
body.error-page
|
||||
h1.code= statusCode
|
||||
p.message= message
|
||||
if explanation
|
||||
p.explanation= explanation
|
||||
a(href="javascript:history.back()").back ← Go back?
|
||||
|
@ -260,6 +260,7 @@ body
|
||||
margin-bottom: 10px
|
||||
|
||||
.error-page
|
||||
box-sizing: border-box
|
||||
min-height: 100vh
|
||||
background: #191919
|
||||
padding: 10px
|
||||
@ -269,10 +270,9 @@ body
|
||||
justify-content: center
|
||||
align-items: center
|
||||
|
||||
.code, .message, .back-link
|
||||
.code, .message, .explanation, .back-link
|
||||
line-height: 1.2
|
||||
margin: 0px
|
||||
color: white
|
||||
|
||||
.code
|
||||
font-size: 80px
|
||||
@ -282,9 +282,14 @@ body
|
||||
.message
|
||||
font-size: 35px
|
||||
color: #ccc
|
||||
margin-bottom: 15vh
|
||||
|
||||
.explanation
|
||||
margin-top: 10px
|
||||
font-size: 20px
|
||||
color: #bbb
|
||||
|
||||
.back
|
||||
margin-top: 15vh
|
||||
color: #4a93d2
|
||||
font-size: 25px
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user