Create a Notes App, with a notes section, and a history section.
Browse files- README.md +8 -5
- index.html +307 -18
README.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: ScribbleSync - Digital Note Haven 🖊️
|
| 3 |
+
colorFrom: blue
|
| 4 |
+
colorTo: blue
|
| 5 |
+
emoji: 🐳
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite-v3
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Welcome to your new DeepSite project!
|
| 13 |
+
This project was created with [DeepSite](https://deepsite.hf.co).
|
index.html
CHANGED
|
@@ -1,19 +1,308 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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>ScribbleSync - Notes App</title>
|
| 7 |
+
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 10 |
+
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 11 |
+
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
| 12 |
+
<style>
|
| 13 |
+
.note-card:hover {
|
| 14 |
+
transform: translateY(-5px);
|
| 15 |
+
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
|
| 16 |
+
}
|
| 17 |
+
.sidebar-item:hover {
|
| 18 |
+
background-color: rgba(79, 70, 229, 0.1);
|
| 19 |
+
}
|
| 20 |
+
.markdown-content h1 {
|
| 21 |
+
font-size: 1.5rem;
|
| 22 |
+
font-weight: bold;
|
| 23 |
+
margin: 1rem 0;
|
| 24 |
+
}
|
| 25 |
+
.markdown-content p {
|
| 26 |
+
margin: 0.5rem 0;
|
| 27 |
+
}
|
| 28 |
+
</style>
|
| 29 |
+
</head>
|
| 30 |
+
<body class="bg-gray-50 min-h-screen">
|
| 31 |
+
<div class="flex h-screen overflow-hidden">
|
| 32 |
+
<!-- Sidebar -->
|
| 33 |
+
<div class="hidden md:flex md:flex-shrink-0">
|
| 34 |
+
<div class="flex flex-col w-64 bg-indigo-600 text-white">
|
| 35 |
+
<div class="flex items-center justify-center h-16 px-4 bg-indigo-700">
|
| 36 |
+
<div class="flex items-center">
|
| 37 |
+
<i data-feather="edit-3" class="mr-2"></i>
|
| 38 |
+
<span class="text-xl font-bold">ScribbleSync</span>
|
| 39 |
+
</div>
|
| 40 |
+
</div>
|
| 41 |
+
<div class="flex flex-col flex-grow px-4 py-4 overflow-y-auto">
|
| 42 |
+
<nav class="flex-1 space-y-2">
|
| 43 |
+
<a href="#" id="notes-tab" class="flex items-center px-4 py-3 text-sm font-medium rounded-md bg-indigo-700 text-white sidebar-item">
|
| 44 |
+
<i data-feather="file-text" class="mr-3"></i>
|
| 45 |
+
My Notes
|
| 46 |
+
</a>
|
| 47 |
+
<a href="#" id="history-tab" class="flex items-center px-4 py-3 text-sm font-medium rounded-md text-indigo-200 hover:text-white sidebar-item">
|
| 48 |
+
<i data-feather="clock" class="mr-3"></i>
|
| 49 |
+
History
|
| 50 |
+
</a>
|
| 51 |
+
<a href="#" id="trash-tab" class="flex items-center px-4 py-3 text-sm font-medium rounded-md text-indigo-200 hover:text-white sidebar-item">
|
| 52 |
+
<i data-feather="trash-2" class="mr-3"></i>
|
| 53 |
+
Trash
|
| 54 |
+
</a>
|
| 55 |
+
</nav>
|
| 56 |
+
<div class="mt-auto">
|
| 57 |
+
<div class="p-4 bg-indigo-700 rounded-md mb-4">
|
| 58 |
+
<div class="flex items-center">
|
| 59 |
+
<div class="bg-indigo-500 p-2 rounded-full">
|
| 60 |
+
<i data-feather="zap" class="w-4 h-4"></i>
|
| 61 |
+
</div>
|
| 62 |
+
<div class="ml-3">
|
| 63 |
+
<p class="text-xs font-medium text-indigo-200">Storage</p>
|
| 64 |
+
<div class="w-full bg-gray-200 rounded-full h-1.5 mt-1">
|
| 65 |
+
<div class="bg-white h-1.5 rounded-full" style="width: 25%"></div>
|
| 66 |
+
</div>
|
| 67 |
+
</div>
|
| 68 |
+
</div>
|
| 69 |
+
</div>
|
| 70 |
+
</div>
|
| 71 |
+
</div>
|
| 72 |
+
</div>
|
| 73 |
+
</div>
|
| 74 |
+
|
| 75 |
+
<!-- Mobile sidebar -->
|
| 76 |
+
<div class="md:hidden fixed bottom-0 w-full bg-white border-t border-gray-200 z-10">
|
| 77 |
+
<div class="flex justify-around">
|
| 78 |
+
<a href="#" id="mobile-notes-tab" class="flex flex-col items-center justify-center p-3 text-indigo-600">
|
| 79 |
+
<i data-feather="file-text"></i>
|
| 80 |
+
<span class="text-xs mt-1">Notes</span>
|
| 81 |
+
</a>
|
| 82 |
+
<a href="#" id="mobile-history-tab" class="flex flex-col items-center justify-center p-3 text-gray-500">
|
| 83 |
+
<i data-feather="clock"></i>
|
| 84 |
+
<span class="text-xs mt-1">History</span>
|
| 85 |
+
</a>
|
| 86 |
+
<a href="#" id="mobile-trash-tab" class="flex flex-col items-center justify-center p-3 text-gray-500">
|
| 87 |
+
<i data-feather="trash-2"></i>
|
| 88 |
+
<span class="text-xs mt-1">Trash</span>
|
| 89 |
+
</a>
|
| 90 |
+
</div>
|
| 91 |
+
</div>
|
| 92 |
+
|
| 93 |
+
<!-- Main content -->
|
| 94 |
+
<div class="flex flex-col flex-1 overflow-hidden">
|
| 95 |
+
<!-- Header -->
|
| 96 |
+
<div class="flex items-center justify-between h-16 px-4 bg-white border-b border-gray-200">
|
| 97 |
+
<div class="flex items-center">
|
| 98 |
+
<button class="md:hidden text-gray-500 mr-2">
|
| 99 |
+
<i data-feather="menu"></i>
|
| 100 |
+
</button>
|
| 101 |
+
<h1 class="text-lg font-medium text-gray-900">My Notes</h1>
|
| 102 |
+
</div>
|
| 103 |
+
<div class="flex items-center space-x-4">
|
| 104 |
+
<button class="p-2 text-gray-500 hover:text-indigo-600">
|
| 105 |
+
<i data-feather="search"></i>
|
| 106 |
+
</button>
|
| 107 |
+
<button id="new-note-btn" class="flex items-center px-3 py-2 bg-indigo-600 text-white text-sm font-medium rounded-md hover:bg-indigo-700">
|
| 108 |
+
<i data-feather="plus" class="mr-1"></i>
|
| 109 |
+
New Note
|
| 110 |
+
</button>
|
| 111 |
+
<div class="relative">
|
| 112 |
+
<button class="p-2 text-gray-500 hover:text-indigo-600">
|
| 113 |
+
<i data-feather="user"></i>
|
| 114 |
+
</button>
|
| 115 |
+
</div>
|
| 116 |
+
</div>
|
| 117 |
+
</div>
|
| 118 |
+
|
| 119 |
+
<!-- Notes Content -->
|
| 120 |
+
<div id="notes-content" class="flex-1 overflow-y-auto p-4">
|
| 121 |
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
| 122 |
+
<!-- Note cards will be added here dynamically -->
|
| 123 |
+
<div class="note-card bg-white rounded-lg shadow-md p-4 border border-gray-200 transition-all duration-200 cursor-pointer">
|
| 124 |
+
<div class="flex justify-between items-start">
|
| 125 |
+
<h3 class="font-medium text-gray-900 mb-2">Welcome to ScribbleSync!</h3>
|
| 126 |
+
<button class="text-gray-400 hover:text-indigo-600">
|
| 127 |
+
<i data-feather="more-vertical"></i>
|
| 128 |
+
</button>
|
| 129 |
+
</div>
|
| 130 |
+
<div class="markdown-content text-gray-600 text-sm mb-3">
|
| 131 |
+
<p>This is your first note. Click to edit or create new notes using the button above.</p>
|
| 132 |
+
</div>
|
| 133 |
+
<div class="flex justify-between items-center text-xs text-gray-400">
|
| 134 |
+
<span>Just now</span>
|
| 135 |
+
<span>1.2k words</span>
|
| 136 |
+
</div>
|
| 137 |
+
</div>
|
| 138 |
+
</div>
|
| 139 |
+
</div>
|
| 140 |
+
|
| 141 |
+
<!-- History Content (Hidden by default) -->
|
| 142 |
+
<div id="history-content" class="hidden flex-1 overflow-y-auto p-4">
|
| 143 |
+
<div class="bg-white rounded-lg shadow-md p-4">
|
| 144 |
+
<h2 class="text-lg font-medium text-gray-900 mb-4">Note History</h2>
|
| 145 |
+
<div class="space-y-4">
|
| 146 |
+
<div class="border-b border-gray-200 pb-4">
|
| 147 |
+
<div class="flex justify-between items-center mb-2">
|
| 148 |
+
<h3 class="font-medium text-gray-900">Welcome to ScribbleSync!</h3>
|
| 149 |
+
<span class="text-xs text-gray-400">Today, 10:15 AM</span>
|
| 150 |
+
</div>
|
| 151 |
+
<p class="text-sm text-gray-600">You created this note</p>
|
| 152 |
+
</div>
|
| 153 |
+
</div>
|
| 154 |
+
</div>
|
| 155 |
+
</div>
|
| 156 |
+
|
| 157 |
+
<!-- Trash Content (Hidden by default) -->
|
| 158 |
+
<div id="trash-content" class="hidden flex-1 overflow-y-auto p-4">
|
| 159 |
+
<div class="bg-white rounded-lg shadow-md p-4">
|
| 160 |
+
<h2 class="text-lg font-medium text-gray-900 mb-4">Trash</h2>
|
| 161 |
+
<p class="text-sm text-gray-600">No items in trash</p>
|
| 162 |
+
</div>
|
| 163 |
+
</div>
|
| 164 |
+
|
| 165 |
+
<!-- Note Editor Modal -->
|
| 166 |
+
<div id="editor-modal" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden">
|
| 167 |
+
<div class="absolute top-0 right-0 bottom-0 left-0 md:left-64 flex items-center justify-center">
|
| 168 |
+
<div class="bg-white rounded-lg shadow-xl w-full max-w-4xl h-screen md:h-auto md:max-h-[90vh] flex flex-col overflow-hidden">
|
| 169 |
+
<div class="flex items-center justify-between p-4 border-b border-gray-200">
|
| 170 |
+
<input type="text" id="note-title" class="text-lg font-medium text-gray-900 border-none focus:ring-0 w-full" placeholder="Note title">
|
| 171 |
+
<div class="flex space-x-2">
|
| 172 |
+
<button class="p-2 text-gray-500 hover:text-indigo-600">
|
| 173 |
+
<i data-feather="save"></i>
|
| 174 |
+
</button>
|
| 175 |
+
<button class="p-2 text-gray-500 hover:text-indigo-600">
|
| 176 |
+
<i data-feather="share-2"></i>
|
| 177 |
+
</button>
|
| 178 |
+
<button id="close-editor" class="p-2 text-gray-500 hover:text-red-600">
|
| 179 |
+
<i data-feather="x"></i>
|
| 180 |
+
</button>
|
| 181 |
+
</div>
|
| 182 |
+
</div>
|
| 183 |
+
<div class="flex-1 overflow-y-auto p-4">
|
| 184 |
+
<textarea id="note-content" class="w-full h-full border-none focus:ring-0 resize-none" placeholder="Start writing here... Markdown is supported!"></textarea>
|
| 185 |
+
<div id="preview-content" class="markdown-content hidden"></div>
|
| 186 |
+
</div>
|
| 187 |
+
<div class="p-4 border-t border-gray-200 bg-gray-50 flex justify-between">
|
| 188 |
+
<div class="flex space-x-2">
|
| 189 |
+
<button class="p-2 text-gray-500 hover:text-indigo-600">
|
| 190 |
+
<i data-feather="bold"></i>
|
| 191 |
+
</button>
|
| 192 |
+
<button class="p-2 text-gray-500 hover:text-indigo-600">
|
| 193 |
+
<i data-feather="italic"></i>
|
| 194 |
+
</button>
|
| 195 |
+
<button class="p-2 text-gray-500 hover:text-indigo-600">
|
| 196 |
+
<i data-feather="list"></i>
|
| 197 |
+
</button>
|
| 198 |
+
<button id="toggle-preview" class="p-2 text-gray-500 hover:text-indigo-600">
|
| 199 |
+
<i data-feather="eye"></i>
|
| 200 |
+
</button>
|
| 201 |
+
</div>
|
| 202 |
+
<div>
|
| 203 |
+
<button class="px-4 py-2 bg-indigo-600 text-white text-sm font-medium rounded-md hover:bg-indigo-700">
|
| 204 |
+
Save Changes
|
| 205 |
+
</button>
|
| 206 |
+
</div>
|
| 207 |
+
</div>
|
| 208 |
+
</div>
|
| 209 |
+
</div>
|
| 210 |
+
</div>
|
| 211 |
+
</div>
|
| 212 |
+
</div>
|
| 213 |
+
|
| 214 |
+
<script>
|
| 215 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 216 |
+
feather.replace();
|
| 217 |
+
|
| 218 |
+
// Tab switching logic
|
| 219 |
+
const tabs = {
|
| 220 |
+
'notes-tab': 'notes-content',
|
| 221 |
+
'history-tab': 'history-content',
|
| 222 |
+
'trash-tab': 'trash-content',
|
| 223 |
+
'mobile-notes-tab': 'notes-content',
|
| 224 |
+
'mobile-history-tab': 'history-content',
|
| 225 |
+
'mobile-trash-tab': 'trash-content'
|
| 226 |
+
};
|
| 227 |
+
|
| 228 |
+
Object.keys(tabs).forEach(tabId => {
|
| 229 |
+
document.getElementById(tabId)?.addEventListener('click', function(e) {
|
| 230 |
+
e.preventDefault();
|
| 231 |
+
|
| 232 |
+
// Hide all content sections
|
| 233 |
+
document.getElementById('notes-content').classList.add('hidden');
|
| 234 |
+
document.getElementById('history-content').classList.add('hidden');
|
| 235 |
+
document.getElementById('trash-content').classList.add('hidden');
|
| 236 |
+
|
| 237 |
+
// Show selected content
|
| 238 |
+
document.getElementById(tabs[tabId]).classList.remove('hidden');
|
| 239 |
+
|
| 240 |
+
// Update active tab styles
|
| 241 |
+
document.querySelectorAll('.sidebar-item').forEach(item => {
|
| 242 |
+
item.classList.remove('bg-indigo-700', 'text-white');
|
| 243 |
+
item.classList.add('text-indigo-200', 'hover:text-white');
|
| 244 |
+
});
|
| 245 |
+
|
| 246 |
+
document.querySelectorAll('#mobile-sidebar a').forEach(item => {
|
| 247 |
+
item.classList.remove('text-indigo-600');
|
| 248 |
+
item.classList.add('text-gray-500');
|
| 249 |
+
});
|
| 250 |
+
|
| 251 |
+
if (tabId.includes('mobile')) {
|
| 252 |
+
document.getElementById(tabId).classList.add('text-indigo-600');
|
| 253 |
+
document.getElementById(tabId).classList.remove('text-gray-500');
|
| 254 |
+
} else {
|
| 255 |
+
document.getElementById(tabId).classList.add('bg-indigo-700', 'text-white');
|
| 256 |
+
document.getElementById(tabId).classList.remove('text-indigo-200', 'hover:text-white');
|
| 257 |
+
}
|
| 258 |
+
});
|
| 259 |
+
});
|
| 260 |
+
|
| 261 |
+
// Note editor modal
|
| 262 |
+
const editorModal = document.getElementById('editor-modal');
|
| 263 |
+
const closeEditor = document.getElementById('close-editor');
|
| 264 |
+
const newNoteBtn = document.getElementById('new-note-btn');
|
| 265 |
+
const togglePreview = document.getElementById('toggle-preview');
|
| 266 |
+
const noteContent = document.getElementById('note-content');
|
| 267 |
+
const previewContent = document.getElementById('preview-content');
|
| 268 |
+
|
| 269 |
+
newNoteBtn.addEventListener('click', function() {
|
| 270 |
+
editorModal.classList.remove('hidden');
|
| 271 |
+
document.getElementById('note-title').value = '';
|
| 272 |
+
document.getElementById('note-content').value = '';
|
| 273 |
+
});
|
| 274 |
+
|
| 275 |
+
closeEditor.addEventListener('click', function() {
|
| 276 |
+
editorModal.classList.add('hidden');
|
| 277 |
+
});
|
| 278 |
+
|
| 279 |
+
togglePreview.addEventListener('click', function() {
|
| 280 |
+
if (previewContent.classList.contains('hidden')) {
|
| 281 |
+
// Simple markdown rendering (in a real app, use a proper library)
|
| 282 |
+
const content = noteContent.value
|
| 283 |
+
.replace(/\*\*(.*?)\*\*/g, '<strong>$1</strong>')
|
| 284 |
+
.replace(/\*(.*?)\*/g, '<em>$1</em>')
|
| 285 |
+
.replace(/\n/g, '<br>');
|
| 286 |
+
|
| 287 |
+
previewContent.innerHTML = content;
|
| 288 |
+
previewContent.classList.remove('hidden');
|
| 289 |
+
noteContent.classList.add('hidden');
|
| 290 |
+
togglePreview.classList.add('text-indigo-600');
|
| 291 |
+
} else {
|
| 292 |
+
previewContent.classList.add('hidden');
|
| 293 |
+
noteContent.classList.remove('hidden');
|
| 294 |
+
togglePreview.classList.remove('text-indigo-600');
|
| 295 |
+
}
|
| 296 |
+
});
|
| 297 |
+
|
| 298 |
+
// Click on note card to open editor
|
| 299 |
+
document.querySelectorAll('.note-card').forEach(card => {
|
| 300 |
+
card.addEventListener('click', function() {
|
| 301 |
+
editorModal.classList.remove('hidden');
|
| 302 |
+
// In a real app, you would load the note content here
|
| 303 |
+
});
|
| 304 |
+
});
|
| 305 |
+
});
|
| 306 |
+
</script>
|
| 307 |
+
</body>
|
| 308 |
</html>
|