forked from jasonkneen/vibeclaw
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgallery.html
More file actions
234 lines (205 loc) · 14 KB
/
gallery.html
File metadata and controls
234 lines (205 loc) · 14 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
222
223
224
225
226
227
228
229
230
231
232
233
234
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="icon" href="/favicon.ico" sizes="32x32">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Wallpapers -- VibeClaw</title>
<meta name="description" content="Free AI-generated wallpapers in cyberpunk style. Download for iPhone, Android, desktop, and ultrawide. New wallpapers daily." />
<meta property="og:title" content="VibeClaw Wallpapers -- Free AI-Generated Cyberpunk Art">
<meta property="og:image" content="https://vibeclaw.dev/og-image.png">
<link rel="canonical" href="https://vibeclaw.dev/gallery">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Fragment+Mono:wght@400;500;600;700&family=DM+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
<style>
:root {
--accent: #ff5c5c;
--accent-dim: rgba(255,92,92,0.15);
--surface: #111;
--surface-2: #1a1a1a;
--border: #222;
--black: #0a0a0a;
--text: #999;
--text-dim: #555;
--text-bright: #e0e0e0;
--mono: 'Fragment Mono', 'JetBrains Mono', monospace;
--sans: 'DM Sans', system-ui, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--sans); background: var(--black); color: var(--text); min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
.page { max-width: 1440px; margin: 0 auto; padding: 32px 24px 60px; }
.page-header { margin-bottom: 12px; }
.page-header h1 { font-family: var(--sans); font-size: 1.8rem; font-weight: 800; color: var(--text-bright); }
.page-sub { font-family: var(--mono); font-size: 0.75rem; color: var(--text-dim); margin-bottom: 28px; }
/* Filter bar */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.filter-btn { font-family: var(--mono); font-size: 0.6rem; padding: 5px 12px; border-radius: 20px; border: 1px solid var(--border); background: transparent; color: var(--text-dim); cursor: pointer; transition: all 0.15s; text-transform: uppercase; letter-spacing: 0.04em; }
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
/* Gallery grid */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
/* Wallpaper card */
.wp-card { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); overflow: hidden; transition: border-color 0.2s, transform 0.2s; }
.wp-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.wp-preview { width: 100%; aspect-ratio: 16/9; object-fit: cover; cursor: pointer; display: block; }
.wp-info { padding: 14px; }
.wp-title { font-family: var(--sans); font-size: 0.9rem; font-weight: 700; color: var(--text-bright); margin-bottom: 8px; }
.wp-date { font-family: var(--mono); font-size: 0.55rem; color: var(--text-dim); margin-bottom: 10px; }
.wp-downloads { display: flex; gap: 6px; flex-wrap: wrap; }
.dl-btn { font-family: var(--mono); font-size: 0.55rem; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; transition: all 0.15s; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.dl-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); text-decoration: none; }
.dl-btn svg { width: 10px; height: 10px; }
/* Lightbox */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 200; justify-content: center; align-items: center; cursor: pointer; }
.lightbox.active { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 8px; }
.lightbox-close { position: absolute; top: 20px; right: 24px; font-family: var(--mono); font-size: 1.5rem; color: var(--text-dim); cursor: pointer; }
/* Empty state */
.empty { text-align: center; padding: 80px 24px; grid-column: 1 / -1; }
.empty h2 { font-family: var(--sans); font-size: 1.2rem; color: var(--text-bright); margin-bottom: 8px; }
.empty p { font-size: 0.85rem; color: var(--text-dim); }
.footer { border-top: 1px solid var(--border); padding: 24px; text-align: center; font-family: var(--mono); font-size: 0.65rem; color: var(--text-dim); }
.footer a { color: var(--text-dim); }
.footer a:hover { color: var(--accent); }
@media (max-width: 600px) {
.page { padding: 20px 12px 40px; }
.page-header h1 { font-size: 1.4rem; }
.gallery { grid-template-columns: 1fr; }
}
/* ── Canonical Nav ── */
nav { background: rgba(0,0,0,0.85); border-bottom: 1px solid #1a1a1a; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 500; }
.nav-inner { width: 100%; padding: 0 32px; height: 52px; display: flex; align-items: center; justify-content: space-between; box-sizing: border-box; }
.nav-logo { font-family: var(--mono,'Courier New',monospace); font-size: 0.9rem; font-weight: 600; color: var(--accent,#ff5c5c); text-decoration: none; }
.nav-links { display: flex; gap: 32px; list-style: none; align-items: center; margin: 0; padding: 0; }
.nav-links a { font-family: var(--mono,'Courier New',monospace); font-size: 0.78rem; color: var(--text-dim,#666); text-decoration: none; text-transform: uppercase; letter-spacing: 0.06em; transition: color 0.15s; }
.nav-links a:hover, .nav-links a.nav-active { color: var(--text-bright,#fff); }
@media (max-width: 600px) { .nav-inner { padding: 0 12px; height: 48px; } .nav-links { gap: 8px; } .nav-links a { font-size: 0.6rem; } .nav-hide-mobile { display: none; } }
</style>
</head>
<body>
<!-- Nav -->
<nav role="navigation" aria-label="Main navigation">
<div class="nav-inner">
<a href="/" class="nav-logo" aria-label="vibeclaw.dev home"><img src="/logo.png" alt="VibeClaw" style="height:44px;vertical-align:middle;"></a>
<ul class="nav-links" role="list">
<li><a href="/explore.html">Explore</a></li>
<li><a href="/create.html">Create</a></li>
<li class="nav-hide-mobile"><a href="/forge.html">Forge</a></li>
<li class="nav-hide-mobile"><a href="/news.html">News</a></li>
<li class="nav-hide-mobile"><a href="/docs/">Docs</a></li>
<li class="nav-more-wrap" style="position:relative;">
<button id="nav-more-btn" style="background:none;border:1px solid #1a1a1a;border-radius:6px;padding:3px 8px;font-family:var(--mono,'Courier New',monospace);font-size:0.62rem;color:#666;cursor:pointer;display:inline-flex;align-items:center;gap:4px;transition:all 0.15s;white-space:nowrap;">More <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="width:10px;height:10px;"><polyline points="6 9 12 15 18 9"/></svg></button>
<div id="nav-more-menu" style="display:none;position:absolute;top:calc(100% + 6px);right:0;background:#111;border:1px solid #222;border-radius:8px;padding:6px 0;min-width:180px;z-index:1000;box-shadow:0 8px 24px rgba(0,0,0,0.4);">
<a href="/library.html" style="display:block;padding:8px 16px;font-family:var(--mono,'Courier New',monospace);font-size:0.75rem;color:#ccc;text-decoration:none;">My Library</a>
<a href="/gallery.html" style="display:block;padding:8px 16px;font-family:var(--mono,'Courier New',monospace);font-size:0.75rem;color:#ccc;text-decoration:none;">Wallpapers</a>
<div style="height:1px;background:#222;margin:4px 0;"></div>
<a href="https://openclaw.ai" style="display:block;padding:8px 16px;font-family:var(--mono,'Courier New',monospace);font-size:0.75rem;color:#ccc;text-decoration:none;">OpenClaw</a>
<a href="https://github.com/jasonkneen/vibeclaw" style="display:block;padding:8px 16px;font-family:var(--mono,'Courier New',monospace);font-size:0.75rem;color:#ccc;text-decoration:none;">GitHub</a>
<a href="https://x.com/i/communities/2023680827435978937" style="display:flex;align-items:center;gap:6px;padding:8px 16px;font-family:var(--mono,'Courier New',monospace);font-size:0.75rem;color:#ccc;text-decoration:none;"><svg viewBox="0 0 24 24" fill="currentColor" style="width:12px;height:12px;"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg>Community</a>
</div>
</li>
<li id="auth-container" style="margin-left:4px;"></li>
</ul>
</div>
</nav>
<script>
(function(){
var btn=document.getElementById('nav-more-btn'),menu=document.getElementById('nav-more-menu');
if(!btn||!menu)return;
btn.addEventListener('click',function(e){e.stopPropagation();var o=menu.style.display!=='none';menu.style.display=o?'none':'block';btn.style.borderColor=o?'#1a1a1a':'#ff5c5c';btn.style.color=o?'#666':'#ff5c5c';});
document.addEventListener('click',function(){menu.style.display='none';btn.style.borderColor='#1a1a1a';btn.style.color='#666';});
menu.querySelectorAll('a').forEach(function(a){a.addEventListener('mouseenter',function(){a.style.background='#1a1a1a';});a.addEventListener('mouseleave',function(){a.style.background='transparent';});});
var path=location.pathname.replace(/\/$/,'')||'/';
document.querySelectorAll('.nav-links a').forEach(function(a){var h=(a.getAttribute('href')||'').replace(/\/$/,'');if(h&&path.endsWith(h))a.classList.add('nav-active');});
})();
</script>
<div class="page">
<div class="page-header">
<h1>Wallpapers</h1>
</div>
<p class="page-sub">Free AI-generated wallpapers. New designs daily. Download for any device.</p>
<div class="filter-bar" id="filter-bar"></div>
<div class="gallery" id="gallery">
<div class="empty"><h2>Loading...</h2></div>
</div>
</div>
<div class="lightbox" id="lightbox" onclick="closeLightbox()">
<span class="lightbox-close">x</span>
<img id="lightbox-img" src="" alt="">
</div>
<div class="footer">
<a href="/">vibeclaw.dev</a> -- <a href="/forge">Forge</a> -- <a href="/library">Library</a> -- <a href="/news">News</a> -- <a href="https://github.com/jasonkneen/vibeclaw">GitHub</a>
</div>
<script>
const DL_ICON = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>';
let wallpapers = [];
let activeFilter = null;
async function load() {
// Try API first, fall back to static JSON
try {
const [apiRes, jsonRes] = await Promise.allSettled([
fetch('/api/wallpapers').then(r => r.ok ? r.json() : []),
fetch('/wallpapers-data.json').then(r => r.ok ? r.json() : [])
]);
const dynamic = apiRes.status === 'fulfilled' ? apiRes.value || [] : [];
const static_ = jsonRes.status === 'fulfilled' ? jsonRes.value || [] : [];
const ids = new Set(dynamic.map(w => w.id));
wallpapers = [...dynamic, ...static_.filter(w => !ids.has(w.id))];
wallpapers.sort((a, b) => new Date(b.date) - new Date(a.date));
} catch {}
renderFilters();
render();
}
function renderFilters() {
const tags = [...new Set(wallpapers.flatMap(w => w.tags || []))].sort();
const bar = document.getElementById('filter-bar');
bar.innerHTML = `<button class="filter-btn ${!activeFilter ? 'active' : ''}" onclick="filter(null)">All</button>` +
tags.map(t => `<button class="filter-btn ${activeFilter === t ? 'active' : ''}" onclick="filter('${t}')">${t}</button>`).join('');
}
function filter(t) { activeFilter = t; renderFilters(); render(); }
function render() {
const filtered = activeFilter ? wallpapers.filter(w => (w.tags||[]).includes(activeFilter)) : wallpapers;
const el = document.getElementById('gallery');
if (!filtered.length) {
el.innerHTML = '<div class="empty"><h2>No wallpapers yet</h2><p>Check back soon -- new designs are generated daily.</p></div>';
return;
}
el.innerHTML = filtered.map(w => {
const variants = typeof w.variants === 'string' ? JSON.parse(w.variants) : (w.variants || []);
const preview = variants.find(v => v.label === 'Desktop') || variants.find(v => v.label === '4K') || variants[0];
const previewUrl = preview ? preview.url : '';
return `<div class="wp-card">
${previewUrl ? `<img class="wp-preview" src="${previewUrl}" alt="${w.title}" loading="lazy" onclick="openLightbox('${previewUrl}')">` : ''}
<div class="wp-info">
<div class="wp-title">${w.title}</div>
<div class="wp-date">${new Date(w.date).toLocaleDateString('en-GB', { day: 'numeric', month: 'short', year: 'numeric' })}</div>
<div class="wp-downloads">
${variants.map(v => `<a class="dl-btn" href="${v.url}" download="${w.id}-${v.label.toLowerCase().replace(/\s+/g,'-')}.png" target="_blank">${DL_ICON} ${v.label}</a>`).join('')}
</div>
</div>
</div>`;
}).join('');
}
function openLightbox(src) {
document.getElementById('lightbox-img').src = src;
document.getElementById('lightbox').classList.add('active');
}
function closeLightbox() {
document.getElementById('lightbox').classList.remove('active');
}
document.addEventListener('keydown', e => { if (e.key === 'Escape') closeLightbox(); });
load();
</script>
<script src="/auth.js"></script>
<script>
VibeclawAuth.init().then(function() {
VibeclawAuth.renderButton('auth-container');
});
</script>
<script src="/clawdio.js"></script>
</body>
</html>