clone

a photo toolkit for your phone that never uploads: fuji film looks for raw files, social crops, error level analysis

Landing: info button and details sheet per tool card

Dami committed 934d0b5
commit
934d0b53beead12c44f0b6bc0758a091108a8187
parent
f41a40e37d0e93986ab59189c91edec00132014e
author
Dami <dami.etoile@gmail.com>
3 files changed, +30 -9
Mhome.mjs9+++++++++
Mindex.html22++++++++++++++++------
Mstyle.css8+++++---
M home.mjs +9 -0
@@ -14,3 +14,12 @@ if('serviceWorker'in navigator){
1414 let hadController=Boolean(navigator.serviceWorker.controller);navigator.serviceWorker.addEventListener('controllerchange',()=>{if(hadController)location.reload();hadController=true;});1515 navigator.serviceWorker.register('./sw.js').then(async()=>{await navigator.serviceWorker.ready;$('offline-status').textContent='Works offline.';}).catch(()=>{});1616 }17+18+// Per-tool details, opened from the info button on each card.19+const TOOLS={20+ perspective:['Perspective',['JPEG and PNG.','Straightens verticals and horizontals from detected lines. Up to 4 MP and 2560 px.','Saved copies drop EXIF and color profiles.']],21+ fuji:['Fuji',['RAF files, developed at half size with the camera\'s lens corrections.','16 film simulation looks as LUTs fitted from a Fuji body: close to the camera, not the camera\'s own rendering.','The in-camera JPEG can be saved as is.']],22+ social:['Social',['JPEG, PNG and WebP.','Aspect ratios for photo and social, crop or pad, frame, vignette and grain.','Social ratios export with a 1080 short side. Photo ratios keep resolution up to 2160.']]};23+const toolSheet=$('tool-sheet');24+for(const b of document.querySelectorAll('[data-info]'))b.onclick=e=>{e.preventDefault();const [title,paras]=TOOLS[b.dataset.info];$('tool-title').textContent=title;$('tool-text').replaceChildren(...paras.map(t=>{const p=document.createElement('p');p.textContent=t;return p;}));toolSheet.showModal();};25+toolSheet.querySelector('[data-close]').onclick=()=>toolSheet.close();toolSheet.addEventListener('click',e=>{if(e.target===toolSheet)toolSheet.close();});
M index.html +16 -6
@@ -21,20 +21,23 @@
2121 <h1 class="home-title">gud.pics</h1>2222 2323 <ul class="tools">24- <li>25- <a class="tool-card" href="./perspective">24+ <li class="tool-card">25+ <button class="tool-info" data-info="perspective" aria-label="About Perspective"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/></svg></button>26+ <a class="tool-link" href="./perspective">2627 <span class="tool-glyph"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/><path d="M14 15H9v-5"/><path d="M16 3h5v5"/><path d="M21 3 9 15"/></svg></span>2728 <h2>Perspective</h2>2829 </a>2930 </li>30- <li>31- <a class="tool-card" href="./fuji">31+ <li class="tool-card">32+ <button class="tool-info" data-info="fuji" aria-label="About Fuji"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/></svg></button>33+ <a class="tool-link" href="./fuji">3234 <span class="tool-glyph"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><path d="m14.31 8 5.74 9.94"/><path d="M9.69 8h11.48"/><path d="m7.38 12 5.74-9.94"/><path d="M9.69 16 3.95 6.06"/><path d="M14.31 16H2.83"/><path d="m16.62 12-5.74 9.94"/></svg></span>3335 <h2>Fuji</h2>3436 </a>3537 </li>36- <li>37- <a class="tool-card" href="./social">38+ <li class="tool-card">39+ <button class="tool-info" data-info="social" aria-label="About Social"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/></svg></button>40+ <a class="tool-link" href="./social">3841 <span class="tool-glyph"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect width="20" height="16" x="2" y="4" rx="2"/><path d="M12 9v11"/><path d="M2 9h13a2 2 0 0 1 2 2v9"/></svg></span>3942 <h2>Social</h2>4043 </a>
@@ -50,6 +53,13 @@
5053 </section>5154 </main>5255 56+ <dialog id="tool-sheet" class="sheet" aria-labelledby="tool-title">57+ <div class="sheet-body" tabindex="-1" autofocus>58+ <div class="grabber"></div>59+ <div class="sheet-head"><h2 id="tool-title"></h2><button class="sheet-close" data-close>Done</button></div>60+ <div id="tool-text"></div>61+ </div>62+ </dialog>5363 <dialog id="info" class="sheet" aria-labelledby="info-title">5464 <div class="sheet-body" tabindex="-1" autofocus>5565 <div class="grabber"></div>
M style.css +5 -3