commit 4f9de4a03d210cb41dd090dbed81bb66398e619f
Author: root <root@hub.scroll.pub> Date: 2024-12-28 02:07:40 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..3c035d8 --- /dev/null +++ b/body.html @@ -0,0 +1,74 @@ +<header> + <nav> + <div class="logo">Support<span>Desk</span></div> + <div class="nav-links"> + <a href="#new-ticket">New Ticket</a> + <a href="#track-ticket">Track Ticket</a> + </div> + </nav> +</header> + +<main> + <section class="hero"> + <h1>IT Support Ticket System</h1> + <p>Get help fast with our streamlined support system</p> + </section> + + <section id="new-ticket" class="ticket-form"> + <h2>Submit New Ticket</h2> + <form id="ticketForm"> + <div class="form-group"> + <label for="name">Full Name</label> + <input type="text" id="name" required> + </div> + + <div class="form-group"> + <label for="email">Email Address</label> + <input type="email" id="email" required> + </div> + + <div class="form-group"> + <label for="category">Issue Category</label> + <select id="category" required> + <option value="">Select category</option> + <option value="hardware">Hardware</option> + <option value="software">Software</option> + <option value="network">Network</option> + <option value="other">Other</option> + </select> + </div> + + <div class="form-group"> + <label for="priority">Priority Level</label> + <select id="priority" required> + <option value="low">Low</option> + <option value="medium">Medium</option> + <option value="high">High</option> + </select> + </div> + + <div class="form-group"> + <label for="description">Issue Description</label> + <textarea id="description" rows="5" required></textarea> + </div> + + <button type="submit">Submit Ticket</button> + </form> + </section> + + <section id="track-ticket" class="ticket-tracker"> + <h2>Track Your Ticket</h2> + <form id="trackForm"> + <div class="form-group"> + <label for="ticketId">Ticket ID</label> + <input type="text" id="ticketId" required> + </div> + <button type="submit">Track Status</button> + </form> + <div id="statusResult" class="status-result hidden"></div> + </section> +</main> + +<footer> + <p>SupportDesk - IT Support Ticket System</p> +</footer> diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..7584d6e --- /dev/null +++ b/index.scroll @@ -0,0 +1,8 @@ +buildHtml +baseUrl https://support-desk.scroll.pub +metaTags +editButton /edit.html +title IT Support Ticket System +style.css +body.html +script.js diff --git a/prompt.json b/prompt.json new file mode 100644 index 0000000..bcab246 --- /dev/null +++ b/prompt.json @@ -0,0 +1,20 @@ +{ + "id": "msg_01GE5gymhkre91XJbbSMtiCD", + "type": "message", + "role": "assistant", + "model": "claude-3-5-sonnet-20241022", + "content": [ + { + "type": "text", + "text": "I'll help create a support ticket system website with email notifications.\n\nSuggested domain: support-desk.scroll.pub\n\n---domain---\nsupport-desk.scroll.pub\n\n---index.scroll---\nbuildHtml\nbaseUrl https://support-desk.scroll.pub\nmetaTags\neditButton /edit.html\ntitle IT Support Ticket System\nstyle.css\nbody.html\nscript.js\n\n---body.html---\n<header>\n <nav>\n <div class=\"logo\">Support<span>Desk</span></div>\n <div class=\"nav-links\">\n <a href=\"#new-ticket\">New Ticket</a>\n <a href=\"#track-ticket\">Track Ticket</a>\n </div>\n </nav>\n</header>\n\n<main>\n <section class=\"hero\">\n <h1>IT Support Ticket System</h1>\n <p>Get help fast with our streamlined support system</p>\n </section>\n\n <section id=\"new-ticket\" class=\"ticket-form\">\n <h2>Submit New Ticket</h2>\n <form id=\"ticketForm\">\n <div class=\"form-group\">\n <label for=\"name\">Full Name</label>\n <input type=\"text\" id=\"name\" required>\n </div>\n \n <div class=\"form-group\">\n <label for=\"email\">Email Address</label>\n <input type=\"email\" id=\"email\" required>\n </div>\n \n <div class=\"form-group\">\n <label for=\"category\">Issue Category</label>\n <select id=\"category\" required>\n <option value=\"\">Select category</option>\n <option value=\"hardware\">Hardware</option>\n <option value=\"software\">Software</option>\n <option value=\"network\">Network</option>\n <option value=\"other\">Other</option>\n </select>\n </div>\n \n <div class=\"form-group\">\n <label for=\"priority\">Priority Level</label>\n <select id=\"priority\" required>\n <option value=\"low\">Low</option>\n <option value=\"medium\">Medium</option>\n <option value=\"high\">High</option>\n </select>\n </div>\n \n <div class=\"form-group\">\n <label for=\"description\">Issue Description</label>\n <textarea id=\"description\" rows=\"5\" required></textarea>\n </div>\n \n <button type=\"submit\">Submit Ticket</button>\n </form>\n </section>\n\n <section id=\"track-ticket\" class=\"ticket-tracker\">\n <h2>Track Your Ticket</h2>\n <form id=\"trackForm\">\n <div class=\"form-group\">\n <label for=\"ticketId\">Ticket ID</label>\n <input type=\"text\" id=\"ticketId\" required>\n </div>\n <button type=\"submit\">Track Status</button>\n </form>\n <div id=\"statusResult\" class=\"status-result hidden\"></div>\n </section>\n</main>\n\n<footer>\n <p>SupportDesk - IT Support Ticket System</p>\n</footer>\n\n---style.css---\n:root {\n --primary-color: #2c3e50;\n --secondary-color: #3498db;\n --accent-color: #e74c3c;\n --bg-color: #f5f6fa;\n --text-color: #2c3e50;\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n line-height: 1.6;\n color: var(--text-color);\n background: var(--bg-color);\n}\n\nheader {\n background: var(--primary-color);\n padding: 1rem;\n box-shadow: 0 2px 5px rgba(0,0,0,0.1);\n}\n\nnav {\n max-width: 1200px;\n margin: 0 auto;\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 color: white;\n}\n\n.logo span {\n color: var(--secondary-color);\n}\n\n.nav-links a {\n color: white;\n text-decoration: none;\n margin-left: 2rem;\n transition: color 0.3s ease;\n}\n\n.nav-links a:hover {\n color: var(--secondary-color);\n}\n\nmain {\n max-width: 1200px;\n margin: 0 auto;\n padding: 2rem;\n}\n\n.hero {\n text-align: center;\n padding: 4rem 0;\n}\n\n.hero h1 {\n font-size: 2.5rem;\n margin-bottom: 1rem;\n color: var(--primary-color);\n}\n\n.ticket-form, .ticket-tracker {\n background: white;\n padding: 2rem;\n border-radius: 8px;\n box-shadow: 0 4px 6px rgba(0,0,0,0.1);\n margin-bottom: 2rem;\n}\n\nh2 {\n color: var(--primary-color);\n margin-bottom: 1.5rem;\n}\n\n.form-group {\n margin-bottom: 1.5rem;\n}\n\nlabel {\n display: block;\n margin-bottom: 0.5rem;\n font-weight: 500;\n}\n\ninput, select, textarea {\n width: 100%;\n padding: 0.8rem;\n border: 1px solid #ddd;\n border-radius: 4px;\n font-size: 1rem;\n}\n\nbutton {\n background: var(--secondary-color);\n color: white;\n padding: 0.8rem 1.5rem;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n font-size: 1rem;\n transition: background 0.3s ease;\n}\n\nbutton:hover {\n background: #2980b9;\n}\n\n.status-result {\n margin-top: 1rem;\n padding: 1rem;\n border-radius: 4px;\n}\n\n.status-result.success {\n background: #2ecc71;\n color: white;\n}\n\n.status-result.error {\n background: var(--accent-color);\n color: white;\n}\n\n.hidden {\n display: none;\n}\n\nfooter {\n background: var(--primary-color);\n color: white;\n text-align: center;\n padding: 1rem;\n margin-top: 2rem;\n}\n\n@media (max-width: 768px) {\n nav {\n flex-direction: column;\n text-align: center;\n }\n \n .nav-links {\n margin-top: 1rem;\n }\n \n .nav-links a {\n margin: 0 1rem;\n }\n \n .hero h1 {\n font-size: 2rem;\n }\n \n main {\n padding: 1rem;\n }\n}\n\n---script.js---\ndocument.addEventListener('DOMContentLoaded', () => {\n const ticketForm = document.getElementById('ticketForm');\n const trackForm = document.getElementById('trackForm');\n const statusResult = document.getElementById('statusResult');\n\n // Generate random ticket ID\n const generateTicketId = () => {\n return 'TKT-' + Math.random().toString(36).substr(2, 9).toUpperCase();\n };\n\n // Store tickets in localStorage\n const tickets = JSON.parse(localStorage.getItem('tickets')) || {};\n\n ticketForm.addEventListener('submit', (e) => {\n e.preventDefault();\n \n const ticketId = generateTicketId();\n const ticket = {\n id: ticketId,\n name: document.getElementById('name').value,\n email: document.getElementById('email').value,\n category: document.getElementById('category').value,\n priority: document.getElementById('priority').value,\n description: document.getElementById('description').value,\n status: 'Open',\n created: new Date().toISOString()\n };\n\n tickets[ticketId] = ticket;\n localStorage.setItem('tickets', JSON.stringify(tickets));\n\n // Simulate email notification\n console.log(`Email sent to ${ticket.email} with ticket ID: ${ticketId}`);\n\n // Show success message\n alert(`Ticket created successfully!\\nYour ticket ID is: ${ticketId}`);\n ticketForm.reset();\n });\n\n trackForm.addEventListener('submit', (e) => {\n e.preventDefault();\n \n const ticketId = document.getElementById('ticketId').value;\n const ticket = tickets[ticketId];\n\n statusResult.classList.remove('hidden', 'success', 'error');\n \n if (ticket) {\n statusResult.textContent = `\n Status: ${ticket.status}\n Category: ${ticket.category}\n Priority: ${ticket.priority}\n Created: ${new Date(ticket.created).toLocaleString()}\n `;\n statusResult.classList.add('success');\n } else {\n statusResult.textContent = 'Ticket not found. Please check the ID and try again.';\n statusResult.classList.add('error');\n }\n });\n\n // Form validation\n const inputs = document.querySelectorAll('input, select, textarea');\n inputs.forEach(input => {\n input.addEventListener('invalid', (e) => {\n e.preventDefault();\n input.classList.add('error');\n });\n \n input.addEventListener('input', () => {\n input.classList.remove('error');\n });\n });\n});\n\n---end---\n\nThis implementation includes:\n\n1. A clean, modern design with a responsive layout\n2. Form for submitting new support tickets\n3. Ticket tracking functionality\n4. Local storage for ticket data\n5. Form validation\n6. Simulated email notifications (console output)\n7. Accessible form elements\n8. Mobile-responsive design\n9. Smooth animations and transitions\n10. Error handling and success messages\n\nThe website uses a color scheme that's professional and easy on the eyes, with clear typography and intuitive navigation. The JavaScript implementation includes basic ticket management functionality with local storage, though in a real implementation you'd want to connect this to a backend server.\n\nThe CSS includes modern features like CSS variables, flexbox for layout, and smooth transitions. The design is fully responsive and works well on both desktop and mobile devices." + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "usage": { + "input_tokens": 282, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "output_tokens": 2674 + } +} \ No newline at end of file diff --git a/readme.scroll b/readme.scroll new file mode 100644 index 0000000..b6fe69b --- /dev/null +++ b/readme.scroll @@ -0,0 +1,2 @@ +# support-desk.scroll.pub +Website generated by Claude from prompt: make a web for TI support ticket with email status notification \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..1079b41 --- /dev/null +++ b/script.js @@ -0,0 +1,74 @@ +document.addEventListener('DOMContentLoaded', () => { + const ticketForm = document.getElementById('ticketForm'); + const trackForm = document.getElementById('trackForm'); + const statusResult = document.getElementById('statusResult'); + + // Generate random ticket ID + const generateTicketId = () => { + return 'TKT-' + Math.random().toString(36).substr(2, 9).toUpperCase(); + }; + + // Store tickets in localStorage + const tickets = JSON.parse(localStorage.getItem('tickets')) || {}; + + ticketForm.addEventListener('submit', (e) => { + e.preventDefault(); + + const ticketId = generateTicketId(); + const ticket = { + id: ticketId, + name: document.getElementById('name').value, + email: document.getElementById('email').value, + category: document.getElementById('category').value, + priority: document.getElementById('priority').value, + description: document.getElementById('description').value, + status: 'Open', + created: new Date().toISOString() + }; + + tickets[ticketId] = ticket; + localStorage.setItem('tickets', JSON.stringify(tickets)); + + // Simulate email notification + console.log(`Email sent to ${ticket.email} with ticket ID: ${ticketId}`); + + // Show success message + alert(`Ticket created successfully!\nYour ticket ID is: ${ticketId}`); + ticketForm.reset(); + }); + + trackForm.addEventListener('submit', (e) => { + e.preventDefault(); + + const ticketId = document.getElementById('ticketId').value; + const ticket = tickets[ticketId]; + + statusResult.classList.remove('hidden', 'success', 'error'); + + if (ticket) { + statusResult.textContent = ` + Status: ${ticket.status} + Category: ${ticket.category} + Priority: ${ticket.priority} + Created: ${new Date(ticket.created).toLocaleString()} + `; + statusResult.classList.add('success'); + } else { + statusResult.textContent = 'Ticket not found. Please check the ID and try again.'; + statusResult.classList.add('error'); + } + }); + + // Form validation + const inputs = document.querySelectorAll('input, select, textarea'); + inputs.forEach(input => { + input.addEventListener('invalid', (e) => { + e.preventDefault(); + input.classList.add('error'); + }); + + input.addEventListener('input', () => { + input.classList.remove('error'); + }); + }); +}); diff --git a/style.css b/style.css new file mode 100644 index 0000000..ad6ad0e --- /dev/null +++ b/style.css @@ -0,0 +1,169 @@ +:root { + --primary-color: #2c3e50; + --secondary-color: #3498db; + --accent-color: #e74c3c; + --bg-color: #f5f6fa; + --text-color: #2c3e50; +} + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + line-height: 1.6; + color: var(--text-color); + background: var(--bg-color); +} + +header { + background: var(--primary-color); + padding: 1rem; + box-shadow: 0 2px 5px rgba(0,0,0,0.1); +} + +nav { + max-width: 1200px; + margin: 0 auto; + display: flex; + justify-content: space-between; + align-items: center; +} + +.logo { + font-size: 1.5rem; + font-weight: bold; + color: white; +} + +.logo span { + color: var(--secondary-color); +} + +.nav-links a { + color: white; + text-decoration: none; + margin-left: 2rem; + transition: color 0.3s ease; +} + +.nav-links a:hover { + color: var(--secondary-color); +} + +main { + max-width: 1200px; + margin: 0 auto; + padding: 2rem; +} + +.hero { + text-align: center; + padding: 4rem 0; +} + +.hero h1 { + font-size: 2.5rem; + margin-bottom: 1rem; + color: var(--primary-color); +} + +.ticket-form, .ticket-tracker { + background: white; + padding: 2rem; + border-radius: 8px; + box-shadow: 0 4px 6px rgba(0,0,0,0.1); + margin-bottom: 2rem; +} + +h2 { + color: var(--primary-color); + margin-bottom: 1.5rem; +} + +.form-group { + margin-bottom: 1.5rem; +} + +label { + display: block; + margin-bottom: 0.5rem; + font-weight: 500; +} + +input, select, textarea { + width: 100%; + padding: 0.8rem; + border: 1px solid #ddd; + border-radius: 4px; + font-size: 1rem; +} + +button { + background: var(--secondary-color); + color: white; + padding: 0.8rem 1.5rem; + border: none; + border-radius: 4px; + cursor: pointer; + font-size: 1rem; + transition: background 0.3s ease; +} + +button:hover { + background: #2980b9; +} + +.status-result { + margin-top: 1rem; + padding: 1rem; + border-radius: 4px; +} + +.status-result.success { + background: #2ecc71; + color: white; +} + +.status-result.error { + background: var(--accent-color); + color: white; +} + +.hidden { + display: none; +} + +footer { + background: var(--primary-color); + color: white; + text-align: center; + padding: 1rem; + margin-top: 2rem; +} + +@media (max-width: 768px) { + nav { + flex-direction: column; + text-align: center; + } + + .nav-links { + margin-top: 1rem; + } + + .nav-links a { + margin: 0 1rem; + } + + .hero h1 { + font-size: 2rem; + } + + main { + padding: 1rem; + } +}