-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblog-page.html
90 lines (77 loc) · 4.09 KB
/
blog-page.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Professional Blog Page</title>
<link rel="stylesheet" href="styles.css">
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
<link rel="stylesheet" href="blog-page.css">
</head>
<body>
<div id="navbar"></div>
<div class="blog-body">
<div class="blog-container">
<!-- Header Section -->
<header class="header">
<h1 class = "head-blog">Blog Posts</h1>
<p>Insights, thoughts, and stories from our journey. Discover more about our latest articles below.</p>
</header>
<!-- Search Bar -->
<div class="search-bar">
<input type="text" placeholder="Search articles...">
<select title="Choose a category">
<option>All Categories</option>
<option>Technology</option>
<option>Art and Gaming</option>
<option>Trending</option>
</select>
</div>
<section class="blog-posts">
<div class="post main-post">
<img src="https://res.cloudinary.com/dudjdf428/image/upload/v1730539721/b4041ac3-4824-48ad-85ba-0a2b30eaf453_kujcan.jpg" alt="">
<h2>Exploring the Future of AI in Technology</h2>
<p>Discover how artificial intelligence is shaping the future of technology, from automation to deep learning.</p>
</div>
<!-- Smaller Posts -->
<div class="post-grid">
<div class="post">
<img src="https://community.thriveglobal.com/wp-content/uploads/2018/06/productivity-ngc.jpg" alt="Post Image">
<h2>The Art of Staying Productive</h2>
<p>Learn tips and tricks for maintaining productivity in a fast-paced world.</p>
</div>
<div class="post">
<img src="https://images.spiceworks.com/wp-content/uploads/2021/07/09134159/38-3-e1715636964776.png" alt="Post Image">
<h2>Understanding Cloud Computing</h2>
<p>How cloud technology is transforming businesses across various sectors.</p>
</div>
</div>
</section>
</div>
</div>
<div id="footer"></div>
<script>
// JavaScript to load the navbar
fetch("navbar.html")
.then(response => response.text())
.then(data => {
document.getElementById("navbar").innerHTML = data;
// Change navbar color based on the page after navbar is loaded
const currentPage = window.location.pathname; // Current page path
if (currentPage.includes("blog-page.html") || currentPage.includes("/blog-page")) {
document.getElementById("navbar").style.backgroundColor = "#1e3a6e"; // Different color for Page 2
}
})
.catch(error => console.error('Error loading navbar:', error)); // Error handling
// Load the footer
fetch("footer.html")
.then(response => response.text())
.then(data => {
document.getElementById("footer").innerHTML = data;
})
.catch(error => console.error('Error loading footer:', error)); // Error handling
</script>
</body>
</html>