Implement custom HTML placement (#78)
This commit is contained in:
parent
014bd271b4
commit
ae50a8b11d
4 changed files with 16 additions and 2 deletions
|
@ -105,6 +105,12 @@ TABLE=true
|
|||
SMILE=true
|
||||
# Allow Markdown in item notes. Does not work with TABLE=false. Defaults to false.
|
||||
MARKDOWN=false
|
||||
|
||||
## Custom HTML Snippets
|
||||
# These are inserted into specific locations in the relevant page
|
||||
# HTML is not escaped. Don't put untrusted data here.
|
||||
# CUSTOM_HTML_LOGIN=<p style="margin-top: 1em;">Some custom text for the Login page</p>
|
||||
# CUSTOM_HTML_WISHLISTS=
|
||||
```
|
||||
|
||||
## Default Profile Pictures
|
||||
|
|
|
@ -16,7 +16,11 @@ module.exports = {
|
|||
bulmaswatch: (process.env.BULMASWATCH || 'default').toLowerCase(),
|
||||
pfp: process.env.PFP !== 'false',
|
||||
language: process.env.LANGUAGE?.toLowerCase() || 'en-us',
|
||||
guestPassword: process.env.GUEST_PASSWORD
|
||||
guestPassword: process.env.GUEST_PASSWORD,
|
||||
customHtml: {
|
||||
wishlists: process.env.CUSTOM_HTML_WISHLISTS,
|
||||
login: process.env.CUSTOM_HTML_LOGIN
|
||||
}
|
||||
}
|
||||
|
||||
if (module.exports.guestPassword) module.exports.wishlist.public = false
|
||||
|
|
|
@ -17,4 +17,5 @@ block content
|
|||
.field
|
||||
.control
|
||||
input.button.is-primary(type='submit' value=lang('LOGIN_BUTTON'))
|
||||
|
||||
if _CC.config.customHtml.login
|
||||
div!= _CC.config.customHtml.login
|
|
@ -44,6 +44,9 @@ block content
|
|||
display: inline-block;
|
||||
}
|
||||
|
||||
if _CC.config.customHtml.wishlists
|
||||
div!= _CC.config.customHtml.wishlists
|
||||
|
||||
ul.noStyle.noLeftMargin
|
||||
if req.user._id !== '_CCUNKNOWN'
|
||||
li
|
||||
|
|
Loading…
Reference in a new issue