Improvement: Enhanced blog layout

This commit is contained in:
Alvin-Zilverstand committed 2026-10-26 23:24:16 +01:00
1 parent d98780d007
commit 3dbcb6b309
4 files changed
+228 -67

No files matched your search

+42 -33
View File
@@ -3,55 +3,64 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Placeholder Blog</title>
<title>Modern Blog - My Name</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>Welcome to My Blog</h1>
<nav>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#posts">Posts</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
<header class="header">
<div class="container">
<h1>My Modern Blog</h1>
<nav>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#posts">Posts</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
</div>
</header>
<main>
<section id="home">
<h2>Latest Posts</h2>
<article class="post">
<h3>First Post Title</h3>
<p>This is placeholder content for the first blog post. We can add more detailed text here later.</p>
<small>Published on: October 26, 2026</small>
</article>
<article class="post">
<h3>Another Placeholder Article</h3>
<p>Placeholder content for a second article. This section will hold more detailed information about the topics we plan to cover.</p>
<small>Published on: October 25, 2026</small>
</article>
<main class="container">
<section id="home" class="hero-section">
<h2>Latest Articles</h2>
<div class="post-grid">
<article class="post-card">
<h3>First Post Title</h3>
<p>Dive into the latest insights and discoveries. This is placeholder content for the most recent article.</p>
<small class="meta">Published on: October 26, 2026</small>
</article>
<article class="post-card">
<h3>Another Placeholder Article</h3>
<p>Explore deeper topics and gain new perspectives. This section holds more detailed information.</p>
<small class="meta">Published on: October 25, 2026</small>
</article>
</div>
</section>
<section id="about">
<section id="about" class="content-section">
<h2>About Me</h2>
<p>This is where I will write about myself, my interests, and what this blog is all about.</p>
<p>Welcome to my corner of the internet! I share thoughts on technology, life, and creative pursuits. Feel free to explore!</p>
</section>
<section id="posts">
<section id="posts" class="content-section">
<h2>All Posts</h2>
<!-- More posts will be listed here -->
<div class="post-list">
<!-- More posts will be listed here -->
<p>No other posts found yet.</p>
</div>
</section>
<section id="contact">
<h2>Contact Me</h2>
<p>You can reach me at your_email@example.com or connect on social media.</p>
<section id="contact" class="content-section">
<h2>Get In Touch</h2>
<p>I'm always open to new ideas. Reach me at <a href="mailto:your_email@example.com">your_email@example.com</a> or connect on social media.</p>
</section>
</main>
<footer>
<p>&copy; 2026 My Placeholder Blog. All rights reserved.</p>
<footer class="footer">
<div class="container">
<p>&copy; 2026 My Modern Blog. All rights reserved.</p>
</div>
</footer>
</body>
</html>
+97 -34
View File
@@ -1,20 +1,42 @@
body {
font-family: Arial, sans-serif;
/* --- General Reset & Variables --- */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
background-color: #f4f4f9;
}
body {
font-family: 'Helvetica Neue', Arial, sans-serif;
line-height: 1.6;
background-color: #f9f9fb;
color: #333;
}
header {
background-color: #333;
color: white;
padding: 1em 0;
text-align: center;
.container {
width: 90%;
max-width: 1200px;
margin: 0 auto;
padding: 0 15px;
}
header h1 {
/* --- Header & Navigation --- */
.header {
background-color: #2c3e50; /* Darker, professional color */
color: white;
padding: 1rem 0;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.header .container {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap; /* For responsiveness */
}
.header h1 {
margin: 0;
font-size: 1.8rem;
}
nav ul {
@@ -22,47 +44,88 @@ nav ul {
padding: 0;
margin: 0;
display: flex;
justify-content: center;
}
nav ul li a {
color: white;
text-decoration: none;
padding: 0 15px;
padding: 10px 15px;
transition: background-color 0.3s;
}
nav ul li a:hover {
color: #4CAF50;
background-color: #34495e;
border-radius: 4px;
}
/* --- Main Content --- */
main {
padding: 20px;
max-width: 900px;
margin: 20px auto;
background-color: white;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
padding: 30px 0;
min-height: 60vh;
}
h2 {
border-bottom: 2px solid #eee;
.content-section {
margin-bottom: 40px;
padding: 20px 0;
}
.content-section h2 {
color: #2c3e50;
border-bottom: 3px solid #3498db; /* Highlight color */
padding-bottom: 10px;
color: #333;
margin-bottom: 20px;
font-size: 2rem;
}
.post {
margin-bottom: 30px;
padding-bottom: 15px;
border-bottom: 1px dashed #ccc;
}
.post h3 {
color: #333;
}
footer {
.hero-section {
text-align: center;
padding: 1em 0;
background-color: #333;
padding: 40px 0;
background-color: #ecf0f1;
border-radius: 8px;
}
.post-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 25px;
}
.post-card {
background-color: white;
border: 1px solid #ddd;
border-radius: 8px;
padding: 20px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
transition: transform 0.3s ease;
}
.post-card:hover {
transform: translateY(-5px);
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}
.post-card h3 {
color: #2980b9;
margin-top: 0;
}
.meta {
display: block;
margin-top: 15px;
font-size: 0.9em;
color: #7f8c8d;
}
/* --- Footer --- */
.footer {
background-color: #34495e;
color: white;
margin-top: 20px;
text-align: center;
padding: 1.5rem 0;
margin-top: 30px;
}
.footer .container {
display: flex;
justify-content: center;
}