NJU-Jet commited on
Commit
be18faa
·
verified ·
1 Parent(s): 62e1085

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +306 -19
  3. prompts.txt +2 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Mylove
3
- emoji: 📉
4
- colorFrom: blue
5
- colorTo: pink
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: mylove
3
+ emoji: 🐳
4
+ colorFrom: yellow
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,306 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Scrolling Love Confession</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ @import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&family=Poppins:wght@300;400;600&display=swap');
11
+
12
+ body {
13
+ font-family: 'Poppins', sans-serif;
14
+ overflow: hidden;
15
+ background: linear-gradient(-45deg, #ff9a9e, #fad0c4, #fbc2eb, #a6c1ee);
16
+ background-size: 400% 400%;
17
+ animation: gradient 15s ease infinite;
18
+ height: 100vh;
19
+ }
20
+
21
+ @keyframes gradient {
22
+ 0% { background-position: 0% 50%; }
23
+ 50% { background-position: 100% 50%; }
24
+ 100% { background-position: 0% 50%; }
25
+ }
26
+
27
+ .heart {
28
+ position: absolute;
29
+ pointer-events: none;
30
+ animation: fall linear forwards;
31
+ }
32
+
33
+ @keyframes fall {
34
+ to {
35
+ transform: translateY(100vh);
36
+ }
37
+ }
38
+
39
+ .confession-text {
40
+ font-family: 'Dancing Script', cursive;
41
+ text-shadow: 0 2px 4px rgba(0,0,0,0.1);
42
+ transition: all 0.5s ease;
43
+ opacity: 0;
44
+ transform: translateY(20px);
45
+ }
46
+
47
+ .confession-text.visible {
48
+ opacity: 1;
49
+ transform: translateY(0);
50
+ }
51
+
52
+ .scroll-container {
53
+ perspective: 1000px;
54
+ scroll-behavior: smooth;
55
+ }
56
+
57
+ .scroll-item {
58
+ transform-style: preserve-3d;
59
+ transition: transform 0.5s, opacity 0.8s ease-out;
60
+ }
61
+
62
+ /* Custom scrollbar */
63
+ .scroll-container::-webkit-scrollbar {
64
+ width: 8px;
65
+ }
66
+
67
+ .scroll-container::-webkit-scrollbar-track {
68
+ background: rgba(255,255,255,0.2);
69
+ border-radius: 10px;
70
+ }
71
+
72
+ .scroll-container::-webkit-scrollbar-thumb {
73
+ background: rgba(255,105,180,0.6);
74
+ border-radius: 10px;
75
+ }
76
+
77
+ .scroll-container::-webkit-scrollbar-thumb:hover {
78
+ background: rgba(255,105,180,0.8);
79
+ }
80
+
81
+ /* Fade effect at top and bottom */
82
+ .scroll-container {
83
+ mask-image: linear-gradient(
84
+ to bottom,
85
+ transparent 0%,
86
+ black 10%,
87
+ black 90%,
88
+ transparent 100%
89
+ );
90
+ }
91
+ </style>
92
+ </head>
93
+ <body class="flex items-center justify-center">
94
+ <div class="fixed inset-0 overflow-hidden z-0" id="hearts-container"></div>
95
+
96
+ <div class="relative z-10 w-full max-w-2xl px-4">
97
+ <div class="text-center mb-8">
98
+ <h1 class="text-4xl md:text-5xl font-bold text-pink-700 mb-2">To My Love</h1>
99
+ <div class="w-24 h-1 bg-pink-400 mx-auto mb-4"></div>
100
+ <p class="text-pink-600 italic">Every moment with you feels like a beautiful dream...</p>
101
+ </div>
102
+
103
+ <div class="scroll-container h-96 overflow-y-auto py-4 px-2 rounded-lg bg-white bg-opacity-20 backdrop-blur-sm shadow-xl">
104
+ <div id="confessions" class="space-y-8">
105
+ <!-- Confessions will be added here by JavaScript -->
106
+ </div>
107
+ </div>
108
+
109
+ <div class="mt-8 text-center">
110
+ <button id="pauseBtn" class="bg-pink-600 hover:bg-pink-700 text-white px-6 py-2 rounded-full shadow-lg transition-all transform hover:scale-105">
111
+ <i class="fas fa-pause mr-2"></i>Pause
112
+ </button>
113
+ </div>
114
+ </div>
115
+
116
+ <script>
117
+ // Confession messages
118
+ const confessions = [
119
+ "From the moment I met you, I knew you were special.",
120
+ "Your smile brightens even my darkest days.",
121
+ "I fall in love with you more each day.",
122
+ "You're the missing piece I've been searching for.",
123
+ "My heart skips a beat every time I see you.",
124
+ "You make me believe in love at first sight.",
125
+ "I cherish every moment we spend together.",
126
+ "Your laughter is my favorite sound in the world.",
127
+ "I'm grateful for your love every single day.",
128
+ "You're my today and all of my tomorrows.",
129
+ "With you, I've found my happy place.",
130
+ "You're the reason I believe in soulmates.",
131
+ "My love for you grows stronger with each passing day.",
132
+ "You complete me in ways I never knew possible.",
133
+ "I can't imagine my life without you in it.",
134
+ "You're my sunshine on cloudy days.",
135
+ "Every love story is beautiful, but ours is my favorite.",
136
+ "You're the answer to every prayer I never said.",
137
+ "I love you more than words can express.",
138
+ "You're my favorite hello and hardest goodbye."
139
+ ];
140
+
141
+ // Create hearts animation
142
+ function createHearts() {
143
+ const container = document.getElementById('hearts-container');
144
+ const heart = document.createElement('div');
145
+ heart.innerHTML = '<i class="fas fa-heart text-pink-500 opacity-70"></i>';
146
+ heart.className = 'heart text-2xl';
147
+
148
+ // Random position
149
+ const xPos = Math.random() * window.innerWidth;
150
+ heart.style.left = `${xPos}px`;
151
+ heart.style.top = '-30px';
152
+
153
+ // Random size
154
+ const size = Math.random() * 20 + 10;
155
+ heart.style.fontSize = `${size}px`;
156
+
157
+ // Random animation duration
158
+ const duration = Math.random() * 5 + 5; // Slower falling
159
+ heart.style.animationDuration = `${duration}s`;
160
+
161
+ container.appendChild(heart);
162
+
163
+ // Remove heart after animation completes
164
+ setTimeout(() => {
165
+ heart.remove();
166
+ }, duration * 1000);
167
+ }
168
+
169
+ // Add confessions to the container with animation
170
+ function addConfessions() {
171
+ const container = document.getElementById('confessions');
172
+ container.innerHTML = '';
173
+
174
+ confessions.forEach((text, index) => {
175
+ const div = document.createElement('div');
176
+ div.className = 'scroll-item confession-text text-center p-4 rounded-lg';
177
+
178
+ // Alternate colors
179
+ const colors = ['text-pink-700', 'text-red-600', 'text-purple-700', 'text-rose-600'];
180
+ const color = colors[index % colors.length];
181
+
182
+ // Different sizes for visual interest
183
+ const sizes = ['text-2xl', 'text-3xl', 'text-xl', 'text-2xl'];
184
+ const size = sizes[index % sizes.length];
185
+
186
+ div.className += ` ${color} ${size}`;
187
+ div.textContent = text;
188
+
189
+ container.appendChild(div);
190
+
191
+ // Animate in with staggered delay
192
+ setTimeout(() => {
193
+ div.classList.add('visible');
194
+ }, index * 300); // Increased delay for smoother appearance
195
+ });
196
+ }
197
+
198
+ // Auto-scroll function
199
+ let scrollInterval;
200
+ let isPaused = false;
201
+ let scrollSpeed = 30; // Slower scroll speed (pixels per second)
202
+
203
+ function startScrolling() {
204
+ const container = document.querySelector('.scroll-container');
205
+ let scrollPos = 0;
206
+ const scrollHeight = container.scrollHeight - container.clientHeight;
207
+ let lastTimestamp = 0;
208
+
209
+ function scrollStep(timestamp) {
210
+ if (!lastTimestamp) lastTimestamp = timestamp;
211
+ const deltaTime = timestamp - lastTimestamp;
212
+ lastTimestamp = timestamp;
213
+
214
+ if (!isPaused) {
215
+ // Calculate scroll position based on time for smooth scrolling
216
+ scrollPos += (scrollSpeed * deltaTime) / 1000;
217
+
218
+ if (scrollPos >= scrollHeight) {
219
+ scrollPos = 0;
220
+ // Re-add confessions when we reach bottom for infinite scroll
221
+ setTimeout(addConfessions, 500);
222
+ }
223
+
224
+ container.scrollTo({
225
+ top: scrollPos,
226
+ behavior: 'auto'
227
+ });
228
+ }
229
+
230
+ if (!isPaused) {
231
+ requestAnimationFrame(scrollStep);
232
+ }
233
+ }
234
+
235
+ requestAnimationFrame(scrollStep);
236
+ }
237
+
238
+ // Initialize
239
+ document.addEventListener('DOMContentLoaded', () => {
240
+ addConfessions();
241
+ startScrolling();
242
+
243
+ // Create hearts periodically (less frequently)
244
+ setInterval(createHearts, 500);
245
+
246
+ // Pause button functionality
247
+ document.getElementById('pauseBtn').addEventListener('click', function() {
248
+ isPaused = !isPaused;
249
+ this.innerHTML = isPaused
250
+ ? '<i class="fas fa-play mr-2"></i>Resume'
251
+ : '<i class="fas fa-pause mr-2"></i>Pause';
252
+
253
+ this.className = isPaused
254
+ ? 'bg-purple-600 hover:bg-purple-700 text-white px-6 py-2 rounded-full shadow-lg transition-all transform hover:scale-105'
255
+ : 'bg-pink-600 hover:bg-pink-700 text-white px-6 py-2 rounded-full shadow-lg transition-all transform hover:scale-105';
256
+
257
+ if (!isPaused) {
258
+ startScrolling();
259
+ }
260
+ });
261
+ });
262
+
263
+ // Add 3D effect on mouse move (more subtle)
264
+ document.querySelector('.scroll-container').addEventListener('mousemove', (e) => {
265
+ if (isPaused) return;
266
+
267
+ const items = document.querySelectorAll('.scroll-item');
268
+ const centerX = e.currentTarget.offsetWidth / 2;
269
+ const centerY = e.currentTarget.offsetHeight / 2;
270
+ const mouseX = e.clientX - e.currentTarget.getBoundingClientRect().left;
271
+ const mouseY = e.clientY - e.currentTarget.getBoundingClientRect().top;
272
+
273
+ items.forEach((item, index) => {
274
+ const itemRect = item.getBoundingClientRect();
275
+ const itemCenterY = itemRect.top + itemRect.height/2 - e.currentTarget.getBoundingClientRect().top;
276
+
277
+ // Calculate distance from mouse
278
+ const distanceX = Math.abs(mouseX - centerX);
279
+ const distanceY = Math.abs(mouseY - itemCenterY);
280
+
281
+ // Apply transform based on position (more subtle)
282
+ let rotateX = (mouseY - itemCenterY) / 30; // Reduced effect
283
+ let rotateY = (centerX - mouseX) / 30; // Reduced effect
284
+ let scale = 1 - (distanceX + distanceY) / 3000; // More subtle scaling
285
+
286
+ // Limit values
287
+ rotateX = Math.max(-5, Math.min(5, rotateX));
288
+ rotateY = Math.max(-5, Math.min(5, rotateY));
289
+ scale = Math.max(0.98, Math.min(1.02, scale));
290
+
291
+ item.style.transform = `rotateX(${rotateX}deg) rotateY(${rotateY}deg) scale(${scale})`;
292
+ item.style.opacity = 1 - (distanceY / 500); // More subtle opacity change
293
+ });
294
+ });
295
+
296
+ // Reset transforms when mouse leaves
297
+ document.querySelector('.scroll-container').addEventListener('mouseleave', () => {
298
+ const items = document.querySelectorAll('.scroll-item');
299
+ items.forEach(item => {
300
+ item.style.transform = 'rotateX(0) rotateY(0) scale(1)';
301
+ item.style.opacity = 1;
302
+ });
303
+ });
304
+ </script>
305
+ <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=NJU-Jet/mylove" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
306
+ </html>
prompts.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ 写一个滚动表白界面,界面不断滚动显示表白的句子
2
+ 刷新太快了,让界面更自然一点