Simple Personal Blogging Template Using Bootstrap

0
75

Blogging has evolved as one of the most effective ways to express ideas, share knowledge, or showcase creativity. However, for many aspiring bloggers, the first hurdle isn’t the content but the platform itself. While there are numerous ready-made blogging platforms available, building a personal blogging website offers full control over aesthetics, functionality, and branding.

In this article, we’ll explore a simple approach to create a personal blogging template using Bootstrap, a popular front-end framework.

Follow this video for complete guidance :

Full Source Code

index.html

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Personal Blog</title>

	<link rel="preconnect" href="https://fonts.googleapis.com">
	<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
	<link href="https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">

	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css" />
	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.1/css/all.min.css" />

	<link rel="stylesheet" href="css/style.css">
</head>
<body>
	<div class="header py-4">
		<a class="logo" href="index.html">
			<h1 class="text-center">Ritesh's Blog</h1>
		</a>
	</div>

	<div class="container mt-4">
		<div class="row">
			<div class="col-md-8">
				<div class="row">
					<div class="col-md-6">
						<a href="detail.html">
							<div class="box">
								<figure>
									<img src="https://picsum.photos/600/500" class="w-100">
									<div class="title">
										Here goes the title of blog
									</div>
								</figure>
							</div>
						</a>
					</div>
					<div class="col-md-6">
						<a href="detail.html">
							<div class="box">
								<figure>
									<img src="https://picsum.photos/601/500" class="w-100">
									<div class="title">
										Here goes the title of blog
									</div>
								</figure>
							</div>
						</a>
					</div>
					<div class="col-md-6">
						<a href="detail.html">
							<div class="box">
								<figure>
									<img src="https://picsum.photos/602/500" class="w-100">
									<div class="title">
										Here goes the title of blog
									</div>
								</figure>
							</div>
						</a>
					</div>
					<div class="col-md-6">
						<a href="detail.html">
							<div class="box">
								<figure>
									<img src="https://picsum.photos/603/500" class="w-100">
									<div class="title">
										Here goes the title of blog
									</div>
								</figure>
							</div>
						</a>
					</div>
					<div class="col-md-6">
						<a href="detail.html">
							<div class="box">
								<figure>
									<img src="https://picsum.photos/604/500" class="w-100">
									<div class="title">
										Here goes the title of blog
									</div>
								</figure>
							</div>
						</a>
					</div>
					<div class="col-md-6">
						<a href="detail.html">
							<div class="box">
								<figure>
									<img src="https://picsum.photos/605/500" class="w-100">
									<div class="title">
										Here goes the title of blog
									</div>
								</figure>
							</div>
						</a>
					</div>
					<div class="col-md-6">
						<a href="detail.html">
							<div class="box">
								<figure>
									<img src="https://picsum.photos/606/500" class="w-100">
									<div class="title">
										Here goes the title of blog
									</div>
								</figure>
							</div>
						</a>
					</div>
					<div class="col-md-6">
						<a href="detail.html">
							<div class="box">
								<figure>
									<img src="https://picsum.photos/607/500" class="w-100">
									<div class="title">
										Here goes the title of blog
									</div>
								</figure>
							</div>
						</a>
					</div>
				</div>
			</div>
			<div class="col-md-4">
				<div class="sticky">
					<div class="card p-3">
						<div class="profile text-center">
							<img width="150" class="rounded-circle profile-image" src="https://picsum.photos/400/400">
							<h3 class="mt-3">Ritesh Ghimire</h3>
							<p>Tech aficionado, sports aficionado. Coding, traveling, playing, sharing insignts on tech and sports. A life of adventure, exploration and balanced pursuit.</p>
						</div>
						<hr>
						<ul class="social-links list-unstyled d-flex justify-content-center">
							<li class="facebook">
								<a href="#" target="_blank">
									<i class="fab fa-facebook-f"></i>
								</a>
							</li>
							<li class="instagram">
								<a href="#" target="_blank">
									<i class="fab fa-instagram"></i>
								</a>
							</li>
							<li class="twitter">
								<a href="#" target="_blank">
									<i class="fab fa-twitter"></i>
								</a>
							</li>
							<li class="linkedin">
								<a href="#" target="_blank">
									<i class="fab fa-linkedin"></i>
								</a>
							</li>
						</ul>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="footer mt-3 py-4">
		<span>&copy; Ritesh 2024
	</div>
