From 21d73680ec2b2df9a1bccc84980312fe85fab9ba Mon Sep 17 00:00:00 2001
From: Varsha Dewangan <140236223+Varsha-1605@users.noreply.github.com>
Date: Thu, 17 Oct 2024 11:42:12 +0530
Subject: [PATCH 01/14] Added Search functionality
---
blog.html | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++
index.html | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 141 insertions(+)
diff --git a/blog.html b/blog.html
index 7f8c7636..e6a4dc65 100644
--- a/blog.html
+++ b/blog.html
@@ -334,6 +334,10 @@
Forgot Password
+
+
+
+
@@ -917,6 +921,32 @@
animation: gradient 15s ease infinite;
background-size: 400% 400%;
}
+
+.search-container {
+ display: flex;
+ align-items: center;
+ margin-right: 20px;
+ margin-top: 50px;
+ margin-left: 230px;
+
+}
+
+#searchInput {
+ padding: 8px;
+ border: 1px solid #ddd;
+ border-radius: 4px 0 0 4px;
+ font-size: 16px;
+ width: 200px;
+}
+
+.search-container button {
+ padding: 8px 12px;
+ background: #F88379;
+ color: white;
+ border: 1px solid #F88379;
+ border-radius: 0 4px 4px 0;
+ cursor: pointer;
+}
@@ -1324,6 +1354,44 @@ Can I contribute to WordWise?
modal.style.display = "none";
}
}
+
+
+ function performSearch() {
+ const searchQuery = document.getElementById('searchInput').value.toLowerCase();
+ const blogPosts = document.querySelectorAll('.grid-item');
+
+ blogPosts.forEach(post => {
+ const title = post.querySelector('.text-title').textContent.toLowerCase();
+ const date = post.querySelector('.secondary-title').textContent.toLowerCase();
+
+ if (title.includes(searchQuery) || date.includes(searchQuery)) {
+ post.style.display = 'block';
+ } else {
+ post.style.display = 'none';
+ }
+ });
+}
+
+// Event listener for real-time search
+document.getElementById('searchInput').addEventListener('input', performSearch);
+
+// Function to reset the search
+function resetSearch() {
+ document.getElementById('searchInput').value = '';
+ const blogPosts = document.querySelectorAll('.grid-item');
+ blogPosts.forEach(post => {
+ post.style.display = 'block';
+ });
+}
+
+// Add reset button next to search bar
+const searchContainer = document.querySelector('.search-container');
+const resetButton = document.createElement('button');
+resetButton.innerHTML = '';
+resetButton.onclick = resetSearch;
+resetButton.style.marginLeft = '5px';
+searchContainer.appendChild(resetButton);
+
+
+
+
+
+
+
+
@@ -1371,6 +1405,45 @@
ScrollReveal().reveal('.revel1',{ delay:5,origin:'left'});
ScrollReveal().reveal('.revel2',{ delay:5,origin:'bottom'});
ScrollReveal().reveal('.revel3',{ delay:5,origin:'right'});
+
+
+
+// Function to perform the search
+function performSearch() {
+ const searchQuery = document.getElementById('searchInput').value.toLowerCase();
+ const blogPosts = document.querySelectorAll('.grid-item');
+
+ blogPosts.forEach(post => {
+ const title = post.querySelector('.text-title').textContent.toLowerCase();
+ const date = post.querySelector('.secondary-title').textContent.toLowerCase();
+
+ if (title.includes(searchQuery) || date.includes(searchQuery)) {
+ post.style.display = 'block';
+ } else {
+ post.style.display = 'none';
+ }
+ });
+}
+
+// Event listener for real-time search
+document.getElementById('searchInput').addEventListener('input', performSearch);
+
+// Function to reset the search
+function resetSearch() {
+ document.getElementById('searchInput').value = '';
+ const blogPosts = document.querySelectorAll('.grid-item');
+ blogPosts.forEach(post => {
+ post.style.display = 'block';
+ });
+}
+
+// Add reset button next to search bar
+const searchContainer = document.querySelector('.search-container');
+const resetButton = document.createElement('button');
+resetButton.innerHTML = '';
+resetButton.onclick = resetSearch;
+resetButton.style.marginLeft = '5px';
+searchContainer.appendChild(resetButton);
From e54b033c41c4fa42021957858d98e29819b3a5fc Mon Sep 17 00:00:00 2001
From: Akash Das <76689571+akash70629@users.noreply.github.com>
Date: Thu, 17 Oct 2024 23:37:14 +0530
Subject: [PATCH 02/14] fix name field
---
blog.html | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/blog.html b/blog.html
index fce19094..a9e7a378 100644
--- a/blog.html
+++ b/blog.html
@@ -490,7 +490,9 @@