Add 3 files
Browse files- README.md +7 -5
- index.html +319 -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: sajjadmamun-behance-portfolio
|
3 |
+
emoji: 🐳
|
4 |
+
colorFrom: red
|
5 |
+
colorTo: red
|
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,319 @@
|
|
1 |
-
<!
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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>Create Behance Portfolio</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 |
+
.dropzone {
|
11 |
+
border: 2px dashed #ccc;
|
12 |
+
transition: all 0.3s ease;
|
13 |
+
}
|
14 |
+
.dropzone.active {
|
15 |
+
border-color: #6366f1;
|
16 |
+
background-color: rgba(99, 102, 241, 0.1);
|
17 |
+
}
|
18 |
+
.portfolio-item {
|
19 |
+
transition: all 0.3s ease;
|
20 |
+
position: relative;
|
21 |
+
overflow: hidden;
|
22 |
+
}
|
23 |
+
.portfolio-item:hover {
|
24 |
+
transform: translateY(-5px);
|
25 |
+
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
|
26 |
+
}
|
27 |
+
.portfolio-item .overlay {
|
28 |
+
position: absolute;
|
29 |
+
top: 0;
|
30 |
+
left: 0;
|
31 |
+
right: 0;
|
32 |
+
bottom: 0;
|
33 |
+
background: rgba(0, 0, 0, 0.6);
|
34 |
+
opacity: 0;
|
35 |
+
transition: opacity 0.3s ease;
|
36 |
+
display: flex;
|
37 |
+
flex-direction: column;
|
38 |
+
justify-content: center;
|
39 |
+
align-items: center;
|
40 |
+
color: white;
|
41 |
+
}
|
42 |
+
.portfolio-item:hover .overlay {
|
43 |
+
opacity: 1;
|
44 |
+
}
|
45 |
+
.grid-layout {
|
46 |
+
display: grid;
|
47 |
+
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
48 |
+
grid-auto-rows: 250px;
|
49 |
+
grid-gap: 20px;
|
50 |
+
grid-auto-flow: dense;
|
51 |
+
}
|
52 |
+
.grid-layout .wide {
|
53 |
+
grid-column: span 2;
|
54 |
+
}
|
55 |
+
.grid-layout .tall {
|
56 |
+
grid-row: span 2;
|
57 |
+
}
|
58 |
+
.grid-layout .big {
|
59 |
+
grid-column: span 2;
|
60 |
+
grid-row: span 2;
|
61 |
+
}
|
62 |
+
@media (max-width: 768px) {
|
63 |
+
.grid-layout {
|
64 |
+
grid-template-columns: 1fr;
|
65 |
+
}
|
66 |
+
.grid-layout .wide,
|
67 |
+
.grid-layout .tall,
|
68 |
+
.grid-layout .big {
|
69 |
+
grid-column: span 1;
|
70 |
+
grid-row: span 1;
|
71 |
+
}
|
72 |
+
}
|
73 |
+
</style>
|
74 |
+
</head>
|
75 |
+
<body class="bg-gray-50 min-h-screen">
|
76 |
+
<div class="container mx-auto px-4 py-8">
|
77 |
+
<header class="mb-12 text-center">
|
78 |
+
<h1 class="text-4xl font-bold text-gray-800 mb-2">Create Your Behance Portfolio</h1>
|
79 |
+
<p class="text-gray-600 max-w-2xl mx-auto">Upload your images and we'll automatically generate a beautiful portfolio layout for you.</p>
|
80 |
+
</header>
|
81 |
+
|
82 |
+
<div class="max-w-4xl mx-auto mb-12">
|
83 |
+
<div id="dropzone" class="dropzone rounded-xl p-12 text-center cursor-pointer">
|
84 |
+
<div class="flex flex-col items-center justify-center">
|
85 |
+
<i class="fas fa-cloud-upload-alt text-5xl text-indigo-500 mb-4"></i>
|
86 |
+
<h3 class="text-xl font-semibold text-gray-700 mb-2">Drag & Drop your images here</h3>
|
87 |
+
<p class="text-gray-500 mb-4">or click to browse your files</p>
|
88 |
+
<input type="file" id="fileInput" class="hidden" accept="image/*" multiple>
|
89 |
+
<button id="uploadBtn" class="bg-indigo-600 hover:bg-indigo-700 text-white font-medium py-2 px-6 rounded-lg transition duration-300">
|
90 |
+
Select Images
|
91 |
+
</button>
|
92 |
+
</div>
|
93 |
+
</div>
|
94 |
+
</div>
|
95 |
+
|
96 |
+
<div class="mb-8 flex justify-between items-center">
|
97 |
+
<h2 class="text-2xl font-bold text-gray-800">Your Portfolio Preview</h2>
|
98 |
+
<div class="flex space-x-2">
|
99 |
+
<button id="randomizeBtn" class="bg-gray-200 hover:bg-gray-300 text-gray-800 font-medium py-2 px-4 rounded-lg transition duration-300">
|
100 |
+
<i class="fas fa-random mr-2"></i>Randomize Layout
|
101 |
+
</button>
|
102 |
+
<button id="downloadBtn" class="bg-indigo-600 hover:bg-indigo-700 text-white font-medium py-2 px-4 rounded-lg transition duration-300">
|
103 |
+
<i class="fas fa-download mr-2"></i>Download Portfolio
|
104 |
+
</button>
|
105 |
+
</div>
|
106 |
+
</div>
|
107 |
+
|
108 |
+
<div id="portfolioContainer" class="grid-layout mb-12">
|
109 |
+
<div class="text-center py-20 text-gray-400">
|
110 |
+
<i class="fas fa-images text-5xl mb-4"></i>
|
111 |
+
<p>Your portfolio images will appear here</p>
|
112 |
+
</div>
|
113 |
+
</div>
|
114 |
+
|
115 |
+
<div id="portfolioSettings" class="bg-white rounded-xl shadow-md p-6 mb-12 hidden">
|
116 |
+
<h3 class="text-xl font-semibold text-gray-800 mb-4">Portfolio Settings</h3>
|
117 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
118 |
+
<div>
|
119 |
+
<label class="block text-gray-700 mb-2">Project Title</label>
|
120 |
+
<input type="text" id="projectTitle" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-indigo-500 focus:border-indigo-500" placeholder="My Creative Project">
|
121 |
+
</div>
|
122 |
+
<div>
|
123 |
+
<label class="block text-gray-700 mb-2">Project Description</label>
|
124 |
+
<textarea id="projectDescription" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-indigo-500 focus:border-indigo-500" rows="2" placeholder="A brief description of your project"></textarea>
|
125 |
+
</div>
|
126 |
+
<div>
|
127 |
+
<label class="block text-gray-700 mb-2">Layout Style</label>
|
128 |
+
<select id="layoutStyle" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-indigo-500 focus:border-indigo-500">
|
129 |
+
<option value="grid">Grid</option>
|
130 |
+
<option value="masonry">Masonry</option>
|
131 |
+
<option value="carousel">Carousel</option>
|
132 |
+
</select>
|
133 |
+
</div>
|
134 |
+
<div>
|
135 |
+
<label class="block text-gray-700 mb-2">Color Theme</label>
|
136 |
+
<select id="colorTheme" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-indigo-500 focus:border-indigo-500">
|
137 |
+
<option value="light">Light</option>
|
138 |
+
<option value="dark">Dark</option>
|
139 |
+
<option value="minimal">Minimal</option>
|
140 |
+
</select>
|
141 |
+
</div>
|
142 |
+
</div>
|
143 |
+
<div class="mt-6 flex justify-end">
|
144 |
+
<button id="saveSettingsBtn" class="bg-indigo-600 hover:bg-indigo-700 text-white font-medium py-2 px-6 rounded-lg transition duration-300">
|
145 |
+
Save Settings
|
146 |
+
</button>
|
147 |
+
</div>
|
148 |
+
</div>
|
149 |
+
</div>
|
150 |
+
|
151 |
+
<script>
|
152 |
+
document.addEventListener('DOMContentLoaded', function() {
|
153 |
+
const dropzone = document.getElementById('dropzone');
|
154 |
+
const fileInput = document.getElementById('fileInput');
|
155 |
+
const uploadBtn = document.getElementById('uploadBtn');
|
156 |
+
const portfolioContainer = document.getElementById('portfolioContainer');
|
157 |
+
const randomizeBtn = document.getElementById('randomizeBtn');
|
158 |
+
const downloadBtn = document.getElementById('downloadBtn');
|
159 |
+
const portfolioSettings = document.getElementById('portfolioSettings');
|
160 |
+
const saveSettingsBtn = document.getElementById('saveSettingsBtn');
|
161 |
+
|
162 |
+
let uploadedImages = [];
|
163 |
+
|
164 |
+
// Handle drag and drop events
|
165 |
+
['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {
|
166 |
+
dropzone.addEventListener(eventName, preventDefaults, false);
|
167 |
+
});
|
168 |
+
|
169 |
+
function preventDefaults(e) {
|
170 |
+
e.preventDefault();
|
171 |
+
e.stopPropagation();
|
172 |
+
}
|
173 |
+
|
174 |
+
['dragenter', 'dragover'].forEach(eventName => {
|
175 |
+
dropzone.addEventListener(eventName, highlight, false);
|
176 |
+
});
|
177 |
+
|
178 |
+
['dragleave', 'drop'].forEach(eventName => {
|
179 |
+
dropzone.addEventListener(eventName, unhighlight, false);
|
180 |
+
});
|
181 |
+
|
182 |
+
function highlight() {
|
183 |
+
dropzone.classList.add('active');
|
184 |
+
}
|
185 |
+
|
186 |
+
function unhighlight() {
|
187 |
+
dropzone.classList.remove('active');
|
188 |
+
}
|
189 |
+
|
190 |
+
// Handle dropped files
|
191 |
+
dropzone.addEventListener('drop', handleDrop, false);
|
192 |
+
|
193 |
+
function handleDrop(e) {
|
194 |
+
const dt = e.dataTransfer;
|
195 |
+
const files = dt.files;
|
196 |
+
handleFiles(files);
|
197 |
+
}
|
198 |
+
|
199 |
+
// Handle file input click
|
200 |
+
uploadBtn.addEventListener('click', () => {
|
201 |
+
fileInput.click();
|
202 |
+
});
|
203 |
+
|
204 |
+
// Handle file input change
|
205 |
+
fileInput.addEventListener('change', function() {
|
206 |
+
handleFiles(this.files);
|
207 |
+
});
|
208 |
+
|
209 |
+
// Process uploaded files
|
210 |
+
function handleFiles(files) {
|
211 |
+
[...files].forEach(file => {
|
212 |
+
if (!file.type.match('image.*')) return;
|
213 |
+
|
214 |
+
const reader = new FileReader();
|
215 |
+
reader.onload = function(e) {
|
216 |
+
const imageData = {
|
217 |
+
url: e.target.result,
|
218 |
+
name: file.name,
|
219 |
+
size: file.size,
|
220 |
+
type: file.type
|
221 |
+
};
|
222 |
+
uploadedImages.push(imageData);
|
223 |
+
updatePortfolio();
|
224 |
+
}
|
225 |
+
reader.readAsDataURL(file);
|
226 |
+
});
|
227 |
+
}
|
228 |
+
|
229 |
+
// Update portfolio display
|
230 |
+
function updatePortfolio() {
|
231 |
+
if (uploadedImages.length === 0) {
|
232 |
+
portfolioContainer.innerHTML = `
|
233 |
+
<div class="text-center py-20 text-gray-400">
|
234 |
+
<i class="fas fa-images text-5xl mb-4"></i>
|
235 |
+
<p>Your portfolio images will appear here</p>
|
236 |
+
</div>
|
237 |
+
`;
|
238 |
+
portfolioSettings.classList.add('hidden');
|
239 |
+
return;
|
240 |
+
}
|
241 |
+
|
242 |
+
portfolioContainer.innerHTML = '';
|
243 |
+
portfolioSettings.classList.remove('hidden');
|
244 |
+
|
245 |
+
// Create a Behance-style grid layout
|
246 |
+
uploadedImages.forEach((image, index) => {
|
247 |
+
const item = document.createElement('div');
|
248 |
+
item.className = 'portfolio-item bg-white rounded-xl shadow-sm overflow-hidden';
|
249 |
+
|
250 |
+
// Randomly assign different sizes for visual interest
|
251 |
+
const sizeClasses = ['', 'wide', 'tall', 'big'];
|
252 |
+
const randomSize = sizeClasses[Math.floor(Math.random() * sizeClasses.length)];
|
253 |
+
if (randomSize) item.classList.add(randomSize);
|
254 |
+
|
255 |
+
item.innerHTML = `
|
256 |
+
<img src="${image.url}" alt="${image.name}" class="w-full h-full object-cover">
|
257 |
+
<div class="overlay">
|
258 |
+
<h4 class="font-bold text-lg mb-2">${image.name.split('.')[0]}</h4>
|
259 |
+
<button class="delete-btn bg-red-500 hover:bg-red-600 text-white py-1 px-3 rounded-full text-sm mt-2" data-index="${index}">
|
260 |
+
<i class="fas fa-trash mr-1"></i> Remove
|
261 |
+
</button>
|
262 |
+
</div>
|
263 |
+
`;
|
264 |
+
|
265 |
+
portfolioContainer.appendChild(item);
|
266 |
+
});
|
267 |
+
|
268 |
+
// Add event listeners to delete buttons
|
269 |
+
document.querySelectorAll('.delete-btn').forEach(btn => {
|
270 |
+
btn.addEventListener('click', function(e) {
|
271 |
+
e.stopPropagation();
|
272 |
+
const index = parseInt(this.getAttribute('data-index'));
|
273 |
+
uploadedImages.splice(index, 1);
|
274 |
+
updatePortfolio();
|
275 |
+
});
|
276 |
+
});
|
277 |
+
}
|
278 |
+
|
279 |
+
// Randomize layout
|
280 |
+
randomizeBtn.addEventListener('click', function() {
|
281 |
+
if (uploadedImages.length === 0) return;
|
282 |
+
|
283 |
+
const items = document.querySelectorAll('.portfolio-item');
|
284 |
+
items.forEach(item => {
|
285 |
+
// Remove all size classes
|
286 |
+
item.classList.remove('wide', 'tall', 'big');
|
287 |
+
|
288 |
+
// Randomly assign new size class
|
289 |
+
const sizeClasses = ['', 'wide', 'tall', 'big'];
|
290 |
+
const randomSize = sizeClasses[Math.floor(Math.random() * sizeClasses.length)];
|
291 |
+
if (randomSize) item.classList.add(randomSize);
|
292 |
+
});
|
293 |
+
});
|
294 |
+
|
295 |
+
// Save settings
|
296 |
+
saveSettingsBtn.addEventListener('click', function() {
|
297 |
+
const title = document.getElementById('projectTitle').value;
|
298 |
+
const description = document.getElementById('projectDescription').value;
|
299 |
+
const layout = document.getElementById('layoutStyle').value;
|
300 |
+
const theme = document.getElementById('colorTheme').value;
|
301 |
+
|
302 |
+
// In a real app, you would save these settings
|
303 |
+
alert(`Settings saved!\nTitle: ${title}\nDescription: ${description}\nLayout: ${layout}\nTheme: ${theme}`);
|
304 |
+
});
|
305 |
+
|
306 |
+
// Download portfolio (simplified for demo)
|
307 |
+
downloadBtn.addEventListener('click', function() {
|
308 |
+
if (uploadedImages.length === 0) {
|
309 |
+
alert('Please upload some images first!');
|
310 |
+
return;
|
311 |
+
}
|
312 |
+
|
313 |
+
// In a real app, you would generate a downloadable file
|
314 |
+
alert('Portfolio download would be generated here. In a real implementation, this would create a ZIP file with all images and an HTML portfolio page.');
|
315 |
+
});
|
316 |
+
});
|
317 |
+
</script>
|
318 |
+
<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=sajjadmamun/sajjadmamun-behance-portfolio" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
319 |
+
</html>
|
prompts.txt
ADDED
File without changes
|