[object Object]

← back to Commercialrealestate

condos: Day theme default via fresh key, persist only on explicit toggle

03c9c5ab4f260ec97e6d1caa2b0b4089b7f725d3 · 2026-08-07 16:23:42 -0700 · Steve Abrams

Files touched

Diff

commit 03c9c5ab4f260ec97e6d1caa2b0b4089b7f725d3
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Fri Aug 7 16:23:42 2026 -0700

    condos: Day theme default via fresh key, persist only on explicit toggle
---
 public/condos.html | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/public/condos.html b/public/condos.html
index 50d6eb7..800b837 100644
--- a/public/condos.html
+++ b/public/condos.html
@@ -1,7 +1,7 @@
 <!doctype html>
 <html lang="en">
 <head>
-<script>(function(){try{var t=localStorage.getItem('crcp-theme');document.documentElement.setAttribute('data-theme',t==='dark'?'dark':'light');}catch(e){document.documentElement.setAttribute('data-theme','light');}})();</script>
+<script>(function(){try{var t=localStorage.getItem('crcp-theme2');document.documentElement.setAttribute('data-theme',t==='dark'?'dark':'light');}catch(e){document.documentElement.setAttribute('data-theme','light');}})();</script>
 <meta charset="utf-8">
 <meta name="viewport" content="width=device-width, initial-scale=1">
 <link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect width='16' height='16' rx='3' fill='%230e1116'/%3E%3Ctext x='8' y='12' font-size='10' text-anchor='middle' fill='%233fb950'%3E%F0%9F%8F%A2%3C/text%3E%3C/svg%3E">
@@ -143,17 +143,18 @@
 // Day/Night toggle — pre-applied before first paint (see head snippet); persists to localStorage.
 (function(){
   var root=document.documentElement;
+  // apply() only paints — it does NOT persist (passive loads must not lock in a theme;
+  // only an explicit toggle click below saves a pref, so everyone gets the Day default).
   function apply(t){ root.setAttribute('data-theme',t);
     var ic=document.getElementById('themeIcon'), lb=document.getElementById('themeLbl');
     // label shows the CURRENT mode (not the target) so it's never ambiguous
     if(ic) ic.textContent = t==='light'?'☀️':'🌙';
     if(lb) lb.textContent = t==='light'?'Day':'Night';
-    try{ localStorage.setItem('crcp-theme',t); }catch(e){}
   }
-  var cur; try{ cur=localStorage.getItem('crcp-theme'); }catch(e){}
+  var cur; try{ cur=localStorage.getItem('crcp-theme2'); }catch(e){}
   apply(cur==='dark'?'dark':'light');
   var btn=document.getElementById('themeToggle');
-  if(btn) btn.addEventListener('click',function(){ apply(root.getAttribute('data-theme')==='light'?'dark':'light'); });
+  if(btn) btn.addEventListener('click',function(){ var nt=root.getAttribute('data-theme')==='light'?'dark':'light'; apply(nt); try{ localStorage.setItem('crcp-theme2',nt); }catch(e){} });
 })();
 </script>
 <div class="banner" id="banner">⚖️ Loading warrantability label…</div>

← e3e5a8f crcp deploy: exclude runtime solicitation-drafts.jsonl from  ·  back to Commercialrealestate  ·  CRE leads: personalized outreach queue (drafts only, sends g abab627 →