bhanuripranathi commited on
Commit
e27c2c7
·
verified ·
1 Parent(s): 8b89f98

Design a cozy thumbnail generator website with a futuristic, yet warm vibe that appeals to modern design lovers. The page should feature a soft cream background with subtle texture, resembling handmade paper, and have a spacious, inviting feel. At the center of the page, display a sleek, rounded-card container with a warm white background. Inside the card, include a text area with the placeholder 'What should your thumbnail show?' Use a modern, friendly, handwritten-style font that maintains readability. Below this text field, add a 'Create' button in a soft brown color that changes to a slightly darker shade when hovered over. When the user clicks 'Create', the website should send the text they typed to https://goyel.app.n8n.cloud/webhook-test/thumbnail. The endpoint will return the finished thumbnail as an image file. During the waiting period (which takes about a minute), replace the button with a simple message that reads 'Generating your thumbnail...' with a looping animation of a dynamic indicator (like dots appearing one by one or a simple animated circle). The transition should feel smooth and calm. Once the thumbnail is generated and the image is returned from the endpoint, display the finished image in place of the text area with a gentle fade-in effect. Below the image, place a 'Download' link in the same brown color as the button, which allows users to save their thumbnail. The entire experience should feel personal and crafted with care, using colors like warm beige, soft browns, creamy whites, and subtle accent colors (such as sage green). Ensure that the layout is mobile-friendly, providing a cozy, modern, and seamless experience across devices. - Initial Deployment

Browse files
Files changed (2) hide show
  1. README.md +6 -4
  2. index.html +172 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: My First Website
