← back to NationalPaperHangers
views/public/installer-tpl-heritage.ejs
98 lines
<%- include('../partials/head', { title, bodyClass: 'tpl-heritage' }) %>
<%- include('../partials/header') %>
<%
function _heroUrl() {
var s = installer.template_settings || {};
if (s.hero_url) return s.hero_url;
if (portfolio.length && portfolio[0].image_url) return portfolio[0].image_url;
var seg = (typeof pickSegmentImage === 'function') ? pickSegmentImage(installer) : null;
return seg ? seg.file : null;
}
var heroUrl = _heroUrl();
%>
<article class="tpl-root">
<% if (installer.founded_year) { %>
<div class="hr-emblem-wrap">
<div class="hr-emblem">
<div class="hr-est">Established</div>
<div class="hr-year"><%= installer.founded_year %></div>
<div class="hr-est"><%= [installer.city, installer.state].filter(Boolean).join(' · ') %></div>
</div>
</div>
<% } %>
<h1 class="hr-name"><%= installer.business_name %></h1>
<p class="hr-place"><% if (installer.team_size) { %><%= installer.team_size %>-person studio · <% } %><%= [installer.city, installer.state].filter(Boolean).join(' · ') %></p>
<% if (heroUrl) { %><img class="hr-hero" src="<%= heroUrl %>" alt="<%= installer.business_name %>"><% } %>
<% if (installer.claim_status === 'unclaimed') { %>
<div class="tpl-claim-cta" style="color:#6b4a1f;border-color:#6b4a1f;font-family:Inter,sans-serif">
<div style="flex:1">If this is your studio, claim the listing to update history, photos, and credentials.</div>
<a href="/installer/<%= installer.slug %>/claim" style="background:#6b4a1f;color:#f7f0e2;padding:10px 22px;text-decoration:none;font-weight:600">Claim →</a>
</div>
<% } %>
<div class="hr-body">
<div class="hr-prose">
<% if (installer.bio) { %><p><%= installer.bio %></p><% } else { %><p><em>Profile not yet completed. The studio's work below speaks first.</em></p><% } %>
<% if ((installer.brands_handled || []).length) { %>
<p style="margin-top:24px"><em>Wallcoverings installed include works from <%= installer.brands_handled.slice(0,8).join(', ') %><% if (installer.brands_handled.length > 8) { %>, among others<% } %>.</em></p>
<% } %>
</div>
<aside class="hr-side">
<h3>Studio</h3>
<ul>
<% if (installer.founded_year) { %><li>Founded<span><%= installer.founded_year %></span></li><% } %>
<% if (installer.team_size) { %><li>Crew<span><%= installer.team_size %></span></li><% } %>
<li>Radius<span><%= installer.service_radius_miles || '—' %> mi</span></li>
<% if (installer.travel_available) { %><li>Travel<span>Yes</span></li><% } %>
<% if (installer.insurance_on_file) { %><li>Insured<span>On file</span></li><% } %>
<% if (acceptance) { %><li>Books<span><%= acceptance.rate %>% of inquiries</span></li><% } %>
</ul>
<% if ((credentials || []).length) { %>
<h3>Credentials</h3>
<ul>
<% credentials.slice(0,8).forEach(function(c){ %>
<li><%= c.brand %><span><%= c.year_issued || c.credential_type.replace(/_/g,' ') %></span></li>
<% }); %>
</ul>
<% } %>
<% if ((installer.accreditations || []).length) { %>
<h3>Memberships</h3>
<ul>
<% installer.accreditations.slice(0,6).forEach(function(a){ %><li><%= a %><span></span></li><% }); %>
</ul>
<% } %>
</aside>
</div>
<% if (portfolio.length) { %>
<section class="hr-portfolio">
<h2>Selected works</h2>
<p class="hr-portfolio-sub">A small archive of recent installations</p>
<div class="hr-pf-grid">
<% portfolio.slice(0,9).forEach(function(p){ %>
<figure class="hr-pf-card">
<% if (p.image_url) { %><img class="tpl-portfolio-img" src="<%= p.image_url %>" alt="<%= p.title %>" loading="lazy"><% } %>
<figcaption><strong><%= p.title %></strong><br><em><%= [p.city, p.state, p.year].filter(Boolean).join(' · ') %><% if (p.brand) { %> · <%= p.brand %><% } %></em></figcaption>
</figure>
<% }); %>
</div>
</section>
<% } %>
<% if (installer.claim_status === 'claimed') { %>
<section class="hr-cta">
<h2>Commission a project</h2>
<a href="/installer/<%= installer.slug %>/book">Open the consultation calendar</a>
</section>
<% } %>
<%- include('../partials/social-videos') %>
</article>
<%- include('../partials/paper-contributions') %>
<%- include('../partials/coi-request') %>
<%- include('../partials/call-installer') %>
<%- include('../partials/footer') %>