commit f25db7951ff1531026b16cea3589ebc37e647eb4
Author: root <root@hub.scroll.pub> Date: 2024-12-28 16:00:57 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..8dc76cb --- /dev/null +++ b/body.html @@ -0,0 +1,51 @@ +<header class="header"> + <nav class="navbar"> + <a href="/" class="logo">NotesShare</a> + <div class="nav-links"> + <a href="/">Home</a> + <a href="/login">Login</a> + <a href="/register">Register</a> + </div> + </nav> +</header> + +<main class="main-content"> + <section class="hero"> + <h1>Discover and Share Study Notes</h1> + <p>Find notes for your subjects, or share your own with the community.</p> + <div class="search-bar"> + <input type="text" placeholder="Search notes by subject, topic, or title..." id="searchInput"> + <button onclick="searchNotes()">Search</button> + </div> + </section> + + <section class="subjects"> + <h2>Browse by Subject</h2> + <div class="subject-list"> + <div class="subject-card">Mathematics</div> + <div class="subject-card">Science</div> + <div class="subject-card">History</div> + <div class="subject-card">Literature</div> + </div> + </section> + + <section class="notes-list"> + <h2>Recent Notes</h2> + <div class="notes-grid"> + <div class="note-card"> + <h3>Algebra Basics</h3> + <p>Mathematics</p> + <button onclick="downloadNote('Algebra Basics')">Download</button> + </div> + <div class="note-card"> + <h3>World War II</h3> + <p>History</p> + <button onclick="downloadNote('World War II')">Download</button> + </div> + </div> + </section> +</main> + +<footer class="footer"> + <p>NotesShare - Empowering Students Through Knowledge Sharing</p> +</footer> \ No newline at end of file diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..1a78d13 --- /dev/null +++ b/index.scroll @@ -0,0 +1,8 @@ +buildHtml +baseUrl https://noteshare.scroll.pub +metaTags +editButton /edit.html +title NotesShare - Share and Discover Study Notes +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..8a38e15 --- /dev/null +++ b/prompt.json @@ -0,0 +1,25 @@ +{ + "id": "7d614593-19e1-41a1-b5fd-2aff42d9cd96", + "object": "chat.completion", + "created": 1735401638, + "model": "deepseek-chat", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "---domain---\nnoteshare.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://noteshare.scroll.pub\nmetaTags\neditButton /edit.html\ntitle NotesShare - Share and Discover Study Notes\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header class=\"header\">\n <nav class=\"navbar\">\n <a href=\"/\" class=\"logo\">NotesShare</a>\n <div class=\"nav-links\">\n <a href=\"/\">Home</a>\n <a href=\"/login\">Login</a>\n <a href=\"/register\">Register</a>\n </div>\n </nav>\n</header>\n\n<main class=\"main-content\">\n <section class=\"hero\">\n <h1>Discover and Share Study Notes</h1>\n <p>Find notes for your subjects, or share your own with the community.</p>\n <div class=\"search-bar\">\n <input type=\"text\" placeholder=\"Search notes by subject, topic, or title...\" id=\"searchInput\">\n <button onclick=\"searchNotes()\">Search</button>\n </div>\n </section>\n\n <section class=\"subjects\">\n <h2>Browse by Subject</h2>\n <div class=\"subject-list\">\n <div class=\"subject-card\">Mathematics</div>\n <div class=\"subject-card\">Science</div>\n <div class=\"subject-card\">History</div>\n <div class=\"subject-card\">Literature</div>\n </div>\n </section>\n\n <section class=\"notes-list\">\n <h2>Recent Notes</h2>\n <div class=\"notes-grid\">\n <div class=\"note-card\">\n <h3>Algebra Basics</h3>\n <p>Mathematics</p>\n <button onclick=\"downloadNote('Algebra Basics')\">Download</button>\n </div>\n <div class=\"note-card\">\n <h3>World War II</h3>\n <p>History</p>\n <button onclick=\"downloadNote('World War II')\">Download</button>\n </div>\n </div>\n </section>\n</main>\n\n<footer class=\"footer\">\n <p>NotesShare - Empowering Students Through Knowledge Sharing</p>\n</footer>\n---style.css---\nbody {\n font-family: 'Arial', sans-serif;\n margin: 0;\n padding: 0;\n background-color: #f4f4f9;\n color: #333;\n}\n\n.header {\n background-color: #4a90e2;\n color: white;\n padding: 1rem;\n text-align: center;\n}\n\n.navbar {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.logo {\n font-size: 1.5rem;\n font-weight: bold;\n}\n\n.nav-links a {\n color: white;\n text-decoration: none;\n margin: 0 1rem;\n}\n\n.main-content {\n padding: 2rem;\n}\n\n.hero {\n text-align: center;\n margin-bottom: 2rem;\n}\n\n.hero h1 {\n font-size: 2.5rem;\n margin-bottom: 1rem;\n}\n\n.search-bar {\n display: flex;\n justify-content: center;\n margin-top: 1rem;\n}\n\n.search-bar input {\n padding: 0.5rem;\n width: 300px;\n border: 1px solid #ccc;\n border-radius: 4px;\n}\n\n.search-bar button {\n padding: 0.5rem 1rem;\n background-color: #4a90e2;\n color: white;\n border: none;\n border-radius: 4px;\n margin-left: 0.5rem;\n cursor: pointer;\n}\n\n.subjects {\n margin-bottom: 2rem;\n}\n\n.subject-list {\n display: flex;\n justify-content: space-around;\n flex-wrap: wrap;\n}\n\n.subject-card {\n background-color: white;\n padding: 1rem;\n border-radius: 8px;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n width: 200px;\n text-align: center;\n margin: 1rem;\n}\n\n.notes-list {\n margin-bottom: 2rem;\n}\n\n.notes-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n gap: 1rem;\n}\n\n.note-card {\n background-color: white;\n padding: 1rem;\n border-radius: 8px;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n}\n\n.note-card h3 {\n margin-bottom: 0.5rem;\n}\n\n.note-card button {\n padding: 0.5rem 1rem;\n background-color: #4a90e2;\n color: white;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n}\n\n.footer {\n background-color: #333;\n color: white;\n text-align: center;\n padding: 1rem;\n position: fixed;\n bottom: 0;\n width: 100%;\n}\n\n@media (max-width: 768px) {\n .navbar {\n flex-direction: column;\n }\n\n .nav-links {\n margin-top: 1rem;\n }\n\n .search-bar input {\n width: 100%;\n }\n\n .subject-list {\n flex-direction: column;\n align-items: center;\n }\n\n .subject-card {\n width: 80%;\n }\n}\n---script.js---\nfunction searchNotes() {\n const searchInput = document.getElementById('searchInput').value.toLowerCase();\n const notes = document.querySelectorAll('.note-card');\n notes.forEach(note => {\n const title = note.querySelector('h3').textContent.toLowerCase();\n if (title.includes(searchInput)) {\n note.style.display = 'block';\n } else {\n note.style.display = 'none';\n }\n });\n}\n\nfunction downloadNote(title) {\n alert(`Downloading note: ${title}`);\n // Here you would typically handle the download logic, e.g., redirecting to a download link\n}\n---end---" + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 887, + "completion_tokens": 1352, + "total_tokens": 2239, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 887 + }, + "system_fingerprint": "fp_f1afce2943" +} \ No newline at end of file diff --git a/readme.scroll b/readme.scroll new file mode 100644 index 0000000..e3d95dd --- /dev/null +++ b/readme.scroll @@ -0,0 +1,2 @@ +# noteshare1.scroll.pub +Website generated by DeepSeek from prompt: Create a frontend application for a Notes Sharing Platform using React (or Vue). The app should be mobile-friendly, with a modern and clean design, using Tailwind CSS or Bootstrap for styling. ### Features: 1. **Homepage (Public Page)**: - A navigation bar with links to "Home," "Login," and "Register." - A list of available subjects and topics that students can browse. - A search bar to filter notes by subject, topic, or title. - If the user is not logged in, show login and register buttons. 2. **Login/Register Page**: - A login form with fields for email and password. - A register form with fields for name, email, password, and role selection (Student/Admin). - Firebase Authentication integration to handle login and registration. 3. **Student Dashboard (After Login)**: - A list of notes with metadata (title, subject, topic, upload date). - A "Download" button next to each note that links to the file stored on Google Drive. - A simple and clean layout with easy-to-read text and clickable elements. - If the user is not logged in, redirect them to the login page. 4. **Admin Dashboard (After Admin Login)**: - A form to upload new notes with fields for: - Note title - Subject - Topic - File upload (Google Drive link) - A list of uploaded notes with options to delete or edit. - Display metadata for each note (title, subject, topic, upload date). - Admins can manage (add/edit/delete) notes only. 5. **Responsive Design**: - The design must be responsive and look good on both desktop and mobile devices. - Ensure that all pages adapt to various screen sizes using a mobile-first approach. 6. **Styling**: - Use **Tailwind CSS** or **Bootstrap** for styling. - Ensure the design is modern, clean, and easy to navigate. 7. **Authentication**: - Integrate **Firebase Authentication** to handle user sessions. - Use Firebase's email/password authentication for students and admins. 8. **Notifications** (Optional): - Show a notification or alert when a student successfully downloads a note. - Show an alert when the user tries to access an admin page without admin rights. 9. **State Management**: - Use **React Context** or **Vuex** (for Vue) for managing the app's state (user authentication, notes data). - Ensure the UI updates when the user logs in, logs out, or uploads a new note. 10. **Deployment Ready**: - The app should be ready for deployment using **Netlify** or **Vercel**. - Ensure all necessary configurations are in place to deploy the app seamlessly. --- Please generate a responsive, user-friendly frontend app with all of the above features using React (or Vue) and Tailwind CSS (or Bootstrap). Integrate Firebase for authentication and use the appropriate APIs to manage notes and files. \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..c827e8c --- /dev/null +++ b/script.js @@ -0,0 +1,17 @@ +function searchNotes() { + const searchInput = document.getElementById('searchInput').value.toLowerCase(); + const notes = document.querySelectorAll('.note-card'); + notes.forEach(note => { + const title = note.querySelector('h3').textContent.toLowerCase(); + if (title.includes(searchInput)) { + note.style.display = 'block'; + } else { + note.style.display = 'none'; + } + }); +} + +function downloadNote(title) { + alert(`Downloading note: ${title}`); + // Here you would typically handle the download logic, e.g., redirecting to a download link +} \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..2aed2eb --- /dev/null +++ b/style.css @@ -0,0 +1,151 @@ +body { + font-family: 'Arial', sans-serif; + margin: 0; + padding: 0; + background-color: #f4f4f9; + color: #333; +} + +.header { + background-color: #4a90e2; + color: white; + padding: 1rem; + text-align: center; +} + +.navbar { + display: flex; + justify-content: space-between; + align-items: center; +} + +.logo { + font-size: 1.5rem; + font-weight: bold; +} + +.nav-links a { + color: white; + text-decoration: none; + margin: 0 1rem; +} + +.main-content { + padding: 2rem; +} + +.hero { + text-align: center; + margin-bottom: 2rem; +} + +.hero h1 { + font-size: 2.5rem; + margin-bottom: 1rem; +} + +.search-bar { + display: flex; + justify-content: center; + margin-top: 1rem; +} + +.search-bar input { + padding: 0.5rem; + width: 300px; + border: 1px solid #ccc; + border-radius: 4px; +} + +.search-bar button { + padding: 0.5rem 1rem; + background-color: #4a90e2; + color: white; + border: none; + border-radius: 4px; + margin-left: 0.5rem; + cursor: pointer; +} + +.subjects { + margin-bottom: 2rem; +} + +.subject-list { + display: flex; + justify-content: space-around; + flex-wrap: wrap; +} + +.subject-card { + background-color: white; + padding: 1rem; + border-radius: 8px; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); + width: 200px; + text-align: center; + margin: 1rem; +} + +.notes-list { + margin-bottom: 2rem; +} + +.notes-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + gap: 1rem; +} + +.note-card { + background-color: white; + padding: 1rem; + border-radius: 8px; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); +} + +.note-card h3 { + margin-bottom: 0.5rem; +} + +.note-card button { + padding: 0.5rem 1rem; + background-color: #4a90e2; + color: white; + border: none; + border-radius: 4px; + cursor: pointer; +} + +.footer { + background-color: #333; + color: white; + text-align: center; + padding: 1rem; + position: fixed; + bottom: 0; + width: 100%; +} + +@media (max-width: 768px) { + .navbar { + flex-direction: column; + } + + .nav-links { + margin-top: 1rem; + } + + .search-bar input { + width: 100%; + } + + .subject-list { + flex-direction: column; + align-items: center; + } + + .subject-card { + width: 80%; + } +} \ No newline at end of file