commit 7b541f07f18e55431c6a552a74274135220499c4
Author: root <root@hub.scroll.pub>
Date: 2024-12-28 03:19:40 +0000
Subject: Initial commit
diff --git a/body.html b/body.html
new file mode 100644
index 0000000..709ceb6
--- /dev/null
+++ b/body.html
@@ -0,0 +1,21 @@
+<header>
+ <h1>Photoscape</h1>
+ <p>Your Personal Photo Gallery</p>
+</header>
+
+<main>
+ <section class="upload-section">
+ <h2>Upload Photos</h2>
+ <input type="file" id="photo-upload" accept="image/*" multiple>
+ <button id="upload-btn">Upload</button>
+ </section>
+
+ <section class="gallery-section">
+ <h2>Photo Gallery</h2>
+ <div id="gallery-grid"></div>
+ </section>
+</main>
+
+<footer>
+ <p>Photoscape - Share your moments, your way</p>
+</footer>
\ No newline at end of file
diff --git a/index.scroll b/index.scroll
new file mode 100644
index 0000000..bc26589
--- /dev/null
+++ b/index.scroll
@@ -0,0 +1,8 @@
+buildHtml
+baseUrl https://photoscape.scroll.pub
+metaTags
+editButton /edit.html
+title Photoscape - Your Personal Photo Gallery
+style.css
+body.html
+script.js
\ No newline at end of file
diff --git a/prompt.json b/prompt.json
new file mode 100644
index 0000000..cd9a21f
--- /dev/null
+++ b/prompt.json
@@ -0,0 +1,25 @@
+{
+ "id": "abe59c38-caf7-4818-984d-6fc04239d3ae",
+ "object": "chat.completion",
+ "created": 1735355964,
+ "model": "deepseek-chat",
+ "choices": [
+ {
+ "index": 0,
+ "message": {
+ "role": "assistant",
+ "content": "---domain---\nphotoscape.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://photoscape.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Photoscape - Your Personal Photo Gallery\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header>\n <h1>Photoscape</h1>\n <p>Your Personal Photo Gallery</p>\n</header>\n\n<main>\n <section class=\"upload-section\">\n <h2>Upload Photos</h2>\n <input type=\"file\" id=\"photo-upload\" accept=\"image/*\" multiple>\n <button id=\"upload-btn\">Upload</button>\n </section>\n\n <section class=\"gallery-section\">\n <h2>Photo Gallery</h2>\n <div id=\"gallery-grid\"></div>\n </section>\n</main>\n\n<footer>\n <p>Photoscape - Share your moments, your way</p>\n</footer>\n---style.css---\n:root {\n --primary-color: #4a90e2;\n --secondary-color: #f5f5f5;\n --text-color: #333;\n --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: 'Segoe UI', sans-serif;\n line-height: 1.6;\n color: var(--text-color);\n background-color: var(--secondary-color);\n padding: 20px;\n}\n\nheader {\n text-align: center;\n padding: 2rem 0;\n background: var(--primary-color);\n color: white;\n margin-bottom: 2rem;\n border-radius: 10px;\n box-shadow: var(--shadow);\n}\n\nh1 {\n font-size: 2.5rem;\n margin-bottom: 0.5rem;\n}\n\nmain {\n max-width: 1200px;\n margin: 0 auto;\n}\n\nsection {\n background: white;\n padding: 2rem;\n margin-bottom: 2rem;\n border-radius: 10px;\n box-shadow: var(--shadow);\n}\n\n.upload-section {\n text-align: center;\n}\n\n#photo-upload {\n margin: 1rem 0;\n padding: 0.5rem;\n border: 2px dashed var(--primary-color);\n border-radius: 5px;\n width: 100%;\n max-width: 300px;\n}\n\n#upload-btn {\n background: var(--primary-color);\n color: white;\n border: none;\n padding: 0.75rem 2rem;\n border-radius: 5px;\n cursor: pointer;\n transition: background 0.3s ease;\n}\n\n#upload-btn:hover {\n background: #357abd;\n}\n\n#gallery-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));\n gap: 1rem;\n}\n\n.gallery-item {\n position: relative;\n overflow: hidden;\n border-radius: 10px;\n aspect-ratio: 1;\n}\n\n.gallery-item img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n transition: transform 0.3s ease;\n}\n\n.gallery-item:hover img {\n transform: scale(1.1);\n}\n\nfooter {\n text-align: center;\n padding: 1rem;\n margin-top: 2rem;\n color: #666;\n}\n\n@media (max-width: 768px) {\n h1 {\n font-size: 2rem;\n }\n \n #gallery-grid {\n grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));\n }\n}\n---script.js---\ndocument.addEventListener('DOMContentLoaded', function() {\n const uploadBtn = document.getElementById('upload-btn');\n const photoUpload = document.getElementById('photo-upload');\n const galleryGrid = document.getElementById('gallery-grid');\n\n // Load existing photos from localStorage\n loadPhotos();\n\n uploadBtn.addEventListener('click', function() {\n photoUpload.click();\n });\n\n photoUpload.addEventListener('change', function(e) {\n const files = e.target.files;\n for (let i = 0; i < files.length; i++) {\n const file = files[i];\n if (file.type.startsWith('image/')) {\n const reader = new FileReader();\n reader.onload = function(e) {\n const imgSrc = e.target.result;\n savePhoto(imgSrc);\n displayPhoto(imgSrc);\n };\n reader.readAsDataURL(file);\n }\n }\n });\n\n function savePhoto(imgSrc) {\n let photos = JSON.parse(localStorage.getItem('photos') || '[]');\n photos.push(imgSrc);\n localStorage.setItem('photos', JSON.stringify(photos));\n }\n\n function loadPhotos() {\n let photos = JSON.parse(localStorage.getItem('photos') || '[]');\n photos.forEach(imgSrc => displayPhoto(imgSrc));\n }\n\n function displayPhoto(imgSrc) {\n const galleryItem = document.createElement('div');\n galleryItem.className = 'gallery-item';\n \n const img = document.createElement('img');\n img.src = imgSrc;\n img.alt = 'Uploaded photo';\n \n galleryItem.appendChild(img);\n galleryGrid.appendChild(galleryItem);\n }\n});\n---end---"
+ },
+ "logprobs": null,
+ "finish_reason": "stop"
+ }
+ ],
+ "usage": {
+ "prompt_tokens": 251,
+ "completion_tokens": 1179,
+ "total_tokens": 1430,
+ "prompt_cache_hit_tokens": 0,
+ "prompt_cache_miss_tokens": 251
+ },
+ "system_fingerprint": "fp_f1afce2943"
+}
\ No newline at end of file
diff --git a/readme.scroll b/readme.scroll
new file mode 100644
index 0000000..c26d3e3
--- /dev/null
+++ b/readme.scroll
@@ -0,0 +1,2 @@
+# photoscape.scroll.pub
+Website generated by DeepSeek from prompt: I want to create a websit that could upload/dowload and display my photos
\ No newline at end of file
diff --git a/script.js b/script.js
new file mode 100644
index 0000000..8fe2df6
--- /dev/null
+++ b/script.js
@@ -0,0 +1,51 @@
+document.addEventListener('DOMContentLoaded', function() {
+ const uploadBtn = document.getElementById('upload-btn');
+ const photoUpload = document.getElementById('photo-upload');
+ const galleryGrid = document.getElementById('gallery-grid');
+
+ // Load existing photos from localStorage
+ loadPhotos();
+
+ uploadBtn.addEventListener('click', function() {
+ photoUpload.click();
+ });
+
+ photoUpload.addEventListener('change', function(e) {
+ const files = e.target.files;
+ for (let i = 0; i < files.length; i++) {
+ const file = files[i];
+ if (file.type.startsWith('image/')) {
+ const reader = new FileReader();
+ reader.onload = function(e) {
+ const imgSrc = e.target.result;
+ savePhoto(imgSrc);
+ displayPhoto(imgSrc);
+ };
+ reader.readAsDataURL(file);
+ }
+ }
+ });
+
+ function savePhoto(imgSrc) {
+ let photos = JSON.parse(localStorage.getItem('photos') || '[]');
+ photos.push(imgSrc);
+ localStorage.setItem('photos', JSON.stringify(photos));
+ }
+
+ function loadPhotos() {
+ let photos = JSON.parse(localStorage.getItem('photos') || '[]');
+ photos.forEach(imgSrc => displayPhoto(imgSrc));
+ }
+
+ function displayPhoto(imgSrc) {
+ const galleryItem = document.createElement('div');
+ galleryItem.className = 'gallery-item';
+
+ const img = document.createElement('img');
+ img.src = imgSrc;
+ img.alt = 'Uploaded photo';
+
+ galleryItem.appendChild(img);
+ galleryGrid.appendChild(galleryItem);
+ }
+});
\ No newline at end of file
diff --git a/style.css b/style.css
new file mode 100644
index 0000000..a8ac7b7
--- /dev/null
+++ b/style.css
@@ -0,0 +1,116 @@
+:root {
+ --primary-color: #4a90e2;
+ --secondary-color: #f5f5f5;
+ --text-color: #333;
+ --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
+}
+
+* {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+}
+
+body {
+ font-family: 'Segoe UI', sans-serif;
+ line-height: 1.6;
+ color: var(--text-color);
+ background-color: var(--secondary-color);
+ padding: 20px;
+}
+
+header {
+ text-align: center;
+ padding: 2rem 0;
+ background: var(--primary-color);
+ color: white;
+ margin-bottom: 2rem;
+ border-radius: 10px;
+ box-shadow: var(--shadow);
+}
+
+h1 {
+ font-size: 2.5rem;
+ margin-bottom: 0.5rem;
+}
+
+main {
+ max-width: 1200px;
+ margin: 0 auto;
+}
+
+section {
+ background: white;
+ padding: 2rem;
+ margin-bottom: 2rem;
+ border-radius: 10px;
+ box-shadow: var(--shadow);
+}
+
+.upload-section {
+ text-align: center;
+}
+
+#photo-upload {
+ margin: 1rem 0;
+ padding: 0.5rem;
+ border: 2px dashed var(--primary-color);
+ border-radius: 5px;
+ width: 100%;
+ max-width: 300px;
+}
+
+#upload-btn {
+ background: var(--primary-color);
+ color: white;
+ border: none;
+ padding: 0.75rem 2rem;
+ border-radius: 5px;
+ cursor: pointer;
+ transition: background 0.3s ease;
+}
+
+#upload-btn:hover {
+ background: #357abd;
+}
+
+#gallery-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
+ gap: 1rem;
+}
+
+.gallery-item {
+ position: relative;
+ overflow: hidden;
+ border-radius: 10px;
+ aspect-ratio: 1;
+}
+
+.gallery-item img {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+ transition: transform 0.3s ease;
+}
+
+.gallery-item:hover img {
+ transform: scale(1.1);
+}
+
+footer {
+ text-align: center;
+ padding: 1rem;
+ margin-top: 2rem;
+ color: #666;
+}
+
+@media (max-width: 768px) {
+ h1 {
+ font-size: 2rem;
+ }
+
+ #gallery-grid {
+ grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
+ }
+}
\ No newline at end of file