-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocs.html
More file actions
153 lines (153 loc) · 11.7 KB
/
Copy pathdocs.html
File metadata and controls
153 lines (153 loc) · 11.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>InteeBuild — Documentación</title>
<meta name="description" content="Guías completas de InteeBuild: permisos, foreground, providers, API, decompiler y producción."/>
<link rel="stylesheet" href="./css/style.css"/>
<link rel="icon" href="./assets/icon.svg" type="image/svg+xml"/>
<style>
.docs-wrap{max-width:1120px;margin:0 auto;padding:24px;display:grid;grid-template-columns:250px 1fr;gap:20px;align-items:start;}
@media(max-width:860px){.docs-wrap{grid-template-columns:1fr}}
.docs-nav{position:sticky;top:88px;background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:14px;}
.docs-nav b{display:block;font-size:12px;text-transform:uppercase;letter-spacing:.6px;color:var(--muted);margin:4px 0 10px;}
.docs-nav a{display:block;padding:8px 10px;border-radius:8px;color:var(--muted);text-decoration:none;font-size:13px;font-weight:600;}
.docs-nav a:hover{background:var(--surface-2);color:#fff;}
.docs-nav a.active{background:var(--accent-soft);color:#fff;border:1px solid rgba(99,102,241,.35);}
.docs-content{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:28px;min-height:400px;}
.docs-content h1{font-size:24px;margin:0 0 12px;color:#fff;}
.docs-content h2{font-size:17px;margin:26px 0 10px;color:#fff;border-bottom:1px solid rgba(255,255,255,.06);padding-bottom:8px;}
.docs-content h3{font-size:14.5px;margin:18px 0 8px;color:#fff;}
.docs-content p{color:var(--muted);font-size:13.5px;line-height:1.65;}
.docs-content li{color:var(--muted);font-size:13px;margin-bottom:6px;line-height:1.6;}
.docs-content code{font-family:monospace;font-size:12px;background:var(--surface-2);border:1px solid var(--border);padding:2px 6px;border-radius:6px;color:#38bdf8;}
.docs-content pre{background:#0b0f1a;border:1px solid var(--border);border-radius:10px;padding:14px;overflow:auto;font-size:12px;color:#38bdf8;line-height:1.55;}
.docs-content pre code{background:none;border:none;padding:0;}
.docs-content table{width:100%;border-collapse:collapse;margin:12px 0;font-size:12.5px;}
.docs-content th,.docs-content td{border:1px solid var(--border);padding:8px 10px;text-align:left;}
.docs-content th{background:var(--surface-2);color:#fff;}
.docs-content td{color:var(--muted);}
.docs-content blockquote{border-left:3px solid var(--accent);margin:14px 0;padding:8px 14px;background:var(--accent-soft);border-radius:0 8px 8px 0;color:#c7d2fe;font-size:13px;}
.docs-content a{color:var(--accent);}
.docs-loading{color:var(--muted);font-size:13px;}
</style>
</head>
<body>
<header class="topbar">
<div class="brand"><span class="logo"><img src="./assets/icon.svg" width="22" height="22" alt="IB"/></span><div class="brand-txt"><strong>InteeBuild</strong><small>Documentación</small></div></div>
<div class="topbar-right"><a href="./index.html" class="btn ghost sm">← Studio</a><a href="./developer.html" class="btn ghost sm">Developer API</a></div>
</header>
<main class="docs-wrap">
<nav class="docs-nav" id="docsNav"><b>Guías</b></nav>
<article class="docs-content" id="docsContent"><p class="docs-loading">Cargando documentación…</p></article>
</main>
<footer style="max-width:1120px;margin:0 auto;padding:0 24px 30px;display:flex;gap:8px;color:var(--faint);font-size:12px;justify-content:center">
<span>InteeBuild Docs</span><span class="sep">·</span><a href="./index.html">Studio</a><span class="sep">·</span><a href="./developer.html">Developer API</a>
</footer>
<script>
const DOCS=[
{id:'README', file:'docs/README.md', label:'📚 Índice'},
{id:'quickstart', file:'docs/quickstart.md', label:'🚀 Inicio rápido'},
{id:'templates', file:'docs/templates.md', label:'🎨 Plantillas'},
{id:'permissions', file:'docs/permissions.md', label:'🛡️ Permisos'},
{id:'foreground', file:'docs/foreground.md', label:'📻 Foreground'},
{id:'ui-ux', file:'docs/ui-ux.md', label:'✨ UI/UX'},
{id:'security', file:'docs/security.md', label:'🔒 Seguridad'},
{id:'providers', file:'docs/providers.md', label:'📦 Providers'},
{id:'outputs', file:'docs/outputs.md', label:'🌍 Salidas gratis'},
{id:'versions', file:'docs/versions.md', label:'🔄 Versiones y CI/CD'},
{id:'analyzer', file:'docs/analyzer.md', label:'🔍 Analyzer'},
{id:'api', file:'docs/api.md', label:'🧑💻 API'},
{id:'decompiler', file:'docs/decompiler.md', label:'📦 Decompiler'},
{id:'production', file:'docs/production.md', label:'🔒 Producción'},
{id:'troubleshooting', file:'docs/troubleshooting.md', label:'🛟 Problemas'}
];
const ICONS = {
'📚': '<svg class="icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"/><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"/></svg>',
'🚀': '<svg class="icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z"/><path d="M12 15l-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z"/><path d="M9 12l3 3a22 22 0 0 0 2-3.95A12.88 12.88 0 0 0 2 2c0 2.72.78 7.5 6 11a22.35 22.35 0 0 0 4 2z"/><path d="M14.5 9.5l1.5 1.5"/></svg>',
'🎨': '<svg class="icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 19l7-7 3 3-7 7-3-3z"/><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"/><path d="M2 2l7.586 7.586"/><circle cx="11" cy="11" r="2"/></svg>',
'🛡️': '<svg class="icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/><path d="M9 12l2 2 4-4"/></svg>',
'📻': '<svg class="icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="2"/><path d="M16.24 7.76l-2.12 2.12"/><path d="M12 2v4"/><path d="M12 18v4"/><path d="M4.93 4.93l2.12 2.12"/><path d="M19.07 4.93l-2.12 2.12"/><path d="M4.93 19.07l2.12-2.12"/><path d="M16.24 16.24l2.12 2.12"/></svg>',
'✨': '<svg class="icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2a10 10 0 1 0 10 10H12V2z"/><path d="M12 2a10 10 0 0 1 10 10h-10V2z"/><path d="M12 12v10a10 10 0 0 1-10-10h10z"/></svg>',
'🔒': '<svg class="icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>',
'📦': '<svg class="icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg>',
'🌍': '<svg class="icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><line x1="2" y1="12" x2="22" y2="12"/><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/></svg>',
'🔄': '<svg class="icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="23 4 23 10 17 10"/><polyline points="1 20 1 14 7 14"/><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"/></svg>',
'🔍': '<svg class="icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>',
'🧑💻': '<svg class="icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="8.5" cy="7" r="4"/><line x1="20" y1="8" x2="20" y2="14"/><line x1="23" y1="11" x2="17" y2="11"/></svg>',
'🛟': '<svg class="icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M8 14s1.5 2 4 2 4-2 4-2"/><line x1="9" y1="9" x2="9.01" y2="9"/><line x1="15" y1="9" x2="15.01" y2="9"/></svg>'
};
function esc(s){return String(s).replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');}
function md(src){
const lines=src.split('\n');
let html='', inCode=false, codeLang='', codeBuf=[], inTable=false, tableHead=null, tableRows=[], inList=false;
function flushTable(){
if(!tableHead) return;
html+='<table><thead><tr>'+tableHead.map(c=>'<th>'+inline(c)+'</th>').join('')+'</tr></thead><tbody>'
+tableRows.map(r=>'<tr>'+r.map(c=>'<td>'+inline(c)+'</td>').join('')+'</tr>').join('')+'</tbody></table>';
tableHead=null; tableRows=[]; inTable=false;
}
function inline(t){
let s=esc(t);
s=s.replace(/`([^`]+)`/g,'<code>$1</code>');
s=s.replace(/\*\*([^*]+)\*\*/g,'<b>$1</b>');
s=s.replace(/\[([^\]]+)\]\(([^)]+)\)/g,(m,a,b)=>{
if(b.endsWith('.md')) return '<a href="#" data-doc="'+b+'">'+a+'</a>';
return '<a href="'+b+'">'+a+'</a>';
});
return s;
}
for(const line of lines){
if(line.trim().startsWith('```')){ if(!inCode){inCode=true;codeBuf=[];} else {inCode=false;html+='<pre><code>'+esc(codeBuf.join('\n'))+'</code></pre>';} continue; }
if(inCode){codeBuf.push(line);continue;}
if(/^\|.+\|$/.test(line.trim())){
const cells=line.trim().slice(1,-1).split('|').map(c=>c.trim());
if(cells.every(c=>/^:?-{3,}:?$/.test(c))){continue;}
if(!inTable){inTable=true;tableHead=cells;}
else tableRows.push(cells);
continue;
} else if(inTable){flushTable();}
const h=line.match(/^(#{1,3})\s+(.*)/);
if(h){ if(inList){html+='</ul>';inList=false;} html+='<h'+h[1].length+'>'+inline(h[2])+'</h'+h[1].length+'>'; continue; }
if(/^>\s?/.test(line)){ if(inList){html+='</ul>';inList=false;} html+='<blockquote>'+inline(line.replace(/^>\s?/,''))+'</blockquote>'; continue; }
if(/^[-*]\s+/.test(line)){ if(!inList){html+='<ul>';inList=true;} html+='<li>'+inline(line.replace(/^[-*]\s+/,''))+'</li>'; continue; }
if(/^\d+\.\s+/.test(line)){ if(!inList){html+='<ul>';inList=true;} html+='<li>'+inline(line.replace(/^\d+\.\s+/,''))+'</li>'; continue; }
if(!line.trim()){ if(inList){html+='</ul>';inList=false;} continue; }
if(inList){html+='</ul>';inList=false;}
html+='<p>'+inline(line)+'</p>';
}
if(inTable) flushTable();
if(inList) html+='</ul>';
if(inCode) html+='<pre><code>'+esc(codeBuf.join('\n'))+'</code></pre>';
return html;
}
async function loadDoc(id){
const d=DOCS.find(x=>x.id===id)||DOCS[0];
document.querySelectorAll('#docsNav a').forEach(a=>a.classList.toggle('active',a.dataset.doc===d.id));
const box=document.getElementById('docsContent');
box.innerHTML='<p class="docs-loading">Cargando '+d.label+'…</p>';
try{
const r=await fetch(d.file);
if(!r.ok) throw new Error('No se pudo cargar '+d.file);
const t=await r.text();
box.innerHTML=md(t);
box.scrollIntoView({behavior:'smooth',block:'start'});
box.querySelectorAll('a[data-doc]').forEach(a=>a.addEventListener('click',e=>{e.preventDefault();const f=a.getAttribute('data-doc');const m=f.match(/([^/]+)\.md/);loadDoc(m?m[1]:'README');}));
}catch(e){box.innerHTML='<p style="color:var(--danger)">'+esc(e.message)+'</p>';}
location.hash='docs-'+d.id;
}
const nav=document.getElementById('docsNav');
DOCS.forEach(d=>{const a=document.createElement('a');a.href='#docs-'+d.id;a.dataset.doc=d.id;
// Reemplazar emojis con SVGs
let label = d.label;
Object.entries(ICONS).forEach(([emoji, svg]) => {
label = label.replace(new RegExp(emoji.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'g'), svg);
});
a.innerHTML = label;
a.onclick=e=>{e.preventDefault();loadDoc(d.id);};nav.appendChild(a);});
const initial=(location.hash||'').replace('#docs-','');
loadDoc(DOCS.some(d=>d.id===initial)?initial:'README');
</script>
</body>
</html>