Add 3 files
Browse files- README.md +7 -5
- index.html +219 -19
- prompts.txt +0 -0
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: test-001a-deepsite-imagecarouselhtml
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: gray
|
| 5 |
+
colorTo: purple
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,219 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<style>
|
| 9 |
+
.carousel-container {
|
| 10 |
+
width: 100%;
|
| 11 |
+
overflow: hidden;
|
| 12 |
+
position: relative;
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
.carousel-track {
|
| 16 |
+
display: flex;
|
| 17 |
+
transition: transform 0.5s ease-in-out;
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
.carousel-slide {
|
| 21 |
+
min-width: 100%;
|
| 22 |
+
box-sizing: border-box;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
.carousel-slide img {
|
| 26 |
+
width: 100%;
|
| 27 |
+
height: auto;
|
| 28 |
+
object-fit: cover;
|
| 29 |
+
border-radius: 8px;
|
| 30 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
.carousel-nav {
|
| 34 |
+
position: absolute;
|
| 35 |
+
bottom: 20px;
|
| 36 |
+
left: 20px;
|
| 37 |
+
z-index: 10;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
.carousel-btn {
|
| 41 |
+
background-color: rgba(255, 255, 255, 0.7);
|
| 42 |
+
color: #333;
|
| 43 |
+
border: none;
|
| 44 |
+
padding: 8px 16px;
|
| 45 |
+
border-radius: 20px;
|
| 46 |
+
cursor: pointer;
|
| 47 |
+
font-weight: bold;
|
| 48 |
+
transition: all 0.3s ease;
|
| 49 |
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
.carousel-btn:hover {
|
| 53 |
+
background-color: rgba(255, 255, 255, 0.9);
|
| 54 |
+
transform: translateY(-2px);
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
.carousel-btn:active {
|
| 58 |
+
transform: translateY(0);
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
.slide-indicators {
|
| 62 |
+
display: flex;
|
| 63 |
+
justify-content: center;
|
| 64 |
+
margin-top: 15px;
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
.indicator {
|
| 68 |
+
width: 10px;
|
| 69 |
+
height: 10px;
|
| 70 |
+
border-radius: 50%;
|
| 71 |
+
background-color: #ccc;
|
| 72 |
+
margin: 0 5px;
|
| 73 |
+
cursor: pointer;
|
| 74 |
+
transition: background-color 0.3s ease;
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
.indicator.active {
|
| 78 |
+
background-color: #555;
|
| 79 |
+
}
|
| 80 |
+
</style>
|
| 81 |
+
</head>
|
| 82 |
+
<body class="bg-gray-100 min-h-screen flex flex-col items-center justify-center p-4">
|
| 83 |
+
<div class="max-w-4xl w-full bg-white rounded-xl shadow-lg overflow-hidden p-6">
|
| 84 |
+
<h1 class="text-3xl font-bold text-center text-gray-800 mb-8">Nature Gallery</h1>
|
| 85 |
+
|
| 86 |
+
<div class="carousel-container relative">
|
| 87 |
+
<div class="carousel-track" id="carouselTrack">
|
| 88 |
+
<div class="carousel-slide">
|
| 89 |
+
<img src="https://source.unsplash.com/random/800x500/?mountain" alt="Mountain landscape">
|
| 90 |
+
<div class="absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-4">
|
| 91 |
+
<h3 class="text-white text-xl font-semibold">Mountain Majesty</h3>
|
| 92 |
+
<p class="text-white/80">The breathtaking views of alpine peaks</p>
|
| 93 |
+
</div>
|
| 94 |
+
</div>
|
| 95 |
+
<div class="carousel-slide">
|
| 96 |
+
<img src="https://source.unsplash.com/random/800x500/?forest" alt="Forest landscape">
|
| 97 |
+
<div class="absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-4">
|
| 98 |
+
<h3 class="text-white text-xl font-semibold">Enchanted Forest</h3>
|
| 99 |
+
<p class="text-white/80">The mysterious beauty of ancient woods</p>
|
| 100 |
+
</div>
|
| 101 |
+
</div>
|
| 102 |
+
<div class="carousel-slide">
|
| 103 |
+
<img src="https://source.unsplash.com/random/800x500/?ocean" alt="Ocean landscape">
|
| 104 |
+
<div class="absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-4">
|
| 105 |
+
<h3 class="text-white text-xl font-semibold">Ocean Waves</h3>
|
| 106 |
+
<p class="text-white/80">The endless dance of sea and shore</p>
|
| 107 |
+
</div>
|
| 108 |
+
</div>
|
| 109 |
+
<div class="carousel-slide">
|
| 110 |
+
<img src="https://source.unsplash.com/random/800x500/?desert" alt="Desert landscape">
|
| 111 |
+
<div class="absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-4">
|
| 112 |
+
<h3 class="text-white text-xl font-semibold">Desert Sands</h3>
|
| 113 |
+
<p class="text-white/80">The golden expanse of shifting dunes</p>
|
| 114 |
+
</div>
|
| 115 |
+
</div>
|
| 116 |
+
<div class="carousel-slide">
|
| 117 |
+
<img src="https://source.unsplash.com/random/800x500/?waterfall" alt="Waterfall landscape">
|
| 118 |
+
<div class="absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-4">
|
| 119 |
+
<h3 class="text-white text-xl font-semibold">Cascading Waters</h3>
|
| 120 |
+
<p class="text-white/80">The powerful flow of nature's force</p>
|
| 121 |
+
</div>
|
| 122 |
+
</div>
|
| 123 |
+
</div>
|
| 124 |
+
|
| 125 |
+
<div class="carousel-nav">
|
| 126 |
+
<button class="carousel-btn" id="nextBtn">Next →</button>
|
| 127 |
+
</div>
|
| 128 |
+
</div>
|
| 129 |
+
|
| 130 |
+
<div class="slide-indicators mt-4" id="indicators">
|
| 131 |
+
<!-- Indicators will be added by JavaScript -->
|
| 132 |
+
</div>
|
| 133 |
+
|
| 134 |
+
<div class="mt-8 text-center text-gray-600">
|
| 135 |
+
<p>Click the "Next" button to see more beautiful nature scenes</p>
|
| 136 |
+
</div>
|
| 137 |
+
</div>
|
| 138 |
+
|
| 139 |
+
<script>
|
| 140 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 141 |
+
const track = document.getElementById('carouselTrack');
|
| 142 |
+
const nextBtn = document.getElementById('nextBtn');
|
| 143 |
+
const indicatorsContainer = document.getElementById('indicators');
|
| 144 |
+
const slides = document.querySelectorAll('.carousel-slide');
|
| 145 |
+
let currentIndex = 0;
|
| 146 |
+
|
| 147 |
+
// Create indicators
|
| 148 |
+
slides.forEach((_, index) => {
|
| 149 |
+
const indicator = document.createElement('div');
|
| 150 |
+
indicator.classList.add('indicator');
|
| 151 |
+
if (index === 0) indicator.classList.add('active');
|
| 152 |
+
indicator.addEventListener('click', () => {
|
| 153 |
+
goToSlide(index);
|
| 154 |
+
});
|
| 155 |
+
indicatorsContainer.appendChild(indicator);
|
| 156 |
+
});
|
| 157 |
+
|
| 158 |
+
const indicators = document.querySelectorAll('.indicator');
|
| 159 |
+
|
| 160 |
+
function updateCarousel() {
|
| 161 |
+
track.style.transform = `translateX(-${currentIndex * 100}%)`;
|
| 162 |
+
|
| 163 |
+
// Update indicators
|
| 164 |
+
indicators.forEach((indicator, index) => {
|
| 165 |
+
if (index === currentIndex) {
|
| 166 |
+
indicator.classList.add('active');
|
| 167 |
+
} else {
|
| 168 |
+
indicator.classList.remove('active');
|
| 169 |
+
}
|
| 170 |
+
});
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
function goToSlide(index) {
|
| 174 |
+
currentIndex = index;
|
| 175 |
+
updateCarousel();
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
function nextSlide() {
|
| 179 |
+
currentIndex = (currentIndex + 1) % slides.length;
|
| 180 |
+
updateCarousel();
|
| 181 |
+
}
|
| 182 |
+
|
| 183 |
+
nextBtn.addEventListener('click', nextSlide);
|
| 184 |
+
|
| 185 |
+
// Auto-advance every 5 seconds (optional)
|
| 186 |
+
let autoSlide = setInterval(nextSlide, 5000);
|
| 187 |
+
|
| 188 |
+
// Pause auto-slide on hover
|
| 189 |
+
track.parentElement.addEventListener('mouseenter', () => {
|
| 190 |
+
clearInterval(autoSlide);
|
| 191 |
+
});
|
| 192 |
+
|
| 193 |
+
track.parentElement.addEventListener('mouseleave', () => {
|
| 194 |
+
autoSlide = setInterval(nextSlide, 5000);
|
| 195 |
+
});
|
| 196 |
+
|
| 197 |
+
// Touch support for mobile devices
|
| 198 |
+
let touchStartX = 0;
|
| 199 |
+
let touchEndX = 0;
|
| 200 |
+
|
| 201 |
+
track.addEventListener('touchstart', (e) => {
|
| 202 |
+
touchStartX = e.changedTouches[0].screenX;
|
| 203 |
+
});
|
| 204 |
+
|
| 205 |
+
track.addEventListener('touchend', (e) => {
|
| 206 |
+
touchEndX = e.changedTouches[0].screenX;
|
| 207 |
+
handleSwipe();
|
| 208 |
+
});
|
| 209 |
+
|
| 210 |
+
function handleSwipe() {
|
| 211 |
+
if (touchEndX < touchStartX) {
|
| 212 |
+
// Swipe left - next slide
|
| 213 |
+
nextSlide();
|
| 214 |
+
}
|
| 215 |
+
}
|
| 216 |
+
});
|
| 217 |
+
</script>
|
| 218 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Swordartoffline/test-001a-deepsite-imagecarouselhtml" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 219 |
+
</html>
|
prompts.txt
ADDED
|
File without changes
|