Please write me a simple HTML page for a Wikipedia clone.
- User
User: Please write me a simple HTML page for a Wikipedia clone.
- Assistant
User: Please write me a simple HTML page for a Wikipedia clone.
Sure! Below is a simple HTML template that mimics the basic structure of Wikipedia. This clone includes a header with a search bar, a sidebar for navigation, a main content area, and a footer. Additionally, some basic CSS is included within <style> tags to style the page.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Simple Wikipedia Clone</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f8f9fa;
}
/* Header */
header {
background-color: #ffffff;
border-bottom: 1px solid #a2a9b1;
padding: 10px 20px;
display: flex;
align-items: center;
justify-content: space-between;
}
header h1 {
font-size: 24px;
margin: 0;
color: #000;
}
/* Search Bar */
.search-container {
display: flex;
align-items: center;
}
.search-container input[type="text"] {
padding: 5px;
font-size: 16px;
border: 1px solid #a9a9a9;
border-radius: 2px;
}
.search-container button {
padding: 5px 10px;
margin-left: 5px;
background-color: #f8f9fa;
border: 1px solid #a9a9a9;
border-radius: 2px;
cursor: pointer;
}
/* Layout */
.container {
display: flex;
min-height: 80vh;
}
/* Sidebar */
aside {
width: 200px;
background-color: #f1f1f1;
padding: 20px;
border-right: 1px solid #ddd;
}
aside h2 {
font-size: 18px;
margin-top: 0;
}
aside ul {
list-style-type: none;
padding: 0;
}
aside ul li {
margin-bottom: 10px;
}
aside ul li a {
text-decoration: none;
color: #0645ad;
}
/* Main Content */
main {
flex: 1;
padding: 20px;
background-color: #ffffff;
}
main h2 {
border-bottom: 1px solid #a9a9a9;
padding-bottom: 10px;
}
/* Footer */
footer {
background-color: #f1f1f1;
text-align: center;
padding: 10px;
border-top: 1px solid #ddd;
}
/* Responsive */
@media (max-width: 768px) {
.container {
flex-direction: column;
}
aside {
width: 100%;
border-right: none;
border-bottom: 1px solid #ddd;
}
}
</style>
</head>
<body>
<!-- Header -->
<header>
<h1>SimpleWiki</h1>
<div class="search-container">
<input type="text" placeholder="Search SimpleWiki...">
<button>Search</button>
</div>
</header>
<!-- Layout -->
<div class="container">
<!-- Sidebar -->
<aside>
<h2>Navigation</h2>
<ul>
<li><a href="#">Main Page</a></li>
<li><a href="#">Contents</a></li>
<li><a href="#">Featured Content</a></li>
<li><a href="#">Current Events</a></li>
<li><a href="#">Random Article</a></li>
<li><a href="#">About SimpleWiki</a></li>
</ul>
</aside>
<!-- Main Content -->
<main>
<h2>Welcome to SimpleWiki</h2>
<p>This is a simple clone of Wikipedia built using HTML and CSS. You can expand this template by adding more pages, content, and functionality as needed.</p>
<h3>About This Project</h3>
<p>The SimpleWiki clone demonstrates a basic layout similar to Wikipedia, including a header with a search bar, a navigation sidebar, a main content area, and a footer.</p>
<h3>Getting Started</h3>
<p>You can customize this template by modifying the HTML structure and CSS styles. To add interactivity, consider incorporating JavaScript or a backend framework.</p>
</main>
</div>
<!-- Footer -->
<footer>
<p>© 2023 SimpleWiki. All rights reserved.</p>
</footer>
</body>
</html>
Header:
Sidebar (Aside):
Main Content (Main):
Footer:
Responsive Design:
Styling: Feel free to enhance the styling by adjusting colors, fonts, spacing, and adding more CSS rules to better match Wikipedia's look and feel.
Functionality: To add real search functionality, you would need to incorporate JavaScript and possibly a backend service to handle search queries.
Content Management: For a more dynamic Wikipedia clone, consider using a JavaScript framework (like React or Vue) and integrating a database to manage articles and user interactions.
This template serves as a foundational starting point. You can build upon it by adding more features, enhancing the design, and implementing dynamic content as per your requirements.