-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwhat-is-component-based-demo.html
More file actions
54 lines (52 loc) · 2.16 KB
/
Copy pathwhat-is-component-based-demo.html
File metadata and controls
54 lines (52 loc) · 2.16 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
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>$dir 演示</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/react@18/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
</head>
<body class="bg-gray-50">
<div id="root"></div>
<script type="text/babel">
const { useState } = React
function App() {
return (
<div className="min-h-screen py-12 px-4 sm:px-6 lg:px-8">
<div className="max-w-7xl mx-auto">
<h1 className="text-4xl font-bold text-center mb-12 text-gray-800">
$dir - ${dir^} Demo
</h1>
<div className="bg-white rounded-xl shadow-lg p-8">
<h2 className="text-2xl font-semibold mb-6">📚 ${dir^} 介绍</h2>
<p className="text-gray-600 mb-6">这是一个关于 $dir 的交互式演示。</p>
<div className="grid md:grid-cols-2 gap-6">
<div className="p-6 bg-blue-50 rounded-lg">
<h3 className="text-lg font-semibold mb-4">核心特性</h3>
<p className="text-sm text-gray-600">演示相关功能和概念...</p>
</div>
<div className="p-6 bg-green-50 rounded-lg">
<h3 className="text-lg font-semibold mb-4">实际应用</h3>
<p className="text-sm text-gray-600">展示在实际项目中的应用...</p>
</div>
</div>
<div className="mt-8 text-center">
<button
onClick={() => alert('了解更多关于 $dir 的知识')}
className="bg-blue-500 hover:bg-blue-600 text-white px-8 py-3 rounded-lg transition"
>
了解更多
</button>
</div>
</div>
</div>
</div>
)
}
ReactDOM.render(<App />, document.getElementById('root'))
</script>
</body>
</html>