</body>
</html>

detail.html

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Personal Blog</title>

	<link rel="preconnect" href="https://fonts.googleapis.com">
	<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
	<link href="https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">

	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css" />
	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.1/css/all.min.css" />

	<link rel="stylesheet" href="css/style.css">
</head>
<body>
	<div class="header py-4">
		<a class="logo" href="index.html">
			<h1 class="text-center">Ritesh's Blog</h1>
		</a>
	</div>
	<div class="container mt-4">
		<div class="card p-3">
			<h1 class="mb-3 text-center">Here goes the title of blog</h1>
			<div class="story mt-3">
				<div class="frame">
					<img src="https://picsum.photos/420/300">
				</div>
				<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
				<p>Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.</p>
				<p>If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.</p>
				<p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</p>
				<p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source.</p>
				<p>The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.</p>
				<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
				<p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</p>
			</div>
		</div>
		<div class="card p-3 mt-5">
			<h4>More Blogs</h4>
			<hr>
			<div class="row">
				<div class="col-md-4">
					<a href="detail.html">
						<div class="box">
							<figure>
								<img src="https://picsum.photos/501/400" class="w-100">
								<div class="title">
									Here goes the title of blog
								</div>
							</figure>
						</div>
					</a>
				</div>
				<div class="col-md-4">
					<a href="detail.html">
						<div class="box">
							<figure>
								<img src="https://picsum.photos/502/400" class="w-100">
								<div class="title">
									Here goes the title of blog
								</div>
							</figure>
						</div>
					</a>
				</div>
				<div class="col-md-4">
					<a href="detail.html">
						<div class="box">
							<figure>
								<img src="https://picsum.photos/503/400" class="w-100">
								<div class="title">
									Here goes the title of blog
								</div>
							</figure>
						</div>
					</a>
				</div>
				<div class="col-md-4">
					<a href="detail.html">
						<div class="box">
							<figure>
								<img src="https://picsum.photos/504/400" class="w-100">
								<div class="title">
									Here goes the title of blog
								</div>
							</figure>
						</div>
					</a>
				</div>
				<div class="col-md-4">
					<a href="detail.html">
						<div class="box">
							<figure>
								<img src="https://picsum.photos/505/400" class="w-100">
								<div class="title">
									Here goes the title of blog
								</div>
							</figure>
						</div>
					</a>
				</div>
				<div class="col-md-4">
					<a href="detail.html">
						<div class="box">
							<figure>
								<img src="https://picsum.photos/506/400" class="w-100">
								<div class="title">
									Here goes the title of blog
								</div>
							</figure>
						</div>
					</a>
				</div>
			</div>
		</div>
	</div>
	<div class="footer mt-3 py-4">
		<span>&copy; Ritesh 2024
	</div>
</body>
</html>

style.css

