Generate a frontend UI for a Digg-style website homepage
- User
Generate a frontend UI for a Digg-style website homepage
Assistant
Here's a frontend UI design for a Digg-style website homepage using HTML and CSS:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>NewsDigg - Trending Stories</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: Arial, sans-serif; } body { background-color: #f6f6f6; } .header { background-color: #1a1a1a; padding: 1rem; color: white; } .nav { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; } .logo { font-size: 24px; font-weight: bold; } .nav-links a { color: white; text-decoration: none; margin-left: 20px; } .container { max-width: 1200px; margin: 20px auto; display: grid; grid-template-columns: 3fr 1fr; gap: 20px; padding: 0 1rem; } .story-card { background-color: white; border-radius: 8px; padding: 15px; margin-bottom: 15px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); } .story-title { font-size: 18px; margin-bottom: 10px; color: #333; } .story-meta { font-size: 14px; color: #666; display: flex; align-items: center; gap: 15px; } .vote-buttons { display: flex; gap: 10px; margin-right: 15px; } .vote-btn { background: none; border: none; cursor: pointer; color: #666; } .vote-btn:hover { color: #1a1a1a; } .sidebar { background-color: white; border-radius: 8px; padding: 15px; height: fit-content; box-shadow: 0 2px 4px rgba(0,0,0,0.1); } .sidebar h2 { font-size: 18px; margin-bottom: 15px; color: #333; } .trending-topics { list-style: none; } .trending-topics li { margin-bottom: 10px; padding: 5px; background-color: #f6f6f6; border-radius: 4px; } .trending-topics a { color: #333; text-decoration: none; } @media (max-width: 768px) { .container { grid-template-columns: 1fr; } } </style> </head> <body> <header class="header"> <nav class="nav"> <div class="logo">NewsDigg</div> <div class="nav-links"> <a href="#">Home</a> <a href="#">Popular</a> <a href="#">Submit</a> <a href="#">Login</a> </div> </nav> </header> <main class="container"> <div class="main-content"> <article class="story-card"> <h2 class="story-title">Scientists Discover New Species in Amazon Rainforest</h2> <div class="story-meta"> <div class="vote-buttons"> <button class="vote-btn"><i class="fas fa-arrow-up"></i></button> <span>245</span> <button class="vote-btn"><i class="fas fa-arrow-down"></i></button> </div> <span><i class="far fa-comment"></i> 42 comments</span> <span><i class="far fa-clock"></i> 2 hours ago</span> <span><i class="far fa-user"></i> Posted by username</span> </div> </article> <article class="story-card"> <h2 class="story-title">Tech Giant Announces Revolutionary AI Development</h2> <div class="story-meta"> <div class="vote-buttons"> <button class="vote-btn"><i class="fas fa-arrow-up"></i></button> <span>189</span> <button class="vote-btn"><i class="fas fa-arrow-down"></i></button> </div> <span><i class="far fa-comment"></i> 28 comments</span> <span><i class="far fa-clock"></i> 4 hours ago</span> <span><i class="far fa-user"></i> Posted by username</span> </div> </article> <article class="story-card"> <h2 class="story-title">Global Climate Summit Reaches Historic Agreement</h2> <div class="story-meta"> <div class="vote-buttons"> <button class="vote-btn"><i class="fas fa-arrow-up"></i></button> <span>156</span> <button class="vote-btn"><i class="fas fa-arrow-down"></i></button> </div> <span><i class="far fa-comment"></i> 35 comments</span> <span><i class="far fa-clock"></i> 5 hours ago</span> <span><i class="far fa-user"></i> Posted by username</span> </div> </article> </div> <aside class="sidebar"> <h2>Trending Topics</h2> <ul class="trending-topics"> <li><a href="#">#Technology</a></li> <li><a href="#">#Science</a></li> <li><a href="#">#Politics</a></li> <li><a href="#">#Environment</a></li> <li><a href="#">#Sports</a></li> </ul> </aside> </main> </body> </html>This code creates a responsive Digg-style website homepage with the following features:
- A dark header with navigation links
- A main content area with story cards
- Voting buttons for each story
- Story metadata (comments, time posted, author)
- A sidebar with trending topics
- Responsive design that works on mobile devices
- Clean and modern styling with subtle shadows and rounded corners
- Font Awesome icons for visual elements
The design is minimal and focuses on readability and usability. Each story card contains:
- A headline
- Upvote/downvote buttons
- Vote count
- Number of comments
- Time posted
- Author information
The sidebar shows trending topics that users can click to filter content. The layout is responsive and will stack the main content and sidebar vertically on mobile devices.
To use this code, you'll need an internet connection to load the Font Awesome icons. You can customize the colors, spacing, and other visual elements by modifying the CSS variables and properties.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.