forked from vercel/streamdown
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest-speed-highlight.html
More file actions
105 lines (97 loc) · 2.68 KB
/
test-speed-highlight.html
File metadata and controls
105 lines (97 loc) · 2.68 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
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Test Speed Highlight</title>
<link rel="stylesheet" href="https://unpkg.com/@speed-highlight/core/dist/themes/default.css">
<style>
body {
font-family: Arial, sans-serif;
max-width: 800px;
margin: 0 auto;
padding: 20px;
background-color: #1a1a1a;
color: #ffffff;
}
.code-block {
margin: 20px 0;
border: 1px solid #333;
border-radius: 8px;
overflow: hidden;
}
.code-header {
background-color: #2d2d2d;
padding: 10px;
font-size: 12px;
color: #888;
}
.code-content {
background-color: #1e1e1e;
padding: 15px;
overflow-x: auto;
}
</style>
</head>
<body>
<h1>Test de Speed Highlight</h1>
<div class="code-block">
<div class="code-header">HTML</div>
<div class="code-content">
<pre><code class="shj-lang-html"><div class="container">
<h1>Hola Mundo</h1>
<p>Este es un ejemplo de HTML</p>
</div></code></pre>
</div>
</div>
<div class="code-block">
<div class="code-header">CSS</div>
<div class="code-content">
<pre><code class="shj-lang-css">.container {
display: flex;
flex-direction: column;
align-items: center;
padding: 20px;
}
h1 {
color: #007acc;
font-size: 2rem;
}</code></pre>
</div>
</div>
<div class="code-block">
<div class="code-header">JavaScript</div>
<div class="code-content">
<pre><code class="shj-lang-javascript">function saludar(nombre) {
return `Hola, ${nombre}!`;
}
const usuario = "Mundo";
console.log(saludar(usuario));</code></pre>
</div>
</div>
<div class="code-block">
<div class="code-header">TypeScript</div>
<div class="code-content">
<pre><code class="shj-lang-typescript">interface Usuario {
id: number;
nombre: string;
email: string;
}
const crearUsuario = (datos: Omit<Usuario, 'id'>): Usuario => {
return {
id: Math.random(),
...datos
};
};</code></pre>
</div>
</div>
<script src="https://unpkg.com/@speed-highlight/core/dist/index.js"></script>
<script>
// Test Speed Highlight
document.addEventListener('DOMContentLoaded', () => {
console.log('Speed Highlight cargado');
// highlightAll() se ejecuta automáticamente
});
</script>
</body>
</html>