Generate a frontend UI for a Digg-style website homepage
- User
Generate a frontend UI for a Digg-style website homepage
- Assistant
Creating a frontend UI for a Digg-style website homepage involves designing a layout that showcases user-submitted content, allows for easy navigation, and encourages interaction. Below is a simple HTML/CSS structure that you can use as a starting point for your Digg-style homepage. This example includes a header, a main content area for articles, and a sidebar for additional features.
HTML Structure
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Digg-Style Homepage</title> <link rel="stylesheet" href="styles.css"> </head> <body> <header> <div class="logo">DiggClone</div> <nav> <ul> <li><a href="#">Home</a></li> <li><a href="#">Submit</a></li> <li><a href="#">Trending</a></li> <li><a href="#">Categories</a></li> <li><a href="#">Login</a></li> </ul> </nav> </header> <main> <section class="articles"> <article class="article"> <h2><a href="#">Article Title 1</a></h2> <p class="meta">Posted by User1 on 2023-10-01</p> <p class="description">This is a brief description of the article. It gives an overview of the content and entices users to read more.</p> <div class="interaction"> <span class="votes">Votes: 120</span> <button class="vote-button">Vote</button> </div> </article> <article class="article"> <h2><a href="#">Article Title 2</a></h2> <p class="meta">Posted by User2 on 2023-10-02</p> <p class="description">This is a brief description of the article. It gives an overview of the content and entices users to read more.</p> <div class="interaction"> <span class="votes">Votes: 85</span> <button class="vote-button">Vote</button> </div> </article> <!-- More articles can be added here --> </section> <aside class="sidebar"> <h3>Trending Topics</h3> <ul> <li><a href="#">Topic 1</a></li> <li><a href="#">Topic 2</a></li> <li><a href="#">Topic 3</a></li> <li><a href="#">Topic 4</a></li> </ul> <h3>Popular Users</h3> <ul> <li><a href="#">User1</a></li> <li><a href="#">User2</a></li> <li><a href="#">User3</a></li> </ul> </aside> </main> <footer> <p>© 2023 DiggClone. All rights reserved.</p> </footer> </body> </html>CSS Styles (styles.css)
body { font-family: Arial, sans-serif; margin: 0; padding: 0; background-color: #f4f4f4; } header { background: #333; color: #fff; padding: 10px 20px; display: flex; justify-content: space-between; align-items: center; } header .logo { font-size: 24px; font-weight: bold; } nav ul { list-style: none; display: flex; gap: 15px; } nav a { color: #fff; text-decoration: none; } main { display: flex; margin: 20px; } .articles { flex: 3; margin-right: 20px; } .article { background: #fff; padding: 15px; margin-bottom: 20px; border-radius: 5px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); } .article h2 { margin: 0 0 10px; } .meta { font-size: 12px; color: #777; } .description { margin: 10px 0; } .interaction { display: flex; justify-content: space-between; align-items: center; } .votes { font-weight: bold; } .vote-button { background: #28a745; color: #fff; border: none; padding: 5px 10px; border-radius: 3px; cursor: pointer; } .vote-button:hover { background: #218838; } .sidebar { flex: 1; background: #fff; padding: 15px; border-radius: 5px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); } .sidebar h3 { margin-top: 0; } .sidebar ul { list-style: none; padding: 0; } .sidebar a { text-decoration: none; color: #007bff; } .sidebar a:hover { text-decoration: underline; } footer { text-align: center; padding: 10px; background: #333; color: #fff; position: relative; bottom: 0; width: 100%; }Explanation
- Header: Contains the logo and navigation links.
- Main Content: Divided into two sections: articles and a sidebar.
- Articles: Each article has a title, meta information, a description, and interaction buttons.
- Sidebar: Displays trending topics and popular users.
- Footer: Simple copyright notice.
Customization
You can customize the layout, colors, fonts, and additional features based on your specific requirements. Consider adding JavaScript for dynamic interactions, such as voting functionality, or integrating a backend to handle user submissions and comments.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.