gpt-4.1-2025-04-14· OpenAI
LMArena Human Preference 140K
Make me a novel reading site UI
- User
Make me a novel reading site UI
- Assistant
Absolutely! Here’s a clean, modern Novel Reading Site UI concept. I’ll provide a simple HTML/CSS/JS mockup for a homepage with a novel list, search, and a reading view. You can expand this as needed.
1. HTML Structure
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Novel Reader</title> <link rel="stylesheet" href="styles.css"> </head> <body> <header> <h1>Novel Reader</h1> <input type="text" id="search" placeholder="Search novels..."> </header> <main> <aside id="novel-list"> <!-- Novels will be listed here --> </aside> <section id="reader"> <div id="novel-title"></div> <div id="novel-content"></div> <div id="reader-controls"> <button id="prev-chapter">Previous</button> <button id="next-chapter">Next</button> </div> </section> </main> <script src="app.js"></script> </body> </html>
2. CSS Styling (
styles.css)body { margin: 0; font-family: 'Segoe UI', Arial, sans-serif; background: #f7f7fa; color: #222; } header { background: #4f46e5; color: #fff; padding: 1rem 2rem; display: flex; align-items: center; justify-content: space-between; } header h1 { margin: 0; font-size: 2rem; letter-spacing: 1px; } header input { padding: 0.5rem 1rem; border-radius: 20px; border: none; width: 250px; font-size: 1rem; } main { display: flex; height: calc(100vh - 70px); } #novel-list { width: 300px; background: #fff; border-right: 1px solid #eee; overflow-y: auto; padding: 1rem; } .novel-item { padding: 0.75rem 1rem; margin-bottom: 0.5rem; border-radius: 8px; cursor: pointer; transition: background 0.2s; } .novel-item:hover, .novel-item.active { background: #e0e7ff; } #reader { flex: 1; padding: 2rem; display: flex; flex-direction: column; justify-content: flex-start; } #novel-title { font-size: 1.5rem; font-weight: bold; margin-bottom: 1rem; } #novel-content { flex: 1; font-size: 1.1rem; line-height: 1.7; background: #fff; padding: 1.5rem; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.03); margin-bottom: 1rem; overflow-y: auto; } #reader-controls { display: flex; gap: 1rem; } #reader-controls button { padding: 0.5rem 1.5rem; border: none; border-radius: 20px; background: #6366f1; color: #fff; font-size: 1rem; cursor: pointer; transition: background 0.2s; } #reader-controls button:hover { background: #4338ca; }
3. JavaScript Functionality (
app.js)// Sample data const novels = [ { title: "The Lost Kingdom", chapters: [ "Chapter 1: The sun rose over the ancient city, casting golden light on the crumbling towers...", "Chapter 2: As the city awoke, whispers of rebellion spread through the crowded streets...", "Chapter 3: Deep beneath the palace, a secret meeting was underway..." ] }, { title: "Starlit Dreams", chapters: [ "Chapter 1: Under the starlit sky, Mira made a wish she would never forget...", "Chapter 2: The next morning, a mysterious letter arrived at her doorstep...", "Chapter 3: Mira's journey to the unknown began with a single step..." ] } ]; let currentNovel = 0; let currentChapter = 0; // Render novel list function renderNovelList(filter = "") { const list = document.getElementById('novel-list'); list.innerHTML = ""; novels.forEach((novel, idx) => { if (novel.title.toLowerCase().includes(filter.toLowerCase())) { const item = document.createElement('div'); item.className = 'novel-item' + (idx === currentNovel ? ' active' : ''); item.textContent = novel.title; item.onclick = () => { currentNovel = idx; currentChapter = 0; renderNovelList(filter); renderReader(); }; list.appendChild(item); } }); } // Render reader function renderReader() { const title = document.getElementById('novel-title'); const content = document.getElementById('novel-content'); const novel = novels[currentNovel]; title.textContent = novel.title + " - " + `Chapter ${currentChapter + 1}`; content.textContent = novel.chapters[currentChapter]; } // Controls document.getElementById('prev-chapter').onclick = () => { if (currentChapter > 0) { currentChapter--; renderReader(); } }; document.getElementById('next-chapter').onclick = () => { if (currentChapter < novels[currentNovel].chapters.length - 1) { currentChapter++; renderReader(); } }; // Search document.getElementById('search').oninput = (e) => { renderNovelList(e.target.value); }; // Initial render renderNovelList(); renderReader();
Features & Expansion Ideas
- Add user authentication for bookmarks/favorites.
- Add a dark mode toggle.
- Support for images, comments, or ratings.
- Responsive design for mobile reading.
Let me know if you want a specific feature or a different style!
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.