-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbasic-html.html
More file actions
141 lines (125 loc) · 3.26 KB
/
basic-html.html
File metadata and controls
141 lines (125 loc) · 3.26 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>OnChat Widget - Basic Example</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
padding: 2rem;
}
.container {
max-width: 1200px;
width: 100%;
}
header {
text-align: center;
color: white;
margin-bottom: 2rem;
}
h1 {
font-size: 2.5rem;
margin-bottom: 0.5rem;
font-weight: 700;
}
.subtitle {
font-size: 1.1rem;
opacity: 0.9;
}
.chat-container {
background: white;
border-radius: 16px;
padding: 2rem;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.info {
background: #f3f4f6;
border-left: 4px solid #667eea;
padding: 1rem;
margin-bottom: 1.5rem;
border-radius: 4px;
}
.info h3 {
margin-bottom: 0.5rem;
color: #374151;
}
.info p {
color: #6b7280;
line-height: 1.6;
}
.info code {
background: white;
padding: 0.2rem 0.4rem;
border-radius: 3px;
font-family: 'Courier New', monospace;
font-size: 0.9rem;
color: #667eea;
}
footer {
text-align: center;
color: white;
margin-top: 2rem;
opacity: 0.8;
}
footer a {
color: white;
text-decoration: underline;
}
</style>
</head>
<body>
<div class="container">
<header>
<h1>🚀 OnChat Widget Demo</h1>
<p class="subtitle">Decentralized chat for your Base dApp</p>
</header>
<div class="chat-container">
<div class="info">
<h3>💡 How to integrate</h3>
<p>
Adding OnChat to your dApp takes just 3 lines of code:
</p>
<pre style="margin-top: 1rem; overflow-x: auto;"><code><div id="onchat-widget"></div>
<script src="https://onchat.sebayaki.com/widget.js"></script>
<script>
OnChat.mount('#onchat-widget', {
channel: 'your-channel-name'
});
</script></code></pre>
</div>
<!-- OnChat Widget Container -->
<div id="onchat-widget"></div>
</div>
<footer>
<p>
Built with ❤️ for Base |
<a href="https://github.com/sebayaki/onchat" target="_blank">GitHub</a> |
<a href="https://onchat.sebayaki.com" target="_blank">Website</a>
</p>
</footer>
</div>
<!-- OnChat Widget Script -->
<script src="https://onchat.sebayaki.com/widget.js"></script>
<script>
// Mount the OnChat widget
OnChat.mount('#onchat-widget', {
channel: 'demo', // Your channel name
height: '600px', // Widget height
theme: 'dracula', // Choose a theme
hideBrand: false, // Show/hide "Powered by OnChat"
hideMobileTabs: false // Show/hide mobile navigation
});
</script>
</body>
</html>