Skip to content

Commit 2cfc35f

Browse files
Revert "schema-apps: gallery with live iframe previews (#48)" (#49)
This reverts commit 0ccc02e.
1 parent 0ccc02e commit 2cfc35f

1 file changed

Lines changed: 24 additions & 67 deletions

File tree

‎index.html‎

Lines changed: 24 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -58,88 +58,66 @@
5858

5959
/* ── Grid ── */
6060
.grid-wrap {
61-
max-width: 1200px;
61+
max-width: 900px;
6262
margin: 0 auto;
6363
padding: 0 1.5rem 3rem;
6464
}
6565
.grid {
6666
display: grid;
67-
grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
68-
gap: 1.25rem;
67+
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
68+
gap: 1rem;
6969
}
7070

7171
/* ── Card ── */
7272
.card {
73-
display: block;
73+
display: flex;
74+
align-items: flex-start;
75+
gap: .85rem;
76+
padding: 1.1rem 1.2rem;
7477
background: var(--surface);
7578
border: 1px solid var(--border);
7679
border-radius: var(--radius);
77-
overflow: hidden;
7880
text-decoration: none;
7981
color: inherit;
8082
box-shadow: var(--shadow-sm);
8183
transition: transform .22s cubic-bezier(.22,1,.36,1),
8284
box-shadow .22s cubic-bezier(.22,1,.36,1),
8385
border-color .18s ease;
8486
cursor: pointer;
85-
position: relative;
8687
}
8788
.card:hover {
8889
transform: translateY(-4px);
8990
box-shadow: var(--shadow-lg);
9091
border-color: color-mix(in oklab, var(--card-accent, #6366f1) 40%, transparent);
9192
}
9293

93-
/* ── Live preview iframe container ── */
94-
.preview-wrap {
95-
position: relative;
96-
width: 100%;
97-
/* 4:3 aspect ratio container */
98-
aspect-ratio: 4 / 3;
99-
overflow: hidden;
100-
background: var(--bg);
101-
pointer-events: none;
102-
}
103-
.preview-wrap iframe {
104-
position: absolute;
105-
top: 0;
106-
left: 0;
107-
/* Scale 2.5x so content fills the container with detail */
108-
width: 250%;
109-
height: 250%;
110-
border: none;
111-
transform: scale(0.4);
112-
transform-origin: top left;
113-
pointer-events: none;
114-
}
115-
116-
/* ── Card label (bottom) ── */
117-
.card-label {
118-
display: flex;
119-
align-items: center;
120-
gap: .7rem;
121-
padding: .8rem 1rem;
122-
border-top: 1px solid var(--border);
123-
}
94+
/* Icon circle */
12495
.card-icon {
12596
flex-shrink: 0;
126-
width: 36px; height: 36px;
127-
border-radius: 9px;
97+
width: 48px; height: 48px;
98+
border-radius: 12px;
12899
display: flex;
129100
align-items: center;
130101
justify-content: center;
131-
font-size: 1.15rem;
102+
font-size: 1.5rem;
132103
background: color-mix(in oklab, var(--card-accent, #6366f1) 10%, transparent);
104+
color: var(--card-accent, #6366f1);
133105
}
106+
107+
/* Text */
108+
.card-body { min-width: 0; flex: 1; }
134109
.card-name {
135-
font-size: .85rem;
110+
font-size: .92rem;
136111
font-weight: 700;
137112
letter-spacing: -.01em;
113+
margin: 0 0 .15rem;
138114
color: var(--text);
139115
}
140116
.card-tag {
141-
font-size: .7rem;
117+
font-size: .78rem;
142118
color: var(--text-3);
119+
line-height: 1.4;
120+
margin: 0;
143121
}
144122

145123
/* ── Footer ── */
@@ -169,9 +147,6 @@
169147
--shadow-md: 0 4px 16px rgba(0,0,0,.3);
170148
--shadow-lg: 0 12px 40px rgba(0,0,0,.45);
171149
}
172-
.preview-wrap {
173-
background: #0d0d0f;
174-
}
175150
}
176151

177152
/* ── Mobile ── */
@@ -223,30 +198,12 @@ <h1>schema-apps</h1>
223198
a.className = "card";
224199
a.href = "./" + app.file;
225200
a.style.setProperty("--card-accent", app.accent);
226-
227-
// Live iframe preview
228-
const preview = document.createElement("div");
229-
preview.className = "preview-wrap";
230-
const iframe = document.createElement("iframe");
231-
iframe.src = "./" + app.file;
232-
iframe.loading = "lazy";
233-
iframe.setAttribute("sandbox", "allow-same-origin");
234-
iframe.setAttribute("tabindex", "-1");
235-
iframe.setAttribute("aria-hidden", "true");
236-
preview.appendChild(iframe);
237-
a.appendChild(preview);
238-
239-
// Label
240-
const label = document.createElement("div");
241-
label.className = "card-label";
242-
label.innerHTML =
201+
a.innerHTML =
243202
'<div class="card-icon">' + app.icon + '</div>' +
244-
'<div>' +
245-
'<div class="card-name">' + app.name + '</div>' +
246-
'<div class="card-tag">' + app.tag + '</div>' +
203+
'<div class="card-body">' +
204+
'<p class="card-name">' + app.name + '</p>' +
205+
'<p class="card-tag">' + app.tag + '</p>' +
247206
'</div>';
248-
a.appendChild(label);
249-
250207
grid.appendChild(a);
251208
}
252209
</script>

0 commit comments

Comments
 (0)