*{
	font-family: Barlow Condensed,sans-serif;
}
body{
	background: #f2f2f2;
}
.container{
	max-width: 1000px;
}
.header{
	background: #fff;
	border-bottom: 1px solid #ddd;
}
.logo{
	text-decoration: none;
	color:#000;
}
.logo:hover{
	color:blue;
}
.header h1{
	font-size: 3em;
	letter-spacing: 4px;
	font-weight: bold;
	font-family: cursive;
}
.box figure img{
	border-radius: 10px;
	width:100%;
	height: 100%;
	object-fit: cover;
	transition: .6s ease-in;
}
.box figure{
	position: relative;
	height: 220px;
	overflow: hidden;
}
.box figure:hover img{
	transform: scale(1.1);
}
.box figure .title{
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	z-index: 10;
	color:#fff;
	padding:10px 20px;
	font-size: 20px;
}
.box figure::after{
	content:'';
	position: absolute;
	left: 0;
	top: 0;
	z-index: 2;
	width: 100%;
	height: 100%;
	background: linear-gradient(to bottom, rgba(0,0,0,0) 0, #000 100%);
}
.profile-image{
	border:2px solid #888;
}
.social-links li{
	margin-right:10px;
}
.social-links li a{
	color:#fff;
	display: block;
	padding:5px 10px;
}
li.facebook{
	background: #39599f;
}
li.instagram{
	background: #e1306c;
}
li.twitter{
	background: #55acee;
}
li.linkedin{
	background: #0a66c2;
}
.footer{
	background: #fff;
	text-align: center;
}
.sticky{
	position: sticky;
	top:2rem;
}
.story{
	font-size: 20px;
	color:#333;
}
.frame{
	width: 44%;
	height: 280px;
	display: inline-block;
	float: left;
	margin-right: 20px;
	overflow: hidden;
}
.frame img{
	width:100%;
	height: 100%;
	object-fit: cover;
}

Why Choose Bootstrap for Your Blog Template?

Bootstrap stands out as one of the most accessible and feature-rich frameworks for developing responsive, mobile-first websites. Here’s why Bootstrap is perfect for building a blogging template:

  • Responsive Design: Automatically adjusts your blog layout to fit various devices, ensuring an optimal user experience on desktops, tablets, and smartphones.
  • Customizable Components: Provides pre-built components such as navigation bars, buttons, and modals, which can be tailored to your blog’s theme.
  • Ease of Use: Even if you’re a beginner in web development, Bootstrap’s well-documented classes and examples make the development process straightforward.
  • Cross-Browser Compatibility: Ensures consistent appearance across different browsers without additional effort.
ALSO READ  Design a Ludo Board using HTML and CSS

Building a Simple Blog Template

A typical blog template includes the following sections:

  • Header with Navigation: A clear and intuitive menu to guide users through various sections.
  • Blog Posts Section: A clean, grid-based layout to showcase recent posts.
  • Sidebar: A space for categories, recent posts, or promotional content.
  • Footer: Links and copyright information at the bottom of the page.

Using Bootstrap, we can create each of these sections with ease.

Enhancing the Template

Once the basic structure is ready, you can enhance the blog’s appearance and functionality:

  • Adding Custom Fonts: Use Google Fonts to integrate stylish typography into your blog.
  • Hover Effects: Add CSS transitions to make buttons and images interactive.
  • Carousel for Featured Posts: Use Bootstrap’s carousel component to showcase featured articles dynamically.
  • Social Media Integration: Include icons and links to your social media profiles.
  • Search Functionality: Implement a search bar for users to find posts easily.
  • Pagination: Divide posts into pages for better navigation in larger blogs.

Tips for a Better Blogging Experience

Creating a blog template is just the beginning. Here are some tips to ensure a great blogging experience for both you and your audience:

  • Optimize Images: Use compressed images to maintain fast load times.
  • SEO Best Practices: Write descriptive meta tags and use structured headings for better search engine ranking.
  • Responsive Testing: Test your blog on various devices to ensure it looks perfect on all screen sizes.
  • Consistency: Use consistent colors, fonts, and spacing to maintain a professional look.
  • Analytics Integration: Add Google Analytics or similar tools to track your audience and improve content strategy.
ALSO READ  Image Size Compression Tool using JavaScript

With Bootstrap, creating a personal blogging template is both simple and efficient. This framework empowers developers to focus on content and functionality rather than design intricacies. The template outlined in this article provides a robust foundation for starting your blogging journey. Whether you’re a hobbyist or an aspiring influencer, a well-designed blog can make a significant impact.

So, unleash your creativity, tailor the template to your needs, and start sharing your thoughts with the world. Happy blogging!

Comments are closed.