← back to Costa Rica
costa-rica: Cody-gate fixes on sort+density — harmonize vertical density range to 2-6 (kills shared cr-cols localStorage split-brain vs search/region), add parseInt bounds-clamp on restore (mirrors region.html), relabel 'Verified first'->'Registered first' (honest: sorts by cedula_juridica registry presence, not a trust signal) — TK-10346
98a302996513e8c796d9ed4638f4c0473b5e579a · 2026-08-07 11:44:40 -0700 · Steve
Files touched
M public/search.htmlM public/vertical.html
Diff
commit 98a302996513e8c796d9ed4638f4c0473b5e579a
Author: Steve <steve@designerwallcoverings.com>
Date: Fri Aug 7 11:44:40 2026 -0700
costa-rica: Cody-gate fixes on sort+density — harmonize vertical density range to 2-6 (kills shared cr-cols localStorage split-brain vs search/region), add parseInt bounds-clamp on restore (mirrors region.html), relabel 'Verified first'->'Registered first' (honest: sorts by cedula_juridica registry presence, not a trust signal) — TK-10346
---
public/search.html | 4 ++--
public/vertical.html | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/public/search.html b/public/search.html
index b3f77f7..f8a10da 100644
--- a/public/search.html
+++ b/public/search.html
@@ -95,7 +95,7 @@
<select id="sort">
<option value="relevance">Relevance</option>
<option value="name">Name A→Z</option>
- <option value="verified">Verified first</option>
+ <option value="verified">Registered first</option>
</select>
</div>
<div class="ctrl"><label for="cols">Density</label>
@@ -118,7 +118,7 @@
if(params.get('q')) qInput.value=params.get('q');
// Density: restore persisted column count
- (function(){try{const c=localStorage.getItem('cr-cols');if(c){document.documentElement.style.setProperty('--cols',c);colsInput.value=c;}}catch{}})();
+ (function(){try{const c=localStorage.getItem('cr-cols');if(c){const n=Math.min(Math.max(parseInt(c,10)||4,2),6);document.documentElement.style.setProperty('--cols',n);colsInput.value=n;}}catch{}})();
colsInput.addEventListener('input',e=>{document.documentElement.style.setProperty('--cols',e.target.value);try{localStorage.setItem('cr-cols',e.target.value);}catch{}});
let lastData=null,lastQ='';
diff --git a/public/vertical.html b/public/vertical.html
index 654e031..55629ac 100644
--- a/public/vertical.html
+++ b/public/vertical.html
@@ -136,7 +136,7 @@
<section class="panel">
<div class="panel-head">
<h2>Featured ${label}</h2>
- ${v.samples&&v.samples.length?`<label class="dens">Density <input id="cols" type="range" min="2" max="5" step="1" value="3" /></label>`:''}
+ ${v.samples&&v.samples.length?`<label class="dens">Density <input id="cols" type="range" min="2" max="6" step="1" value="3" /></label>`:''}
</div>
<div class="pgrid">${samplesHtml||'<span style="color:var(--muted);font-size:13px">no listings yet</span>'}</div>
</section>
@@ -155,7 +155,7 @@
// Density: restore + wire the Featured-grid column slider
const colsInput=document.getElementById('cols');
if(colsInput){
- try{const c=localStorage.getItem('cr-cols');if(c){document.documentElement.style.setProperty('--cols',c);colsInput.value=c;}}catch{}
+ try{const c=localStorage.getItem('cr-cols');if(c){const n=Math.min(Math.max(parseInt(c,10)||3,2),6);document.documentElement.style.setProperty('--cols',n);colsInput.value=n;}}catch{}
colsInput.addEventListener('input',e=>{document.documentElement.style.setProperty('--cols',e.target.value);try{localStorage.setItem('cr-cols',e.target.value);}catch{}});
}
}).catch(e=>{document.getElementById('main').innerHTML=`<p style="color:var(--muted)">Could not load: ${e.message}</p>`;});
← c05bcd2 costa-rica: BEST WAY TO CONTACT — contact-card endpoint (wha
·
back to Costa Rica
·
auto-data-snapshot: 2026-08-07T11:47:33 (3 data files) — .de c84163c →