diff --git a/README.md b/README.md index bcf2b9f..93c202b 100644 --- a/README.md +++ b/README.md @@ -111,10 +111,15 @@ MARKDOWN=false # HTML is not escaped. Don't put untrusted data here. # CUSTOM_HTML_LOGIN=

Some custom text for the Login page

# CUSTOM_HTML_WISHLISTS= + +# Custom CSS stylesheet +# If you wish to include a custom stylesheet you can add the filename in the variable here. +# Remember to add the stylesheet to the filesystem at `static/css/custom.css`. In docker, mount `/usr/src/app/src/static/css/custom.css`. +# CUSTOM_CSS=custom.css ``` ## Default Profile Pictures -To replace the default snowman profile pictures, replace the files in `static/img/default-pfps`. In docker, mount `/usr/src/app/static/img/default-pfps`. +To replace the default snowman profile pictures, replace the files in `static/img/default-pfps`. In docker, mount `/usr/src/app/src/static/img/default-pfps`. ## Startup ```sh diff --git a/src/config/index.js b/src/config/index.js index 1c732c4..1ee79e9 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -20,7 +20,8 @@ module.exports = { customHtml: { wishlists: process.env.CUSTOM_HTML_WISHLISTS, login: process.env.CUSTOM_HTML_LOGIN - } + }, + customCSS: process.env.CUSTOM_CSS || null } if (module.exports.guestPassword) module.exports.wishlist.public = false diff --git a/src/views/layout.pug b/src/views/layout.pug index daaa23b..94dfc5f 100644 --- a/src/views/layout.pug +++ b/src/views/layout.pug @@ -15,6 +15,8 @@ html(lang='en') link(rel='stylesheet', href=`${_CC.config.base}libraries/fontawesome/css/all.css`) link(rel='stylesheet', href=`${_CC.config.base}libraries/animate.min.css`) link(rel='stylesheet', href=`${_CC.config.base}css/main.css`) + if _CC.config.customCSS + link(rel='stylesheet', href=`${_CC.config.base}css/${_CC.config.customCSS}`) body .print .content