MCPcopy Create free account
hub / github.com/error311/FileRise / applyHeaderColorsFromAdmin

Function applyHeaderColorsFromAdmin

public/js/adminPanel.js:507–524  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

505 return folders.reduce((acc, f) => { acc[f] = { ...allTrue }; return acc; }, {});
506}
507function applyHeaderColorsFromAdmin() {
508 try {
509 const lightInput = document.getElementById('brandingHeaderBgLight');
510 const darkInput = document.getElementById('brandingHeaderBgDark');
511 const root = document.documentElement;
512
513 const light = lightInput ? lightInput.value.trim() : '';
514 const dark = darkInput ? darkInput.value.trim() : '';
515
516 if (light) root.style.setProperty('--header-bg-light', light);
517 else root.style.removeProperty('--header-bg-light');
518
519 if (dark) root.style.setProperty('--header-bg-dark', dark);
520 else root.style.removeProperty('--header-bg-dark');
521 } catch (e) {
522 console.warn('Failed to live-update header colors from admin panel', e);
523 }
524}
525function applyFooterFromAdmin() {
526 try {
527 const footerEl = document.getElementById('siteFooter');

Callers 1

handleSaveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected