-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
118 lines (105 loc) · 3.39 KB
/
index.html
File metadata and controls
118 lines (105 loc) · 3.39 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>glass-refraction — Vanilla Demo</title>
<link rel="stylesheet" href="../../dist/css/glass.css" />
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; }
body {
min-height: 100vh;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
color: #e2e8f0;
background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
display: flex;
flex-direction: column;
align-items: center;
gap: 2rem;
padding: 2rem;
}
/* SVG refraction filters (inline for vanilla usage) */
.sr-only { position: absolute; width: 0; height: 0; overflow: hidden; }
nav.glass {
width: 100%;
max-width: 800px;
padding: 1rem 2rem;
display: flex;
justify-content: space-between;
align-items: center;
}
.cards {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: 1.5rem;
width: 100%;
max-width: 800px;
}
.glass-card {
padding: 1.5rem;
}
.glass-card h3 { margin-bottom: 0.5rem; }
.glass-card p { opacity: 0.7; font-size: 0.9rem; line-height: 1.5; }
.pills {
display: flex;
gap: 0.75rem;
flex-wrap: wrap;
justify-content: center;
}
.glass-pill {
padding: 0.35rem 1rem;
font-size: 0.85rem;
}
footer.glass {
width: 100%;
max-width: 800px;
padding: 1rem 2rem;
text-align: center;
font-size: 0.85rem;
opacity: 0.7;
}
</style>
</head>
<body>
<!-- SVG refraction filters -->
<svg class="sr-only" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<defs>
<filter id="glass-refract" x="-5%" y="-5%" width="110%" height="110%" color-interpolation-filters="sRGB">
<feGaussianBlur in="SourceGraphic" stdDeviation="0.3" result="preblur"/>
<feTurbulence type="fractalNoise" baseFrequency="0.015 0.012" numOctaves="2" seed="42" result="noise"/>
<feGaussianBlur in="noise" stdDeviation="3" result="smooth"/>
<feDisplacementMap in="preblur" in2="smooth" scale="8" xChannelSelector="R" yChannelSelector="G" result="displaced"/>
<feColorMatrix in="displaced" type="saturate" values="1.3"/>
</filter>
</defs>
</svg>
<nav class="glass">
<strong>glass-refraction</strong>
<span>Vanilla Demo</span>
</nav>
<div class="cards">
<div class="glass-card">
<h3>Tier 1 — .glass</h3>
<p>Dense frosted glass with animated shimmer, specular highlights, and chromatic edge dispersion.</p>
</div>
<div class="glass-card">
<h3>Tier 2 — .glass-card</h3>
<p>Medium-density glass with hover lift, specular top-edge line, and chromatic edges on hover.</p>
</div>
<div class="glass-card">
<h3>Tier 3 — .glass-pill</h3>
<p>Lightweight frosted pill for tags, badges, and inline elements.</p>
</div>
</div>
<div class="pills">
<span class="glass-pill">React</span>
<span class="glass-pill">CSS</span>
<span class="glass-pill">SVG Filters</span>
<span class="glass-pill">Liquid Glass</span>
<span class="glass-pill">Refraction</span>
</div>
<footer class="glass">
Built with glass-refraction — MIT License
</footer>
</body>
</html>