Skip to content

Commit 8288def

Browse files
authored
Update index.html
1 parent 5ea0806 commit 8288def

File tree

1 file changed

+67
-18
lines changed

1 file changed

+67
-18
lines changed

index.html

Lines changed: 67 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,72 @@
33
<head>
44
<meta charset="UTF-8">
55
<style>
6-
html, body {margin:0; padding:0; height:100%; background:#f4f4f4; font-family:sans-serif}
7-
#pagina {display:flex; flex-direction:column; align-items:center; padding:20px; gap:10px}
8-
#planilha-wrapper {max-width:90vw; max-height:80vh; overflow:auto; border:1px solid #ccc; background:white; box-shadow:0 2px 10px rgba(0,0,0,0.1)}
9-
table {border-collapse:collapse; table-layout:fixed}
10-
th, td {padding:8px; border:1px solid #ccc; overflow:hidden; word-break:break-word}
11-
th {background:#444; color:#fff; position:sticky; top:0; z-index:2}
12-
.th-wrapper {position:relative; width:100%; height:100%; cursor:pointer}
13-
.resizer {position:absolute; top:0; width:20px; height:100%; cursor:col-resize; z-index:10; user-select:none}
6+
html, body {
7+
margin: 0;
8+
padding: 0;
9+
height: 100%;
10+
background: #f4f4f4;
11+
font-family: sans-serif;
12+
}
13+
#pagina {
14+
display: flex;
15+
flex-direction: column;
16+
height: 100%;
17+
}
18+
#planilha-topo {
19+
padding: 20px;
20+
text-align: center;
21+
}
22+
#planilha-wrapper {
23+
flex-grow: 1;
24+
display: flex;
25+
justify-content: center;
26+
overflow: auto;
27+
}
28+
#planilha-container {
29+
max-width: 90vw;
30+
border: 1px solid #ccc;
31+
background: white;
32+
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
33+
}
34+
table {
35+
border-collapse: collapse;
36+
table-layout: fixed;
37+
}
38+
th, td {
39+
padding: 8px;
40+
border: 1px solid #ccc;
41+
overflow: hidden;
42+
word-break: break-word;
43+
}
44+
th {
45+
background: #444;
46+
color: #fff;
47+
position: sticky;
48+
top: 0;
49+
z-index: 2;
50+
}
51+
.th-wrapper {
52+
position: relative;
53+
width: 100%;
54+
height: 100%;
55+
cursor: pointer;
56+
}
57+
.resizer {
58+
position: absolute;
59+
top: 0;
60+
width: 20px;
61+
height: 100%;
62+
cursor: col-resize;
63+
z-index: 10;
64+
user-select: none;
65+
}
66+
#planilha-rodape {
67+
padding: 10px;
68+
text-align: center;
69+
font-size: 13px;
70+
color: #666;
71+
}
1472
</style>
1573
</head>
1674
<body>
@@ -19,22 +77,19 @@
1977
<div id="planilha-wrapper">
2078
<div id="planilha-container"><noscript>Enable JavaScript!</noscript></div>
2179
</div>
80+
<div id="planilha-rodape">v1.1 - by <a target=_blank href="https://t.me/VD_Priv8">@VD_Priv8</a> - <a target=_blank href="https://t.me/RootDetected">Join @RootDetected</a></div>
2281
</div>
23-
2482
<script>
2583
const path = (location.hash && location.hash !== "#") ? location.hash.slice(1) : "Empty";
2684
const script = document.createElement("script");
2785
script.src = `tables/${path}.js`;
2886
script.onload = () => initPlanilha();
2987
script.onerror = () => alert("Table not found: " + path + ".");
3088
document.head.appendChild(script);
31-
3289
function initPlanilha(){
3390
document.getElementById("planilha-topo").innerHTML = info;
3491
document.title = title;
35-
3692
let colRefs = [], ordemCrescente = {};
37-
3893
function renderTabela(){
3994
const tabela = document.createElement("table");
4095
const colgroup = document.createElement("colgroup");
@@ -45,7 +100,6 @@
45100
return col;
46101
});
47102
tabela.appendChild(colgroup);
48-
49103
const thead = document.createElement("thead");
50104
const trHead = document.createElement("tr");
51105
columns.forEach((titulo, i) => {
@@ -76,7 +130,6 @@
76130
});
77131
thead.appendChild(trHead);
78132
tabela.appendChild(thead);
79-
80133
const tbody = document.createElement("tbody");
81134
data.forEach(linha => {
82135
const tr = document.createElement("tr");
@@ -103,12 +156,10 @@
103156
tbody.appendChild(tr);
104157
});
105158
tabela.appendChild(tbody);
106-
107159
const container = document.getElementById("planilha-container");
108160
container.innerHTML = "";
109161
container.appendChild(tabela);
110162
}
111-
112163
function ordenarPorColuna(indice){
113164
ordemCrescente = {[indice]: !(ordemCrescente[indice] ?? false)};
114165
data.sort((a, b) => {
@@ -120,7 +171,6 @@
120171
});
121172
renderTabela();
122173
}
123-
124174
function iniciarResize(index){
125175
return function(e){
126176
e.preventDefault();
@@ -139,7 +189,6 @@
139189
document.addEventListener("mouseup", onMouseUp);
140190
}
141191
}
142-
143192
renderTabela();
144193
}
145194
</script>

0 commit comments

Comments
 (0)