-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcapitulo1.html
More file actions
104 lines (101 loc) · 3.78 KB
/
Copy pathcapitulo1.html
File metadata and controls
104 lines (101 loc) · 3.78 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
<script type="text/javascript">
var gk_isXlsx = false;
var gk_xlsxFileLookup = {};
var gk_fileData = {};
function filledCell(cell) {
return cell !== '' && cell != null;
}
function loadFileData(filename) {
if (gk_isXlsx && gk_xlsxFileLookup[filename]) {
try {
var workbook = XLSX.read(gk_fileData[filename], { type: 'base64' });
var firstSheetName = workbook.SheetNames[0];
var worksheet = workbook.Sheets[firstSheetName];
// Convert sheet to JSON to filter blank rows
var jsonData = XLSX.utils.sheet_to_json(worksheet, { header: 1, blankrows: false, defval: '' });
// Filter out blank rows (rows where all cells are empty, null, or undefined)
var filteredData = jsonData.filter(row => row.some(filledCell));
// Heuristic to find the header row by ignoring rows with fewer filled cells than the next row
var headerRowIndex = filteredData.findIndex((row, index) =>
row.filter(filledCell).length >= filteredData[index + 1]?.filter(filledCell).length
);
// Fallback
if (headerRowIndex === -1 || headerRowIndex > 25) {
headerRowIndex = 0;
}
// Convert filtered JSON back to CSV
var csv = XLSX.utils.aoa_to_sheet(filteredData.slice(headerRowIndex)); // Create a new sheet from filtered array of arrays
csv = XLSX.utils.sheet_to_csv(csv, { header: 1 });
return csv;
} catch (e) {
console.error(e);
return "";
}
}
return gk_fileData[filename] || "";
}
</script><!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tao Te Ching - Código da Presença</title>
<style>
body {
margin: 0;
background-color: #1e1e1e; /* Fundo escuro, como editor de código */
color: #d4d4d4; /* Texto claro */
font-family: 'Fira Code', 'Courier New', monospace;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
.editor {
background-color: #252526;
border: 1px solid #3c3c3c;
border-radius: 5px;
padding: 20px;
max-width: 800px;
width: 90%;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}
h1 {
color: #569cd6; /* Azul, como palavras-chave em editores */
font-size: 1.8em;
margin-bottom: 20px;
}
p {
color: #d4d4d4;
line-height: 1.6;
margin: 10px 0;
}
.verse {
color: #ce9178; /* Laranja, como strings em código */
}
.dedication {
color: #6a9955; /* Verde, como comentários em código */
font-style: italic;
margin-top: 20px;
}
/* Simula números de linha */
.line-number {
color: #858585;
display: inline-block;
width: 30px;
text-align: right;
margin-right: 10px;
}
</style>
</head>
<body>
<div class="editor">
<h1># Tao Te Ching - Capítulo 1</h1>
<p><span class="line-number">1</span><span class="verse">O melhor atleta quer seu oponente no seu melhor.</span></p>
<p><span class="line-number">2</span><span class="verse">O Melhor empresário serve ao bem comum.</span></p>
<p><span class="line-number">3</span><span class="verse">O sem-nome é o princípio do céu e da terra;</span></p>
<p><span class="line-number">4</span><span class="verse">O nomeado é a mãe de todas as coisas.</span></p>
<p class="dedication"><span class="line-number">5</span># Para Miau, pela promessa de presença.</p>
</div>
</body>
</html>