api: Add baseUrl to templates
This commit is contained in:
parent
5b4ec4d69e
commit
46466874da
|
@ -53,6 +53,7 @@ function isValidScope(scope) {
|
||||||
router.use((req, res, next) => {
|
router.use((req, res, next) => {
|
||||||
res.locals.user = req.user;
|
res.locals.user = req.user;
|
||||||
res.locals.mainFrontendUrl = config.mainFrontendUrl;
|
res.locals.mainFrontendUrl = config.mainFrontendUrl;
|
||||||
|
res.locals.baseUrl = baseUrl;
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -9,9 +9,9 @@ block content
|
||||||
minutes time for your decision.
|
minutes time for your decision.
|
||||||
|
|
||||||
.authorization
|
.authorization
|
||||||
form(method="post", action="/authorize/decline")
|
form(method="post", action="authorize/decline")
|
||||||
button(type="submit", class="red") Decline
|
button(type="submit", class="red") Decline
|
||||||
|
|
||||||
form(method="post", action="/authorize/approve")
|
form(method="post", action="authorize/approve")
|
||||||
button(type="submit", class="green") Approve
|
button(type="submit", class="green") Approve
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
html
|
html
|
||||||
head
|
head
|
||||||
|
base(href=baseUrl)
|
||||||
title
|
title
|
||||||
block title
|
block title
|
||||||
| Authorization Server
|
| Authorization Server
|
||||||
|
@ -133,10 +134,10 @@ html
|
||||||
if mainFrontendUrl
|
if mainFrontendUrl
|
||||||
li: a(href=mainFrontendUrl) Back to Portal
|
li: a(href=mainFrontendUrl) Back to Portal
|
||||||
if !user
|
if !user
|
||||||
li: a(href="/login") Login
|
li: a(href="login") Login
|
||||||
li: a(href="/register") Register
|
li: a(href="register") Register
|
||||||
if user
|
if user
|
||||||
li: a(href="/logout") Logout
|
li: a(href="logout") Logout
|
||||||
header: h1
|
header: h1
|
||||||
block title
|
block title
|
||||||
block content
|
block content
|
||||||
|
|
|
@ -17,4 +17,4 @@ block content
|
||||||
p.message.error Invalid login credentials, please try again.
|
p.message.error Invalid login credentials, please try again.
|
||||||
|
|
||||||
button(type="submit", style="margin-right: 2rem") Login
|
button(type="submit", style="margin-right: 2rem") Login
|
||||||
a(href="/forgot-password") I forgot my password
|
a(href="forgot-password") I forgot my password
|
||||||
|
|
|
@ -4,5 +4,5 @@ block title
|
||||||
| Logout
|
| Logout
|
||||||
|
|
||||||
block content
|
block content
|
||||||
form(method="post", action="/logout")
|
form(method="post", action="logout")
|
||||||
button(type="submit", class="red") Log out now
|
button(type="submit", class="red") Log out now
|
||||||
|
|
|
@ -8,4 +8,4 @@ block content
|
||||||
div(class="message " + type)= description
|
div(class="message " + type)= description
|
||||||
|
|
||||||
if showLoginButton
|
if showLoginButton
|
||||||
p: a(href="/login") Go to login
|
p: a(href="login") Go to login
|
||||||
|
|
Loading…
Reference in a new issue