-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomprehensive.html
More file actions
221 lines (210 loc) · 6.81 KB
/
comprehensive.html
File metadata and controls
221 lines (210 loc) · 6.81 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Demo: Comprehensive / Combined</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: Arial, sans-serif; padding: 20px; background: #fafafa; }
/* ---- Card component ---- */
.card {
width: 320px;
background: white;
border: 1px solid #e0e0e0;
border-radius: 12px;
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
margin: 20px 0;
overflow: hidden;
}
.card-header {
background: linear-gradient(135deg, #1a237e, #3949ab);
color: white;
padding: 16px 20px;
font-size: 18px;
font-weight: 700;
}
.card-body { padding: 16px 20px; }
.card-body p {
font-size: 14px;
line-height: 1.6;
color: #555;
margin-bottom: 12px;
}
.card-footer {
display: flex;
gap: 10px;
padding: 12px 20px;
border-top: 1px solid #e0e0e0;
background: #f5f5f5;
}
.btn {
padding: 8px 16px;
border: none;
border-radius: 6px;
font-size: 13px;
font-weight: 600;
cursor: pointer;
}
.btn-primary { background: #1e88e5; color: white; }
.btn-outline { background: transparent; border: 2px solid #1e88e5; color: #1e88e5; }
/* ---- Dashboard layout ---- */
.dashboard {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 16px;
width: 600px;
margin: 20px 0;
}
.stat-box {
padding: 16px;
background: white;
border-radius: 10px;
border: 1px solid #e0e0e0;
text-align: center;
}
.stat-box .value {
font-size: 28px;
font-weight: 800;
color: #1a237e;
}
.stat-box .label {
font-size: 12px;
color: #888;
margin-top: 4px;
text-transform: uppercase;
letter-spacing: 1px;
}
/* ---- SVG inline ---- */
.svg-section {
margin: 20px 0;
padding: 16px;
background: white;
border: 1px solid #e0e0e0;
border-radius: 8px;
}
/* ---- Transformed badge ---- */
.badge-container {
display: flex;
gap: 12px;
margin: 20px 0;
}
.badge {
display: inline-block;
padding: 6px 14px;
border-radius: 20px;
font-size: 12px;
font-weight: 700;
color: white;
}
.badge-success { background: #43a047; }
.badge-warning { background: #fb8c00; transform: rotate(-3deg); }
.badge-error { background: #e53935; transform: scale(1.1); }
.badge-info { background: #1e88e5; transform: skewX(-5deg); }
/* ---- Shadow DOM host ---- */
.widget-host {
margin: 20px 0;
}
/* ---- Overlapping elements ---- */
.overlap-zone {
position: relative;
width: 200px;
height: 160px;
margin: 20px 0;
}
.overlap-circle {
position: absolute;
width: 100px; height: 100px;
border-radius: 50%;
opacity: 0.7;
}
.oc-1 { top: 0; left: 0; background: #f44336; z-index: 1; }
.oc-2 { top: 20px; left: 40px; background: #4caf50; z-index: 2; }
.oc-3 { top: 40px; left: 80px; background: #2196f3; z-index: 3; }
</style>
</head>
<body>
<div id="root">
<!-- Card with gradient header -->
<div class="card">
<div class="card-header">Feature Overview</div>
<div class="card-body">
<p>This card combines gradients, borders, border-radius, box-shadow, and typography in a realistic component layout.</p>
</div>
<div class="card-footer">
<button class="btn btn-primary">Accept</button>
<button class="btn btn-outline">Cancel</button>
</div>
</div>
<!-- Dashboard stats grid -->
<div class="dashboard">
<div class="stat-box">
<div class="value">1,284</div>
<div class="label">Users</div>
</div>
<div class="stat-box">
<div class="value">$34k</div>
<div class="label">Revenue</div>
</div>
<div class="stat-box">
<div class="value">98.6%</div>
<div class="label">Uptime</div>
</div>
</div>
<!-- Inline SVG chart -->
<div class="svg-section">
<svg width="280" height="120" viewBox="0 0 280 120">
<defs>
<linearGradient id="barGrad" x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stop-color="#42a5f5"/>
<stop offset="100%" stop-color="#1565c0"/>
</linearGradient>
</defs>
<!-- Bar chart -->
<rect x="10" y="80" width="30" height="40" fill="url(#barGrad)" rx="3"/>
<rect x="50" y="50" width="30" height="70" fill="url(#barGrad)" rx="3"/>
<rect x="90" y="30" width="30" height="90" fill="url(#barGrad)" rx="3"/>
<rect x="130" y="60" width="30" height="60" fill="url(#barGrad)" rx="3"/>
<rect x="170" y="20" width="30" height="100" fill="url(#barGrad)" rx="3"/>
<rect x="210" y="45" width="30" height="75" fill="url(#barGrad)" rx="3"/>
<rect x="250" y="10" width="30" height="110" fill="url(#barGrad)" rx="3"/>
<!-- Trend line -->
<polyline points="25,70 65,40 105,20 145,50 185,10 225,35 265,5"
fill="none" stroke="#e53935" stroke-width="2" stroke-linecap="round"/>
<text x="140" y="118" text-anchor="middle" font-size="10" fill="#888">Monthly Data</text>
</svg>
</div>
<!-- Transformed badges -->
<div class="badge-container">
<span class="badge badge-success">Active</span>
<span class="badge badge-warning">Pending</span>
<span class="badge badge-error">Critical</span>
<span class="badge badge-info">Info</span>
</div>
<!-- Shadow DOM widget -->
<div class="widget-host">
<template shadowrootmode="open">
<style>
:host {
display: block;
border: 2px solid #7e57c2;
border-radius: 10px;
padding: 16px;
background: linear-gradient(to bottom, #ede7f6, #d1c4e9);
}
.title { font-size: 16px; font-weight: 700; color: #4527a0; margin-bottom: 8px; }
.content { font-size: 13px; color: #5e35b1; line-height: 1.5; }
</style>
<div class="title">Shadow DOM Widget</div>
<div class="content">This widget lives inside a declarative shadow root with its own scoped styles, gradients, and borders.</div>
</template>
</div>
<!-- Overlapping with opacity -->
<div class="overlap-zone">
<div class="overlap-circle oc-1"></div>
<div class="overlap-circle oc-2"></div>
<div class="overlap-circle oc-3"></div>
</div>
</div>
</body>
</html>