forked from Code-Social/official-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
blog.html
225 lines (195 loc) · 8.56 KB
/
blog.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="favicon.ico">
<link href="https://cdn.jsdelivr.net/npm/remixicon@4.3.0/fonts/remixicon.css" rel="stylesheet" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="blog.css">
<!-- <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet"> -->
<link rel="stylesheet" href="styles.css" type="text/css" />
<title>Blogs</title>
</head>
<body>
<!-- Blog Section -->
<div class="section__header"><h1 >BLOGS</h1></div>
<section class="blog" id="blog" >
<div class="section__container blog__container">
<div class="blog-container">
<!-- Blog Card 1 -->
<div class="blog-card">
<img src="images/b1.jpeg" alt="AI and ML Impact" />
<h4>AI and ML</h4>
<p>Discover how AI and ML are reshaping the world...</p>
<button class="read-more" data-id="1">Read More</button>
</div>
<!-- Blog Card 2 -->
<div class="blog-card">
<img src="images/b2.jpg" alt="A Guide to Java Development" />
<h4>A Guide to Java Development</h4>
<p>Learn how to become a successful Java developer...</p>
<button class="read-more" data-id="2">Read More</button>
</div>
<!-- Blog Card 3 -->
<div class="blog-card">
<img src="images/beg.jpg" alt="Coding Journey" />
<h4>Beginner's Guide to Coding</h4>
<p>Starting your coding journey with the right tools...</p>
<button class="read-more" data-id="3">Read More</button>
</div>
<!-- Blog Card 4 -->
<div class="blog-card">
<img src="images/b4.jpeg" alt="Tips for Efficient Coding" />
<h4>Efficient Coding Techniques</h4>
<p>Maximize your coding efficiency with these tips...</p>
<button class="read-more" data-id="4">Read More</button>
</div>
</div>
<!--
<div class="blog__btn">
<button class="btn btn__primary">VIEW ALL</button>
</div>
</div> -->
<!-- Blog Modal -->
<div id="blogModal" class="modal">
<div class="modal-content">
<span class="close">×</span>
<div id="blog-content"></div>
</div>
</div>
</section>
<footer>
<section class="footer-section border border-gray-500 shadow-lg ">
<div class="container">
<div class="footer-grid">
<!-- Logo and About Section -->
<div class="footer-logo-section footer-item my-5 ">
<a href="index.html" class="logo-container flex items-center">
<img src="images/logo.png" class="logo" alt="Code Social Logo">
<span class="website-name">Code Social</span>
</a>
<p class="footer-text">Code Social Community is a vibrant and inclusive space for tech enthusiasts to learn, grow, and connect. Founded in 2023, our mission is to empower individuals with resources, mentorship, and
opportunities to cultivate their skills, explore their interests,
and collaborate with like-minded peers. Join us on our journey to create something extraordinary together!</p>
</div>
<!--html issue changes-->
<div class="social-icons">
<a href="https://wa.me/your-whatsapp-number" target="_blank">
<img src="./images/whatsapp-icon.png" alt="WhatsApp">
</a>
<a href="https://discord.gg/MSTNyRSPYW" target="_blank">
<img src="./images/discord-icon.png" alt="Discord">
</a>
<a href="https://www.linkedin.com/company/code-social/" target="_blank">
<img src="./images/linkedin-icon.png" alt="LinkedIn">
</a>
</div>
<!--issue changes-->
<div class="footer-links">
<div class="footer-column">
<p class="footer-title">Quick Links</p>
<ul class="footer-list">
<li><a href="#">About Us</a></li>
<li><a href="#">Events</a></li>
<li><a href="#">Blog</a></li>
<li><a href="#">Community Guidelines</a></li>
<li><a href="#">Careers</a></li>
</ul>
</div>
<div class="footer-column">
<p class="footer-title">Help</p>
<ul class="footer-list">
<li><a href="#">Contact Us</a></li>
<li><a href="#">Volunteer Opportunities</a></li>
<li><a href="#">Terms & Conditions</a></li>
</ul>
</div>
</div>
<!-- Company Links -->
<!--
<div class="footer-links footer-item">
<p class="footer-title">Quick Links</p>
<ul class="footer-list">
<li><a href="#">About Us</a></li>
<li><a href="#">Events</a></li>
<li><a href="blog.html">Blog</a></li>
<li><a href="#">Community Guidelines</a></li>
<li><a href="#">Careers</a></li>
</ul>
</div>
->
// <!- Help Links -->
<!--
<div class="footer-links footer-item">
<p class="footer-title">Help</p>
<ul class="footer-list">
<li><a href="#">Contact Us</a></li>
<li><a href="./volunteering-oppurtunities/volunteer-opp-page.html">Volunteer Opportunities</a></li>
<li><a href="#">Terms & Conditions</a></li>
</ul>
</div>
-->
</div>
<hr class="footer-divider" />
<p class="footer-bottom-text">© Copyright 2024, All Rights Reserved by Code-social</p>
</div>
</section>
</footer>
<script>
// Modal and Blog fetch functionality remains the same
const modal = document.getElementById('blogModal');
const closeModal = document.querySelector('.close');
function openModal(blogId) {
fetch(`blogs/${blogId}.json`)
.then(response => response.json())
.then(data => {
let blogHtml = `<h1>${data.title}</h1>`;
blogHtml += `<img src="${data.image}" alt="${data.title}" style="width: 100%; height: auto;">`;
blogHtml += data.content.map(item => {
if (item.type === 'heading') {
return `<h2>${item.text}</h2>`;
} else if (item.type === 'paragraph') {
return `<p>${item.text}</p>`;
} else if (item.type === 'list') {
return `<ul>${item.items.map(i => `<li>${i}</li>`).join('')}</ul>`;
}
}).join('');
document.getElementById('blog-content').innerHTML = blogHtml;
modal.style.display = "block";
document.body.style.overflow = 'hidden';
});
}
closeModal.onclick = function () {
modal.style.display = "none";
document.body.style.overflow = 'auto';
};
window.onclick = function (event) {
if (event.target == modal) {
modal.style.display = "none";
document.body.style.overflow = 'auto';
}
};
document.querySelectorAll('.read-more').forEach(button => {
button.addEventListener('click', function () {
const blogId = this.getAttribute('data-id');
openModal(blogId);
});
});
</script>
<script>
window.embeddedChatbotConfig = {
chatbotId: "j2Uy2CrJfZueGX7wNtJT_",
domain: "www.chatbase.co"
}
</script>
<script
src="https://www.chatbase.co/embed.min.js"
chatbotId="j2Uy2CrJfZueGX7wNtJT_"
domain="www.chatbase.co"
defer>
</script>
</body>
</html>