← back to Dw Marketing Viewer
Fold header/footer wordmark cleanup into hero-rebrand deploy
e297a3de82d9d1746a4cd897e9fdcf0566c455d9 · 2026-06-23 13:09:15 -0700 · Steve
Files touched
M site-deploy/_remote-edit.py
Diff
commit e297a3de82d9d1746a4cd897e9fdcf0566c455d9
Author: Steve <steve@designerwallcoverings.com>
Date: Tue Jun 23 13:09:15 2026 -0700
Fold header/footer wordmark cleanup into hero-rebrand deploy
---
site-deploy/_remote-edit.py | 58 ++++++++++++++++++++++++++++++++-------------
1 file changed, 41 insertions(+), 17 deletions(-)
diff --git a/site-deploy/_remote-edit.py b/site-deploy/_remote-edit.py
index 0b25d3c..41eb34e 100644
--- a/site-deploy/_remote-edit.py
+++ b/site-deploy/_remote-edit.py
@@ -1,34 +1,58 @@
#!/usr/bin/env python3
-# Runs ON the Kamatera server. Rebrands wallpapersback.com hero to the Optima
-# logo image + fixes the stale wallco-ai .deploy.conf. Backup-safe, abort-safe.
+# Runs ON the Kamatera server. Rebrands wallpapersback.com to the new Optima
+# logo: hero image + header/footer wordmark text → "Wallpaper's Back".
+# Also fixes the stale wallco-ai .deploy.conf. Backup-safe, abort-safe, idempotent.
import sys, re, time
BASE = "/root/public-projects/wallpapersback"
PUB = BASE + "/public"
ts = int(time.time())
+BR = "Wallpaper's Back"
-# ---- 1. hero rebrand in index.html ----
idx = PUB + "/index.html"
-s = open(idx).read()
-old = ' <h1 class="hero-wordmark">wallpapersback</h1>'
-new = (' <h1 class="hero-wordmark"><img class="hero-wordmark-img" '
- 'src="/wpb-hero-wordmark.png" alt="Wallpaper's Back"></h1>')
+s0 = open(idx).read()
+s = s0
+notes = []
+
+# ---- 1. hero <h1> text -> logo image ----
+hero_old = ' <h1 class="hero-wordmark">wallpapersback</h1>'
+hero_new = (' <h1 class="hero-wordmark"><img class="hero-wordmark-img" '
+ 'src="/wpb-hero-wordmark.png" alt="%s"></h1>' % BR)
css = '.hero-wordmark-img{width:min(820px,86vw);height:auto;display:block;margin:18px auto 0}'
anchor = '@media (max-width:760px) { .hero-wordmark { font-size:clamp(32px, 12vw, 64px) } }'
-
if 'hero-wordmark-img' in s:
- print(" · hero already rebranded — skipping index.html")
-elif old not in s:
+ notes.append("hero already rebranded")
+elif hero_old in s:
+ s = s.replace(hero_old, hero_new, 1)
+ if css.split('{')[0] not in s and anchor in s:
+ s = s.replace(anchor, anchor + "\n" + css, 1)
+ notes.append("hero -> logo image")
+else:
print(" ! ERROR: hero <h1> not found — aborting, NO changes made")
sys.exit(1)
-else:
- open(idx + ".bak-rebrand-%d" % ts, "w").write(s)
- s = s.replace(old, new, 1)
- if 'hero-wordmark-img{' not in s and anchor in s:
- s = s.replace(anchor, anchor + "\n" + css, 1)
+
+# ---- 2. small brand-text spots ----
+swaps = [
+ ('<span class="ns-name">Wallpapersback</span>',
+ '<span class="ns-name">%s</span>' % BR),
+ ('<a class="cinema-logo" href="/" aria-label="wallpapersback home">wallpapersback</a>',
+ '<a class="cinema-logo" href="/" aria-label="%s home">%s</a>' % (BR, BR)),
+ ('<div class="footer-brand">wallpapersback</div>',
+ '<div class="footer-brand">%s</div>' % BR),
+]
+for old, new in swaps:
+ if old in s:
+ s = s.replace(old, new, 1)
+ notes.append("text: " + old.split('class="')[1].split('"')[0])
+
+# ---- write index.html once, with a single backup ----
+if s != s0:
+ open(idx + ".bak-rebrand-%d" % ts, "w").write(s0)
open(idx, "w").write(s)
- print(" ✓ hero rebranded + CSS injected (backup: index.html.bak-rebrand-%d)" % ts)
+ print(" ✓ index.html: " + "; ".join(notes) + " (backup .bak-rebrand-%d)" % ts)
+else:
+ print(" · index.html already fully rebranded")
-# ---- 2. fix stale wallco-ai .deploy.conf ----
+# ---- 3. fix stale wallco-ai .deploy.conf ----
cf = BASE + "/.deploy.conf"
try:
c = open(cf).read()
← 1bf2d95 Stage tested wallpapersback.com hero-rebrand deploy (hero wo
·
back to Dw Marketing Viewer
·
auto-save: 2026-06-23T13:21:53 (1 files) — site-deploy/_remo b198a29 →