Post-PR-#11 polish: demo UI, staffer console, face pool, icons, contractor profile (24 commits) #12
@ -319,7 +319,7 @@ function loadChapter4(){
|
||||
seen.push(n);
|
||||
if(seen.length>1) contractors.appendChild(document.createTextNode(' · '));
|
||||
var a=document.createElement('a');
|
||||
a.href='/contractor?name='+encodeURIComponent(n);
|
||||
a.href=P+'/contractor?name='+encodeURIComponent(n);
|
||||
a.target='_blank';
|
||||
a.rel='noopener';
|
||||
a.style.cssText='color:#58a6ff;text-decoration:none;border-bottom:1px dotted #58a6ff44';
|
||||
|
||||
@ -66,6 +66,12 @@ body{font-family:'Inter',-apple-system,system-ui,sans-serif;background:#090c10;c
|
||||
<script>
|
||||
function $(id){return document.getElementById(id)}
|
||||
|
||||
// Path prefix detection — devop.live serves this page under /lakehouse,
|
||||
// localhost:3700 serves it at root. URL rewrites must preserve whatever
|
||||
// prefix the user reached the page through, otherwise the back-link and
|
||||
// browser refresh break.
|
||||
var P=location.pathname.indexOf('/lakehouse')>=0?'/lakehouse':'';
|
||||
|
||||
// Bootstrap from URL: /contractor?name=Turner+Construction
|
||||
window.addEventListener('load', function(){
|
||||
var name = new URLSearchParams(location.search).get('name');
|
||||
@ -73,19 +79,22 @@ window.addEventListener('load', function(){
|
||||
$('q').value = name;
|
||||
lookup();
|
||||
}
|
||||
// Back link respects the prefix too
|
||||
var back=document.querySelector('.bar a');
|
||||
if(back) back.href=P+'/';
|
||||
});
|
||||
|
||||
function lookup(){
|
||||
var name = $('q').value.trim();
|
||||
if(!name){ $('out').textContent = ''; return; }
|
||||
history.replaceState({}, '', '/contractor?name='+encodeURIComponent(name));
|
||||
history.replaceState({}, '', P+'/contractor?name='+encodeURIComponent(name));
|
||||
var out = $('out');
|
||||
out.textContent = '';
|
||||
var ld = document.createElement('div');
|
||||
ld.className = 'ld';
|
||||
ld.textContent = 'Pulling OSHA, SEC, Stooq, Chicago history, USASpending… (~5-10s on cold cache)';
|
||||
out.appendChild(ld);
|
||||
fetch('/intelligence/contractor_profile',{
|
||||
fetch(P+'/intelligence/contractor_profile',{
|
||||
method:'POST',
|
||||
headers:{'Content-Type':'application/json'},
|
||||
body:JSON.stringify({name:name})
|
||||
|
||||
@ -1190,7 +1190,7 @@ function renderEntityBrief(host, brief){
|
||||
var tkr=document.createElement('span');
|
||||
tkr.style.cssText='font-family:ui-monospace,SFMono-Regular,monospace;background:#161b22;padding:2px 6px;border-radius:4px;color:#58a6ff;border:1px solid #58a6ff44;font-weight:600;font-size:10px';
|
||||
tkr.textContent=e.ticker||'LLC·?';
|
||||
var nm=document.createElement('a');nm.href='/contractor?name='+encodeURIComponent(e.display_name||'');
|
||||
var nm=document.createElement('a');nm.href=P+'/contractor?name='+encodeURIComponent(e.display_name||'');
|
||||
nm.target='_blank';nm.rel='noopener';
|
||||
nm.style.cssText='color:#e6edf3;font-weight:600;font-size:12px;text-decoration:none;border-bottom:1px dotted #58a6ff44';
|
||||
nm.title='Open full contractor profile';
|
||||
@ -1654,7 +1654,7 @@ function loadLiveContracts(){
|
||||
var preview=[];
|
||||
function contactLink(n){
|
||||
var a=document.createElement('a');
|
||||
a.href='/contractor?name='+encodeURIComponent(n);
|
||||
a.href=P+'/contractor?name='+encodeURIComponent(n);
|
||||
a.target='_blank';a.rel='noopener';
|
||||
a.style.cssText='color:inherit;text-decoration:none;border-bottom:1px dotted #58a6ff44';
|
||||
a.title='Open full contractor profile';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user