Spaces:
Running
Running
generate 10 pixel art loading examples.
Browse filesFiles changed (4)
- README.md+8-5
- index.html+145-19
- script.jsAdded+33
- style.css+90-19
12345234567891011101213---title: Pixel Loader Paradeemoji: 📉colorFrom: indigocolorTo: greentitle: Pixel Loader Parade 🎨colorFrom: bluecolorTo: grayemoji: 🐳sdk: staticpinned: falsetags: - deepsite-v3---
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference# Welcome to your new DeepSite project!This project was created with [DeepSite](https://huggingface.co/deepsite).12345678910111213141516171819123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145<!doctype html><html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width" /> <title>My static Space</title> <link rel="stylesheet" href="style.css" /> </head> <body> <div class="card"> <h1>Welcome to your static Space!</h1> <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p> <p> Also don't forget to check the <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>. </p> </div> </body></html><!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Pixel Loader Parade</title> <link rel="stylesheet" href="style.css"> <script src="https://cdn.tailwindcss.com"></script> <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> <script src="https://unpkg.com/feather-icons"></script> <style type="text/tailwindcss"> @layer utilities { .pixel-loader { @apply relative inline-block w-16 h-16; } .pixel { @apply absolute w-4 h-4 rounded-sm; } } </style></head><body class="bg-gray-100 min-h-screen p-8"> <header class="text-center mb-12"> <h1 class="text-4xl font-bold text-gray-800 mb-2">Pixel Loader Parade</h1> <p class="text-gray-600">10 unique pixel art loading animations</p> </header>
<main class="max-w-6xl mx-auto grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8"> <!-- Loader 1: Classic Bouncing Pixel --> <div class="bg-white p-6 rounded-xl shadow-md"> <div class="pixel-loader" id="loader1"> <div class="pixel bg-purple-500 animate-bounce" style="left: 6px; top: 6px;"></div> </div> <h3 class="mt-4 text-lg font-semibold">Bouncing Pixel</h3> </div>
<!-- Loader 2: Expanding Square --> <div class="bg-white p-6 rounded-xl shadow-md"> <div class="pixel-loader" id="loader2"> <div class="pixel bg-blue-500 animate-pulse" style="left: 6px; top: 6px; animation-delay: 0s;"></div> <div class="pixel bg-blue-500 animate-pulse" style="left: 26px; top: 6px; animation-delay: 0.1s;"></div> <div class="pixel bg-blue-500 animate-pulse" style="left: 6px; top: 26px; animation-delay: 0.2s;"></div> <div class="pixel bg-blue-500 animate-pulse" style="left: 26px; top: 26px; animation-delay: 0.3s;"></div> </div> <h3 class="mt-4 text-lg font-semibold">Expanding Square</h3> </div>
<!-- Loader 3: Pixel Snake --> <div class="bg-white p-6 rounded-xl shadow-md"> <div class="pixel-loader" id="loader3"> <div class="pixel bg-green-500" style="left: 6px; top: 6px;"></div> <div class="pixel bg-green-500" style="left: 26px; top: 6px;"></div> <div class="pixel bg-green-500" style="left: 26px; top: 26px;"></div> <div class="pixel bg-green-500" style="left: 6px; top: 26px;"></div> </div> <h3 class="mt-4 text-lg font-semibold">Pixel Snake</h3> </div>
<!-- Loader 4: Spinning Cross --> <div class="bg-white p-6 rounded-xl shadow-md"> <div class="pixel-loader" id="loader4"> <div class="pixel bg-red-500" style="left: 26px; top: 6px;"></div> <div class="pixel bg-red-500" style="left: 6px; top: 26px;"></div> <div class="pixel bg-red-500" style="left: 46px; top: 26px;"></div> <div class="pixel bg-red-500" style="left: 26px; top: 46px;"></div> </div> <h3 class="mt-4 text-lg font-semibold">Spinning Cross</h3> </div>
<!-- Loader 5: Diagonal March --> <div class="bg-white p-6 rounded-xl shadow-md"> <div class="pixel-loader" id="loader5"> <div class="pixel bg-yellow-500" style="left: 6px; top: 6px;"></div> <div class="pixel bg-yellow-500" style="left: 16px; top: 16px;"></div> <div class="pixel bg-yellow-500" style="left: 26px; top: 26px;"></div> <div class="pixel bg-yellow-500" style="left: 36px; top: 36px;"></div> </div> <h3 class="mt-4 text-lg font-semibold">Diagonal March</h3> </div>
<!-- Loader 6: Pixel Wave --> <div class="bg-white p-6 rounded-xl shadow-md"> <div class="pixel-loader" id="loader6"> <div class="pixel bg-pink-500" style="left: 6px; top: 26px;"></div> <div class="pixel bg-pink-500" style="left: 16px; top: 16px;"></div> <div class="pixel bg-pink-500" style="left: 26px; top: 6px;"></div> <div class="pixel bg-pink-500" style="left: 36px; top: 16px;"></div> <div class="pixel bg-pink-500" style="left: 46px; top: 26px;"></div> </div> <h3 class="mt-4 text-lg font-semibold">Pixel Wave</h3> </div>
<!-- Loader 7: Pixel Rain --> <div class="bg-white p-6 rounded-xl shadow-md"> <div class="pixel-loader" id="loader7"> <div class="pixel bg-indigo-500" style="left: 6px; top: 6px;"></div> <div class="pixel bg-indigo-500" style="left: 26px; top: 6px;"></div> <div class="pixel bg-indigo-500" style="left: 46px; top: 6px;"></div> </div> <h3 class="mt-4 text-lg font-semibold">Pixel Rain</h3> </div>
<!-- Loader 8: Pixel Flip --> <div class="bg-white p-6 rounded-xl shadow-md"> <div class="pixel-loader" id="loader8"> <div class="pixel bg-teal-500" style="left: 6px; top: 6px;"></div> <div class="pixel bg-teal-500" style="left: 6px; top: 26px;"></div> <div class="pixel bg-teal-500" style="left: 26px; top: 6px;"></div> <div class="pixel bg-teal-500" style="left: 26px; top: 26px;"></div> </div> <h3 class="mt-4 text-lg font-semibold">Pixel Flip</h3> </div>
<!-- Loader 9: Pixel Orbit --> <div class="bg-white p-6 rounded-xl shadow-md"> <div class="pixel-loader" id="loader9"> <div class="pixel bg-orange-500" style="left: 26px; top: 6px;"></div> <div class="pixel bg-orange-500" style="left: 46px; top: 26px;"></div> <div class="pixel bg-orange-500" style="left: 6px; top: 26px;"></div> <div class="pixel bg-orange-500" style="left: 26px; top: 46px;"></div> </div> <h3 class="mt-4 text-lg font-semibold">Pixel Orbit</h3> </div>
<!-- Loader 10: Pixel Heartbeat --> <div class="bg-white p-6 rounded-xl shadow-md"> <div class="pixel-loader" id="loader10"> <div class="pixel bg-rose-500" style="left: 16px; top: 6px;"></div> <div class="pixel bg-rose-500" style="left: 6px; top: 16px;"></div> <div class="pixel bg-rose-500" style="left: 26px; top: 16px;"></div> <div class="pixel bg-rose-500" style="left: 16px; top: 26px;"></div> </div> <h3 class="mt-4 text-lg font-semibold">Pixel Heartbeat</h3> </div> </main>
<footer class="text-center mt-12 text-gray-500"> <p>Click any loader to see it in action!</p> </footer>
<script src="script.js"></script> <script>feather.replace();</script><script src="https://huggingface.co/deepsite/deepsite-badge.js"></script></body></html>123456789101112131415161718192021222324252627282930313233document.addEventListener('DOMContentLoaded', () => { // Make each loader container clickable to toggle animation const loaders = document.querySelectorAll('.pixel-loader'); loaders.forEach(loader => { loader.addEventListener('click', () => { const isPaused = loader.style.animationPlayState === 'paused'; loader.style.animationPlayState = isPaused ? 'running' : 'paused'; // Also pause all child pixel animations const pixels = loader.querySelectorAll('.pixel'); pixels.forEach(pixel => { pixel.style.animationPlayState = isPaused ? 'running' : 'paused'; }); }); });
// Add some fun hover effects const cards = document.querySelectorAll('main > div'); cards.forEach(card => { card.addEventListener('mouseenter', () => { card.classList.add('transform', 'scale-105'); card.classList.remove('shadow-md'); card.classList.add('shadow-lg'); }); card.addEventListener('mouseleave', () => { card.classList.remove('transform', 'scale-105'); card.classList.add('shadow-md'); card.classList.remove('shadow-lg'); }); });});12312345667878910111112131415121314151617181918192021222320212223242627252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899body { padding: 2rem; font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;/* Keyframe animations for our pixel loaders */@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); }}
h1 { font-size: 16px; margin-top: 0;@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.8); }}
p { color: rgb(107, 114, 128); font-size: 15px; margin-bottom: 10px; margin-top: 5px;@keyframes snake { 0% { left: 6px; top: 6px; } 25% { left: 26px; top: 6px; } 50% { left: 26px; top: 26px; } 75% { left: 6px; top: 26px; } 100% { left: 6px; top: 6px; }}
.card { max-width: 620px; margin: 0 auto; padding: 16px; border: 1px solid lightgray; border-radius: 16px;@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); }}
.card p:last-child { margin-bottom: 0;@keyframes march { 0% { transform: translateX(0) translateY(0); } 100% { transform: translateX(10px) translateY(10px); }}
@keyframes wave { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); }}
@keyframes rain { 0% { transform: translateY(-20px); opacity: 0; } 100% { transform: translateY(20px); opacity: 1; }}
@keyframes flip { 0%, 100% { transform: rotateY(0deg); } 50% { transform: rotateY(180deg); }}
@keyframes orbit { 0% { transform: rotate(0deg) translateX(20px) rotate(0deg); } 100% { transform: rotate(360deg) translateX(20px) rotate(-360deg); }}
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 25% { transform: scale(1.2); } 50% { transform: scale(1); } 75% { transform: scale(1.1); }}
/* Apply animations to our loaders */#loader1 .pixel { animation: bounce 1s infinite;}
#loader2 .pixel { animation: pulse 1s infinite;}
#loader3 .pixel:nth-child(1) { animation: snake 2s infinite; }#loader3 .pixel:nth-child(2) { animation: snake 2s infinite 0.5s; }#loader3 .pixel:nth-child(3) { animation: snake 2s infinite 1s; }#loader3 .pixel:nth-child(4) { animation: snake 2s infinite 1.5s; }
#loader4 { animation: spin 2s linear infinite;}
#loader5 .pixel { animation: march 1s infinite alternate;}
#loader6 .pixel:nth-child(1) { animation: wave 1s infinite 0s; }#loader6 .pixel:nth-child(2) { animation: wave 1s infinite 0.2s; }#loader6 .pixel:nth-child(3) { animation: wave 1s infinite 0.4s; }#loader6 .pixel:nth-child(4) { animation: wave 1s infinite 0.6s; }#loader6 .pixel:nth-child(5) { animation: wave 1s infinite 0.8s; }
#loader7 .pixel:nth-child(1) { animation: rain 1s infinite 0s; }#loader7 .pixel:nth-child(2) { animation: rain 1s infinite 0.2s; }#loader7 .pixel:nth-child(3) { animation: rain 1s infinite 0.4s; }
#loader8 .pixel { animation: flip 1.5s infinite;}
#loader9 .pixel { animation: orbit 2s linear infinite;}
#loader10 { animation: heartbeat 1.5s infinite;}README.md+8-5
index.html+145-19
script.jsAdded+33
style.css+90-19