Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new environment variables for custom css, custom title, and custom description #100

Merged
merged 2 commits into from
Aug 11, 2022

Conversation

HrBingR
Copy link

@HrBingR HrBingR commented Aug 7, 2022

Fixes #89

Fully tested using the Dockerfile to build an image and deployed via docker using the following environment variables (sensitive data redacted):

      BASE_URL: 'https://URL'
      NODE_VERSION: '16.13.1'
      YARN_VERSION: '1.22.15'
      PORT: '1443'
      MAX_FILE_SIZE: '1073741824'
      MAX_FILES_PER_ARCHIVE: '20'
      MAX_EXPIRE_SECONDS: '86400'
      MAX_DOWNLOADS: '5'
      UI_COLOR_PRIMARY: '#CC0000'
      UI_COLOR_ACCENT: '#990000'
      UI_CUSTOM_ASSETS_ICON: 'custom_assets/logo-black.png'
      UI_CUSTOM_ASSETS_WORDMARK: 'custom_assets/logo-na.png'
      CUSTOM_TITLE: 'FileShare'
      CUSTOM_DESCRIPTION: 'Send encrypted files securely over the internet'
      UI_CUSTOM_CSS: 'custom_assets/custom_css.css'

Added the ability for a user to define and use a custom CSS file.

For myself the only thing I changed in my custom CSS file is the background-image, but any CSS in there should overwrite the default CSS as it's been placed lower in the layout.js file.

I've also added the ability for the user to change the website title and description using environment variables to afford more customizability.

A production example can be found on https://fileshare.thenextweb.co.za with all three of these changes made.

Happy to post the full docker-file if needed.

…tom description.

Fully tested using the Dockerfile, example can be found on https://fileshare.thenextweb.co.za
Copy link
Owner

@timvisee timvisee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for these changes. These are very useful.

Would you mind to resolve the comment I just posted. After that I'll happily merge.

An if-statement should be used here, to only include this if a custom stylesheet is set (not null or empty string).

server/layout.js Outdated Show resolved Hide resolved
@timvisee timvisee added the enhancement New feature or request label Aug 9, 2022
@HrBingR HrBingR requested a review from timvisee August 10, 2022 22:44
@timvisee
Copy link
Owner

LGTM. Thanks!

timvisee added a commit that referenced this pull request Aug 11, 2022
@timvisee timvisee merged commit 96d53e4 into timvisee:master Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Custom CSS
3 participants