Skip to content

Commit

Permalink
fix: Default value for nc background, and nc logo visibility
Browse files Browse the repository at this point in the history
Signed-off-by: Elizabeth Danzberger <[email protected]>
  • Loading branch information
elzody committed Jul 30, 2024
1 parent c7c835f commit a8806ad
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/helpers/coolParameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,15 @@ const generateCSSVarTokens = () => {
if (customLogo) {
str += ';--nc-custom-logo=' + window.OCA?.Theming?.cacheBuster ?? 0 + ';'
}

const rootEl = document.querySelector(':root')

const logoBgColor = window.getComputedStyle(rootEl).getPropertyValue('--nc-logo-background')
str += '--nc-logo-background=' + (logoBgColor === '' ? 'transparent' : logoBgColor) + ';'

const logoDisplay = window.getComputedStyle(rootEl).getPropertyValue('--nc-logo-display')
str += '--nc-logo-display=' + (logoDisplay === '' ? 'block' : logoDisplay) + ';'

return str.replace(/["']/g, '\\\'')
}

Expand Down

0 comments on commit a8806ad

Please sign in to comment.