Spaces:
Runtime error
Runtime error
Commit ·
dd0cb02
1
Parent(s): 00e5438
refactor: refine dashboard card
Browse filesFiles changed (2)
- public/app.js+17-10
- public/index.html+1-1
357 unmodified lines3583593603613623633642 unmodified lines3673683693703713723733743753763776 unmodified lines384385386387388389390391392393394395357 unmodified lines}const card = document.createElement('div');card.className = "bg-zinc-950 border border-zinc-800 p-6 rounded-2xl hover:border-emerald-500 transition cursor-pointer group flex flex-col justify-between h-48 relative";card.onclick = (e) => {if(!e.target.closest('.schema-menu-btn') && !e.target.closest('.dropdown-menu')) {2 unmodified lines};card.innerHTML = `<div><div class="flex justify-between items-start mb-4"><div class="w-10 h-10 bg-zinc-900 rounded-lg flex items-center justify-center text-xl text-zinc-400 group-hover:text-emerald-500 group-hover:bg-emerald-500/10 transition">📦</div><div class="relative"><button onclick="toggleDropdown(event, '${s.slug}')" class="schema-menu-btn text-zinc-600 hover:text-white p-2 rounded-md transition hover:bg-zinc-800"><i class="fa-solid fa-ellipsis-vertical"></i></button><div id="dd-${s.slug}" class="dropdown-menu hidden absolute right-0 mt-2 w-36 bg-zinc-900 border border-zinc-800 rounded-xl shadow-xl z-20 dropdown-enter overflow-hidden">6 unmodified lines</div></div></div><h3 class="font-bold text-white text-lg mb-1 truncate">${s.slug}</h3><p class="text-zinc-500 text-xs line-clamp-2 leading-relaxed">${s.description || 'No description provided.'}</p></div><div class="pt-4 border-t border-zinc-900 text-[10px] text-zinc-600 font-mono flex items-center gap-2"><span class="w-2 h-2 rounded-full bg-zinc-800 group-hover:bg-emerald-500 transition"></span>${fieldCount} Data Fields</div>`;grid.appendChild(card);357 unmodified lines3583593603613623633642 unmodified lines3673683693703713723733743753763773783796 unmodified lines386387388389390391392393394395396397398399400401402357 unmodified lines}const card = document.createElement('div');card.className = "bg-zinc-950 border border-zinc-800 p-6 rounded-2xl hover:border-emerald-500 transition cursor-pointer group flex flex-col justify-between h-52 relative";card.onclick = (e) => {if(!e.target.closest('.schema-menu-btn') && !e.target.closest('.dropdown-menu')) {2 unmodified lines};card.innerHTML = `<div class="flex-1 flex flex-col"><div class="flex justify-between items-start mb-3"><div class="w-10 h-10 bg-zinc-900 rounded-lg flex items-center justify-center text-lg text-zinc-400 group-hover:text-emerald-500 group-hover:bg-emerald-500/10 transition"><i class="fa-solid fa-cube"></i></div><div class="relative"><button onclick="toggleDropdown(event, '${s.slug}')" class="schema-menu-btn text-zinc-600 hover:text-white p-2 rounded-md transition hover:bg-zinc-800 -mr-2"><i class="fa-solid fa-ellipsis-vertical"></i></button><div id="dd-${s.slug}" class="dropdown-menu hidden absolute right-0 mt-2 w-36 bg-zinc-900 border border-zinc-800 rounded-xl shadow-xl z-20 dropdown-enter overflow-hidden">6 unmodified lines</div></div></div><h3 class="font-bold text-white text-lg mb-1 truncate tracking-tight">${s.slug}</h3><p class="text-zinc-500 text-xs line-clamp-2 mb-4 h-8">${s.description || 'No description provided.'}</p></div><div class="pt-4 border-t border-zinc-900 text-[10px] text-zinc-600 font-mono flex items-center gap-2 mt-auto"><span class="w-2 h-2 rounded-full bg-zinc-800 group-hover:bg-emerald-500 transition shadow-[0_0_8px_rgba(16,185,129,0)] group-hover:shadow-[0_0_8px_rgba(16,185,129,0.5)]"></span>${fieldCount} Data Fields defined</div>`;grid.appendChild(card);
340 unmodified lines341342343344345346340 unmodified lines</main><script src="app.js?v=1.0.8"></script></body></html>340 unmodified lines341342343344345346340 unmodified lines</main><script src="app.js?v=1.1.0"></script></body></html>
public/app.js+17-10
public/index.html+1-1