3
- emoji: 📉
4
- colorFrom: green
5
  colorTo: purple
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: my-first-website
3
+ emoji: 🐳
4
+ colorFrom: pink
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,172 @@
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>Cozy Thumbnail Generator</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link href="https://fonts.googleapis.com/css2?family=Caveat:wght@400;600&family=Inter:wght@300;400;500&display=swap" rel="stylesheet">
9
+ <style>
10
+ body {
11
+ background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23e5e7eb' fill-opacity='0.2' fill-rule='evenodd'/%3E%3C/svg%3E");
12
+ font-family: 'Inter', sans-serif;
13
+ }
14
+
15
+ .handwriting {
16
+ font-family: 'Caveat', cursive;
17
+ }
18
+
19
+ @keyframes dotPulse {
20
+ 0%, 60%, 100% { opacity: 0.3; }
21
+ 30% { opacity: 1; }
22
+ }
23
+
24
+ .dot-1 { animation: dotPulse 1.5s infinite; }
25
+ .dot-2 { animation: dotPulse 1.5s infinite 0.3s; }
26
+ .dot-3 { animation: dotPulse 1.5s infinite 0.6s; }
27
+
28
+ .fade-in {
29
+ animation: fadeIn 0.8s ease-in-out;
30
+ }
31
+
32
+ @keyframes fadeIn {
33
+ from { opacity: 0; transform: translateY(10px); }
34
+ to { opacity: 1; transform: translateY(0); }
35
+ }
36
+
37
+ .card {
38
+ box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
39
+ transition: all 0.3s ease;
40
+ }
41
+
42
+ .card:hover {
43
+ box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.15);
44
+ }
45
+ </style>
46
+ </head>
47
+ <body class="min-h-screen bg-amber-50 flex items-center justify-center p-4">
48
+ <div class="w-full max-w-2xl">
49
+ <div class="text-center mb-8">
50
+ <h1 class="text-4xl md:text-5xl font-bold text-amber-900 handwriting mb-2">Cozy Thumbnail Creator</h1>
51
+ <p class="text-amber-700 max-w-md mx-auto">Craft beautiful thumbnails with a personal touch</p>
52
+ </div>
53
+
54
+ <div class="card bg-white rounded-2xl p-8 md:p-10 shadow-lg border border-amber-100">
55
+ <div id="generator-container">
56
+ <div class="mb-6">
57
+ <label for="thumbnail-text" class="block text-amber-800 mb-2 text-lg handwriting">What should your thumbnail show?</label>
58
+ <textarea id="thumbnail-text" rows="3" class="w-full px-4 py-3 rounded-lg border-2 border-amber-200 focus:border-amber-400 focus:ring-amber-300 focus:outline-none transition-all resize-none bg-amber-50 text-amber-900 placeholder-amber-400 handwriting text-xl" placeholder="Type your text here..."></textarea>
59
+ </div>
60
+
61
+ <button id="create-btn" class="w-full bg-amber-600 hover:bg-amber-700 text-white font-medium py-3 px-6 rounded-lg transition-all duration-300 transform hover:scale-[1.02] active:scale-95 focus:outline-none focus:ring-2 focus:ring-amber-500 focus:ring-opacity-50">
62
+ Create Thumbnail
63
+ </button>
64
+ </div>
65
+
66
+ <div id="loading-container" class="hidden text-center py-8">
67
+ <div class="inline-block mb-4">
68
+ <svg class="animate-spin h-10 w-10 text-amber-600" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
69
+ <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
70
+ <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
71
+ </svg>
72
+ </div>
73
+ <p class="text-amber-800 text-xl handwriting">Generating your thumbnail<span class="dots"><span class="dot-1">.</span><span class="dot-2">.</span><span class="dot-3">.</span></span></p>
74
+ </div>
75
+
76
+ <div id="result-container" class="hidden">
77
+ <div id="thumbnail-result" class="mb-6 fade-in"></div>
78
+ <a id="download-btn" href="#" class="block w-full bg-amber-600 hover:bg-amber-700 text-white font-medium py-3 px-6 rounded-lg transition-all duration-300 transform hover:scale-[1.02] active:scale-95 focus:outline-none focus:ring-2 focus:ring-amber-500 focus:ring-opacity-50 text-center">
79
+ Download Thumbnail
80
+ </a>
81
+ <button id="new-thumbnail-btn" class="mt-4 w-full bg-white hover:bg-amber-50 text-amber-700 border border-amber-300 font-medium py-3 px-6 rounded-lg transition-all duration-300 transform hover:scale-[1.02] active:scale-95 focus:outline-none focus:ring-2 focus:ring-amber-500 focus:ring-opacity-50">
82
+ Create Another
83
+ </button>
84
+ </div>
85
+ </div>
86
+
87
+ <div class="text-center mt-8 text-amber-600 text-sm">
88
+ <p>Made with care • Enjoy your beautiful thumbnails</p>
89
+ </div>
90
+ </div>
91
+
92
+ <script>
93
+ document.addEventListener('DOMContentLoaded', function() {
94
+ const createBtn = document.getElementById('create-btn');
95
+ const generatorContainer = document.getElementById('generator-container');
96
+ const loadingContainer = document.getElementById('loading-container');
97
+ const resultContainer = document.getElementById('result-container');
98
+ const thumbnailResult = document.getElementById('thumbnail-result');
99
+ const downloadBtn = document.getElementById('download-btn');
100
+ const newThumbnailBtn = document.getElementById('new-thumbnail-btn');
101
+ const thumbnailText = document.getElementById('thumbnail-text');
102
+
103
+ createBtn.addEventListener('click', function() {
104
+ const text = thumbnailText.value.trim();
105
+
106
+ if (!text) {
107
+ thumbnailText.focus();
108
+ return;
109
+ }
110
+
111
+ // Show loading state
112
+ generatorContainer.classList.add('hidden');
113
+ loadingContainer.classList.remove('hidden');
114
+
115
+ // Prepare the data to send
116
+ const data = {
117
+ text: text
118
+ };
119
+
120
+ // Send the request to the API
121
+ fetch('https://goyel.app.n8n.cloud/webhook-test/thumbnail', {
122
+ method: 'POST',
123
+ headers: {
124
+ 'Content-Type': 'application/json',
125
+ },
126
+ body: JSON.stringify(data)
127
+ })
128
+ .then(response => {
129
+ if (!response.ok) {
130
+ throw new Error('Network response was not ok');
131
+ }
132
+ return response.blob();
133
+ })
134
+ .then(blob => {
135
+ // Create object URL from the blob
136
+ const imageUrl = URL.createObjectURL(blob);
137
+
138
+ // Hide loading, show result
139
+ loadingContainer.classList.add('hidden');
140
+
141
+ // Display the image
142
+ thumbnailResult.innerHTML = `
143
+ <img src="${imageUrl}" alt="Generated thumbnail" class="w-full rounded-lg shadow-md border border-amber-100">
144
+ `;
145
+
146
+ // Set download link
147
+ downloadBtn.href = imageUrl;
148
+ downloadBtn.download = 'cozy-thumbnail.png';
149
+
150
+ // Show result container with fade effect
151
+ resultContainer.classList.remove('hidden');
152
+ })
153
+ .catch(error => {
154
+ console.error('Error:', error);
155
+ loadingContainer.classList.add('hidden');
156
+ generatorContainer.classList.remove('hidden');
157
+
158
+ // Show error message
159
+ alert('Something went wrong. Please try again.');
160
+ });
161
+ });
162
+
163
+ newThumbnailBtn.addEventListener('click', function() {
164
+ resultContainer.classList.add('hidden');
165
+ generatorContainer.classList.remove('hidden');
166
+ thumbnailText.value = '';
167
+ thumbnailText.focus();
168
+ });
169
+ });
170
+ </script>
171
+ <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=bhanuripranathi/my-first-website" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
172
+ </html>