← back to Rentv
Add professional full-width site footer (front-end pages)
e9c26f23e93a1c7766ae2df997f4f4f95f265a9a · 2026-07-28 13:49:58 -0700 · Steve Abrams
- brand + tagline + SECTIONS / INTELLIGENCE / COMPANY columns + copyright bar, dark navy full-width
- injected site-wide via sendPage()/static-injector (one place, every front-end page); admin shells excluded
- hides any pre-existing per-page <footer> to avoid duplicates; scoped rf- classes avoid page CSS collision
TK-10013
Files touched
Diff
commit e9c26f23e93a1c7766ae2df997f4f4f95f265a9a
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Tue Jul 28 13:49:58 2026 -0700
Add professional full-width site footer (front-end pages)
- brand + tagline + SECTIONS / INTELLIGENCE / COMPANY columns + copyright bar, dark navy full-width
- injected site-wide via sendPage()/static-injector (one place, every front-end page); admin shells excluded
- hides any pre-existing per-page <footer> to avoid duplicates; scoped rf- classes avoid page CSS collision
TK-10013
---
server.js | 33 ++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
diff --git a/server.js b/server.js
index da73a141..b1faac93 100644
--- a/server.js
+++ b/server.js
@@ -52,12 +52,43 @@ function adminOnly(req, res, next) {
// </body>. Used by every explicit page route AND the static HTML injector below, so the
// toggle is present site-wide from a single include (the widget self-hides for user-tier).
const TOGGLE_TAG = '<script src="/toggle.js" defer></script>';
+// Professional full-width site footer, injected on front-end pages (skipped on internal/admin
+// shells). Hides any pre-existing per-page <footer> so there's exactly one, consistent footer.
+const FOOTER_TAG = `<style id="rentv-footer-css">
+footer:not(#rentv-footer){display:none!important}
+#rentv-footer{background:#0d1b2a;color:#c8d3df;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;margin-top:72px;position:static}
+#rentv-footer *{box-sizing:border-box;position:static;float:none}
+#rentv-footer .rf-wrap{max-width:1180px;margin:0 auto;padding:56px 28px 8px;display:grid;grid-template-columns:1.7fr 1fr 1fr 1fr;gap:34px;align-items:start}
+#rentv-footer .rf-brand{display:block;font-size:25px;font-weight:800;letter-spacing:.01em;color:#fff;text-decoration:none}
+#rentv-footer .rf-brand span{color:#c0392b}
+#rentv-footer .rf-tag{color:#8ea3b8;font-size:14px;max-width:330px;margin:14px 0 0;line-height:1.65}
+#rentv-footer .rf-col h4{font-size:11px;letter-spacing:.15em;text-transform:uppercase;color:#5b6b7b;margin:2px 0 15px;font-weight:700}
+#rentv-footer .rf-links a{display:block;color:#c8d3df;text-decoration:none;font-size:14px;padding:6px 0;transition:color .12s}
+#rentv-footer .rf-links a:hover{color:#fff}
+#rentv-footer .rf-bar{border-top:1px solid rgba(255,255,255,.08);margin:40px auto 0;max-width:1180px;padding:20px 28px;display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px;color:#5b6b7b;font-size:12.5px}
+@media(max-width:820px){#rentv-footer .rf-wrap{grid-template-columns:1fr 1fr}#rentv-footer .rf-bar{justify-content:center;text-align:center}}
+</style>
+<footer id="rentv-footer">
+ <div class="rf-wrap">
+ <div class="rf-col"><a class="rf-brand" href="/">REN<span>TV</span>.com</a><p class="rf-tag">Commercial real estate news, deals & conferences across the Western United States since 1998.</p></div>
+ <div class="rf-col"><h4>Sections</h4><div class="rf-links"><a href="/sales">Sales</a><a href="/leases">Leases</a><a href="/financing">Financing</a><a href="/development">Development</a><a href="/la-commercial">LA Commercial</a></div></div>
+ <div class="rf-col"><h4>Intelligence</h4><div class="rf-links"><a href="/markets">Markets</a><a href="/review">The REview</a><a href="/cre-talk">CRE Talk</a><a href="/conferences">Conferences</a><a href="/blog">Blog</a></div></div>
+ <div class="rf-col"><h4>Company</h4><div class="rf-links"><a href="/about">About</a><a href="/advertise">Advertise</a><a href="/subscribe">Subscribe</a></div></div>
+ </div>
+ <div class="rf-bar"><span>© 2026 RENTV.com — Commercial Real Estate News across the Western U.S.</span><span>All rights reserved.</span></div>
+</footer>`;
+// Internal/admin shells never get the customer footer.
+const INTERNAL_PAGE = /(^|\/)(admin|versions|consulting|press|desk|desk-admin|audience|social|backend)(\.html)?$|\/(admin|versions|consulting|press)\//i;
function sendPage(res, absFile) {
let html;
try { html = fs.readFileSync(absFile, 'utf8'); }
catch { return res.status(404).send('not found'); }
+ const closeBody = () => html.indexOf('</body>') !== -1;
if (html.indexOf('/toggle.js') === -1) {
- html = html.indexOf('</body>') !== -1 ? html.replace('</body>', TOGGLE_TAG + '</body>') : html + TOGGLE_TAG;
+ html = closeBody() ? html.replace('</body>', TOGGLE_TAG + '</body>') : html + TOGGLE_TAG;
+ }
+ if (!INTERNAL_PAGE.test(absFile) && html.indexOf('rentv-footer') === -1) {
+ html = closeBody() ? html.replace('</body>', FOOTER_TAG + '</body>') : html + FOOTER_TAG;
}
res.type('html').send(html);
}
← 9f5655f8 Video Library: refresh walkthrough with clean-header capture
·
back to Rentv
·
Video Library: add 18 Component Videos (each feature/tool, S b10b0ae5 →