OhBeOneKeyNoBe commited on
Commit
d3ddcd0
·
verified ·
1 Parent(s): b638e82

engine 070: footer tabs, header spec, mirror, download gating

Browse files
Files changed (1) hide show
  1. code/o_taviel_ui.py +97 -26
code/o_taviel_ui.py CHANGED
@@ -351,15 +351,23 @@ select{background:var(--panelsolid);color:var(--ink);border:1px solid var(--line
351
  #mnav{display:none}
352
  .mscrim{display:none;position:fixed;inset:0;z-index:75;background:#000a} /* hidden + out of the grid on desktop */
353
  @media (max-width:820px){
354
- header{position:sticky;top:0;z-index:70;flex-wrap:nowrap;gap:6px}
355
- /* CONDENSED HEADER: only ☰ left · YahBible · Tav'iel · ☰ right — every other control
356
- is relocated by script into #mtools at the top of the right menu */
357
  #mnav{display:contents}
358
- #mnav button{width:38px;height:38px;border-radius:50%;border:1px solid var(--line);background:hsl(var(--hue) 24% 20% / .6);color:var(--ink);font-size:18px;cursor:pointer}
359
  #mleftbtn{order:-2}
360
- #homebtn{order:1;margin-left:auto}
361
- #tavielbtn{order:2;margin-right:auto}
 
 
362
  #mrightbtn{order:99}
 
 
 
 
 
 
 
363
  .frame{grid-template-columns:1fr!important;height:auto;min-height:calc(100vh - 39px)}
364
  /* drawers like the desktop panels: OPAQUE (page content never shows through the menu),
365
  but narrower than the screen so the page's edge stays visible beside it */
@@ -373,12 +381,34 @@ select{background:var(--panelsolid);color:var(--ink);border:1px solid var(--line
373
  .mid{padding-bottom:40px}
374
  /* the relocated tools, organized at the top of the right menu */
375
  #mtools{display:flex;flex-direction:column;gap:9px;padding:2px 0 12px;margin-bottom:12px;border-bottom:1px solid var(--line)}
376
- #mtools .searchwrap{display:flex;width:100%}
377
  #mtools .mtrow{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
378
  #mtools .mtrow .ctplus,#mtools .mtrow .ctbtn,#mtools .mtrow .cog{width:38px;height:38px;border-radius:50%;
379
  border:1px solid var(--line);display:inline-flex;align-items:center;justify-content:center}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
380
  }
381
- @media (min-width:821px){ #mtools{display:none} }
382
  /* holographic collapse ✕ (close the verse study / menu) */
383
  .holocollapse{background:transparent;border:0;cursor:pointer;font:800 15px Inter;line-height:1;
384
  background-image:linear-gradient(92deg,#ff5b8a,#ffb14e,#ffe14e,#5fd3a2,#59b8ff,#a58cff,#ff5b8a);background-size:280% 100%;
@@ -1260,16 +1290,17 @@ html.guest .conclbtn{display:none} /* conclusions are for signed-in users, not
1260
  </div>
1261
  </div>
1262
  <header id="topbar">
1263
- <span id="mnav"><button id="mleftbtn" title="Sources">&#9776;</button><button id="mrightbtn" title="Verse study">&#128065;</button></span>
1264
  <button class="ctbtn lefttoggle" id="lefttoggle" title="Menu / Chats &amp; Notes history">&#9776;</button>
1265
  <button class="ctplus holoplus" id="studiobtn" title="Studio: critique video content against the words of Christ">&#128247;</button>
1266
- <button class="brandbtn" id="homebtn" title="Home -- back to the start"><span class="yahbible holo">YahBible</span></button>
1267
  <button class="brandbtn" id="tavielbtn" title="Ask Tav'iel -- the AI chat"><span class="mark" title="Tav -- the mark/seal of truth">&#1514;</span><span class="brand">Tav<em>'iel</em></span></button>
1268
  <div class="searchwrap" id="searchwrap">
1269
  <input id="q" placeholder="Search scripture -- verse, phrase, or word&hellip;" autocomplete="off">
1270
  <button class="mic" id="mic" title="Speak your search">&#127908;</button>
1271
  <button class="go" id="gobtn" title="Find in the scriptures">Find</button>
1272
  <button class="ask" id="askbtn" title="Ask Tav'iel the grounded AI (answers from the roots, not the search index)">Ask Tav&#39;iel</button>
 
1273
  </div>
1274
  <span class="ctspacer"></span>
1275
  <button class="ctplus holoplus" id="splitplus" title="Split into study panes">&#10022;</button>
@@ -3997,33 +4028,73 @@ applySet(); boot(); loadCommandments();
3997
  if(e.target.closest('.w,.vn,.origtok')) { f.classList.add('mright'); }
3998
  });
3999
  })();
4000
- /* CONDENSED MOBILE HEADER: relocate every header control except ☰/YahBible/Tav'iel/☰
4001
- into #mtools at the top of the right menu — and restore them on desktop widths. */
 
 
4002
  (function(){
4003
- var IDS=['searchwrap','lefttoggle','studiobtn','splitplus','notesplus','mobsync','profilebtn','cog'];
 
4004
  var marks={}, moved=false;
4005
- function el(id){return document.getElementById(id)||document.querySelector('.'+id);}
4006
  function verpick(){return document.querySelector('.verpick');}
4007
- function ensureMarks(){ if(marks.done)return;
4008
- IDS.forEach(function(id){var n=el(id); if(n){var m=document.createComment('mt:'+id);
4009
- n.parentNode.insertBefore(m,n); marks[id]=m;}});
4010
- var v=verpick(); if(v){var m=document.createComment('mt:verpick'); v.parentNode.insertBefore(m,v); marks.verpick=m;}
4011
- marks.done=true; }
4012
- function toMenu(){ if(moved)return; ensureMarks();
4013
  var side=document.getElementById('side'); if(!side)return;
4014
- var t=document.getElementById('mtools');
4015
  if(!t){ t=document.createElement('div'); t.id='mtools'; side.insertBefore(t,side.firstChild); }
4016
- var sw=el('searchwrap'); if(sw)t.appendChild(sw);
4017
  var row=t.querySelector('.mtrow');
4018
  if(!row){ row=document.createElement('div'); row.className='mtrow'; t.appendChild(row); }
4019
- var v=verpick(); if(v)row.appendChild(v);
4020
- IDS.slice(1).forEach(function(id){var n=el(id); if(n)row.appendChild(n);});
 
 
 
 
 
 
 
4021
  moved=true; }
4022
  function toHeader(){ if(!moved)return;
4023
- IDS.forEach(function(id){var n=el(id),m=marks[id]; if(n&&m&&m.parentNode)m.parentNode.insertBefore(n,m.nextSibling);});
4024
- var v=verpick(); if(v&&marks.verpick&&marks.verpick.parentNode)marks.verpick.parentNode.insertBefore(v,marks.verpick.nextSibling);
 
 
4025
  moved=false; }
4026
  function apply(){ if(window.matchMedia('(max-width:820px)').matches) toMenu(); else toHeader(); }
4027
  apply(); window.addEventListener('resize',apply);
4028
  })();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4029
  </script></body></html>"""
 
351
  #mnav{display:none}
352
  .mscrim{display:none;position:fixed;inset:0;z-index:75;background:#000a} /* hidden + out of the grid on desktop */
353
  @media (max-width:820px){
354
+ header{position:sticky;top:0;z-index:70;flex-wrap:nowrap;gap:5px;padding:8px 10px}
355
+ /* CONDENSED HEADER: ☰ · א YahBible ת (left) · + ✛ (centre) · ת Tav'iel · ☰ (right) */
 
356
  #mnav{display:contents}
357
+ #mnav button{width:38px;height:38px;border-radius:50%;border:1px solid var(--line);background:hsl(var(--hue) 24% 20% / .6);color:var(--ink);font-size:18px;cursor:pointer;flex:none}
358
  #mleftbtn{order:-2}
359
+ #homebtn{order:-1;margin-right:auto}
360
+ .mheb{display:inline;font-family:"Noto Serif Hebrew",serif;font-weight:700;font-size:15px;color:#e9c877;margin:0 3px}
361
+ #notesplus{order:1} #splitplus{order:2}
362
+ #tavielbtn{order:3;margin-left:auto}
363
  #mrightbtn{order:99}
364
+ /* pressing Tav'iel turns the header INTO the search bar (mic · Find · Ask) */
365
+ header .searchwrap{display:none}
366
+ header.msearch>*{display:none!important}
367
+ header.msearch .searchwrap{display:flex!important;flex:1;order:0;align-items:center;gap:6px}
368
+ header.msearch #msearchx{display:inline-flex!important;order:1;width:38px;height:38px;border-radius:50%;
369
+ border:1px solid var(--line);background:hsl(var(--hue) 24% 20% / .6);color:var(--ink);font-size:16px;
370
+ align-items:center;justify-content:center;cursor:pointer;flex:none}
371
  .frame{grid-template-columns:1fr!important;height:auto;min-height:calc(100vh - 39px)}
372
  /* drawers like the desktop panels: OPAQUE (page content never shows through the menu),
373
  but narrower than the screen so the page's edge stays visible beside it */
 
381
  .mid{padding-bottom:40px}
382
  /* the relocated tools, organized at the top of the right menu */
383
  #mtools{display:flex;flex-direction:column;gap:9px;padding:2px 0 12px;margin-bottom:12px;border-bottom:1px solid var(--line)}
 
384
  #mtools .mtrow{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
385
  #mtools .mtrow .ctplus,#mtools .mtrow .ctbtn,#mtools .mtrow .cog{width:38px;height:38px;border-radius:50%;
386
  border:1px solid var(--line);display:inline-flex;align-items:center;justify-content:center}
387
+ /* right menu: nothing cut off — everything contained, aligned to ITS panel */
388
+ .col.right{overflow-x:hidden}
389
+ .col.right>*,.col.right #studywrap,.col.right #studycard,.col.right #verswrap,.col.right #sideextra
390
+ {max-width:100%;box-sizing:border-box}
391
+ .col.right img,.col.right table{max-width:100%}
392
+ /* Profile · Settings · Studio Mode pinned at the BOTTOM of the right menu */
393
+ .col.right{display:flex;flex-direction:column}
394
+ .col.right>*{flex:none}
395
+ #mrfoot{margin-top:auto;position:sticky;bottom:0;padding:10px 0 6px;border-top:1px solid var(--line);
396
+ background:var(--bg);display:flex;flex-direction:column;gap:6px}
397
+ #mrfoot .mfrow{display:flex;align-items:center;gap:10px;padding:7px 10px;border:1px solid var(--line);
398
+ border-radius:11px;cursor:pointer;background:hsl(var(--hue) 24% 16% / .6);color:var(--ink);font:600 13.5px Inter}
399
+ #mrfoot .mfrow .ctplus,#mrfoot .mfrow .cog,#mrfoot .mfrow .holoplus{width:34px;height:34px;border-radius:50%;
400
+ border:1px solid var(--line);display:inline-flex;align-items:center;justify-content:center;flex:none;pointer-events:none}
401
+ /* the SAME footer tab bar the pure phone app has (hidden when framed inside the app) */
402
+ #mtabbar{position:fixed;left:0;right:0;bottom:0;z-index:74;display:flex;height:58px;
403
+ background:linear-gradient(0deg,hsl(var(--hue) 26% 12%),hsl(var(--hue) 26% 10% / .92));border-top:1px solid var(--line)}
404
+ #mtabbar button{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
405
+ background:transparent;border:0;color:var(--ink);font:600 10px Inter;cursor:pointer}
406
+ #mtabbar button .mti{font-size:17px;line-height:1}
407
+ body.framed #mtabbar{display:none}
408
+ .mid{padding-bottom:74px}
409
+ body.framed .mid{padding-bottom:40px}
410
  }
411
+ @media (min-width:821px){ #mtools,#mrfoot,#mtabbar,#msearchx,.mheb{display:none} }
412
  /* holographic collapse ✕ (close the verse study / menu) */
413
  .holocollapse{background:transparent;border:0;cursor:pointer;font:800 15px Inter;line-height:1;
414
  background-image:linear-gradient(92deg,#ff5b8a,#ffb14e,#ffe14e,#5fd3a2,#59b8ff,#a58cff,#ff5b8a);background-size:280% 100%;
 
1290
  </div>
1291
  </div>
1292
  <header id="topbar">
1293
+ <span id="mnav"><button id="mleftbtn" title="Sources">&#9776;</button><button id="mrightbtn" title="Menu &amp; verse study">&#9776;</button></span>
1294
  <button class="ctbtn lefttoggle" id="lefttoggle" title="Menu / Chats &amp; Notes history">&#9776;</button>
1295
  <button class="ctplus holoplus" id="studiobtn" title="Studio: critique video content against the words of Christ">&#128247;</button>
1296
+ <button class="brandbtn" id="homebtn" title="Home -- back to the start"><span class="mheb">&#1488;</span><span class="yahbible holo">YahBible</span><span class="mheb">&#1514;</span></button>
1297
  <button class="brandbtn" id="tavielbtn" title="Ask Tav'iel -- the AI chat"><span class="mark" title="Tav -- the mark/seal of truth">&#1514;</span><span class="brand">Tav<em>'iel</em></span></button>
1298
  <div class="searchwrap" id="searchwrap">
1299
  <input id="q" placeholder="Search scripture -- verse, phrase, or word&hellip;" autocomplete="off">
1300
  <button class="mic" id="mic" title="Speak your search">&#127908;</button>
1301
  <button class="go" id="gobtn" title="Find in the scriptures">Find</button>
1302
  <button class="ask" id="askbtn" title="Ask Tav'iel the grounded AI (answers from the roots, not the search index)">Ask Tav&#39;iel</button>
1303
+ <button id="msearchx" title="Close search" style="display:none">&#10005;</button>
1304
  </div>
1305
  <span class="ctspacer"></span>
1306
  <button class="ctplus holoplus" id="splitplus" title="Split into study panes">&#10022;</button>
 
4028
  if(e.target.closest('.w,.vn,.origtok')) { f.classList.add('mright'); }
4029
  });
4030
  })();
4031
+ /* CONDENSED MOBILE HEADER + right-menu tools/footer + the phone footer tab bar.
4032
+ Header keeps ☰ · א YahBible ת · + ✛ · Tav'iel · ☰; verpick/history/sync go to the
4033
+ right menu's top tools; Profile/Settings/Studio Mode pin to its bottom. Everything
4034
+ restores on desktop widths. */
4035
  (function(){
4036
+ var TOP=['lefttoggle','mobsync']; // -> #mtools row (with verpick)
4037
+ var FOOT=[['profilebtn','Profile'],['cog','Settings'],['studiobtn','Studio Mode']];
4038
  var marks={}, moved=false;
4039
+ function el(id){return document.getElementById(id);}
4040
  function verpick(){return document.querySelector('.verpick');}
4041
+ function mark(n,key){ if(!marks[key]){var m=document.createComment('mt:'+key); n.parentNode.insertBefore(m,n); marks[key]=m;} }
4042
+ function toMenu(){ if(moved)return;
 
 
 
 
4043
  var side=document.getElementById('side'); if(!side)return;
4044
+ var t=el('mtools');
4045
  if(!t){ t=document.createElement('div'); t.id='mtools'; side.insertBefore(t,side.firstChild); }
 
4046
  var row=t.querySelector('.mtrow');
4047
  if(!row){ row=document.createElement('div'); row.className='mtrow'; t.appendChild(row); }
4048
+ var v=verpick(); if(v){ mark(v,'verpick'); row.appendChild(v); }
4049
+ TOP.forEach(function(id){var n=el(id); if(n){ mark(n,id); row.appendChild(n); }});
4050
+ var f=el('mrfoot');
4051
+ if(!f){ f=document.createElement('div'); f.id='mrfoot'; side.appendChild(f); }
4052
+ FOOT.forEach(function(p){ var n=el(p[0]); if(!n)return; mark(n,p[0]);
4053
+ var r=document.createElement('div'); r.className='mfrow';
4054
+ r.appendChild(n); var s=document.createElement('span'); s.textContent=p[1]; r.appendChild(s);
4055
+ r.onclick=function(ev){ if(ev.target!==n) n.click(); };
4056
+ f.appendChild(r); });
4057
  moved=true; }
4058
  function toHeader(){ if(!moved)return;
4059
+ ['verpick'].concat(TOP).concat(FOOT.map(function(p){return p[0];})).forEach(function(key){
4060
+ var n=(key==='verpick')?verpick():el(key), m=marks[key];
4061
+ if(n&&m&&m.parentNode)m.parentNode.insertBefore(n,m.nextSibling); });
4062
+ var f=el('mrfoot'); if(f)f.innerHTML='';
4063
  moved=false; }
4064
  function apply(){ if(window.matchMedia('(max-width:820px)').matches) toMenu(); else toHeader(); }
4065
  apply(); window.addEventListener('resize',apply);
4066
  })();
4067
+ /* Tav'iel morphs the header into the search bar (mic · Find · Ask) on phones */
4068
+ (function(){
4069
+ var hd=document.querySelector('header'); if(!hd)return;
4070
+ var tb=document.getElementById('tavielbtn'), x=document.getElementById('msearchx');
4071
+ if(tb)tb.addEventListener('click',function(e){
4072
+ if(window.innerWidth>820)return; // desktop keeps its own behavior
4073
+ e.stopPropagation(); e.preventDefault();
4074
+ hd.classList.add('msearch');
4075
+ var q=document.getElementById('q'); if(q)setTimeout(function(){q.focus();},60);
4076
+ },true);
4077
+ if(x)x.onclick=function(){hd.classList.remove('msearch');};
4078
+ })();
4079
+ /* the SAME footer the pure phone app has — hidden when framed inside the app */
4080
+ (function(){
4081
+ try{ if(window.self!==window.top){ document.body.classList.add('framed'); } }catch(e){ document.body.classList.add('framed'); }
4082
+ var bar=document.createElement('nav'); bar.id='mtabbar';
4083
+ bar.innerHTML='<button data-t="home"><span class="mti">&#127968;</span>Home</button>'+
4084
+ '<button data-t="bible"><span class="mti">&#128214;</span>Bible</button>'+
4085
+ '<button data-t="study"><span class="mti">&#128220;</span>Study</button>'+
4086
+ '<button data-t="repent"><span class="mti">&#128330;</span>Repent</button>'+
4087
+ '<button data-t="realizeus"><span class="mti">&#128081;</span>RealizeUS</button>';
4088
+ document.body.appendChild(bar);
4089
+ var f=document.querySelector('.frame');
4090
+ bar.querySelectorAll('button').forEach(function(b){ b.onclick=function(){
4091
+ var t=b.dataset.t;
4092
+ if(f)f.classList.remove('mleft','mright');
4093
+ if(t==='home'){ goHome(); }
4094
+ else if(t==='bible'){ if(f)f.classList.add('mleft'); }
4095
+ else if(t==='study'){ if(typeof renderTenCmd==='function')renderTenCmd(); if(f)f.classList.add('mright'); }
4096
+ else if(t==='repent'){ if(typeof openRepentance==='function')openRepentance(); }
4097
+ else if(t==='realizeus'){ window.open('https://www.RealizeUS.me/@yahwehtsidkenu','_blank'); }
4098
+ };});
4099
+ })();
4100
  </script></body></html>"""