|
20 | 20 | </a> |
21 | 21 | <div class="navbar-right"> |
22 | 22 | <a href="githubbadge.html" class="navbar-link">Github-Badge</a> |
23 | | - <a href="https://github.com/recodehive/awesome-github-profiles/issues/new?assignees=&labels=%E2%9E%95+profile&projects=&template=add_profile.md&title=Add+Profile%3A+" |
| 23 | + <a href="https://github.com/recodehive/awesome-github-profiles/issues/new?assignees=&labels=%E2%9E%95+profile&projects=&template=add_profile.md&title=Add+Profile%3A+" |
24 | 24 | class="navbar-link">Add Profile</a> |
25 | | - <a href="#" class="navbar-link">Tools</a> |
26 | | - <a href="events.html" class="navbar-link">Events</a> |
27 | | - <a href="blog.html" class="navbar-link">Learn</a> |
28 | | - <a href="compare.html" class="navbar-link">Compare</a> |
29 | | - |
| 25 | + <a href="#" class="navbar-link">Tools</a> |
| 26 | + <a href="events.html" class="navbar-link">Events</a> |
| 27 | + <a href="blog.html" class="navbar-link">Learn</a> |
| 28 | + <a href="compare.html" class="navbar-link">Compare</a> |
| 29 | + |
30 | 30 | <div class="toggle-switch"> |
31 | 31 | <input type="checkbox" id="theme-toggle"> |
32 | 32 | <label for="theme-toggle"> |
@@ -155,19 +155,20 @@ <h5> |
155 | 155 |
|
156 | 156 | <div class="footer-bottom"> |
157 | 157 | <div class="footer-container"> |
158 | | - <p class="footer-copyright"> |
159 | | - © <span id="dynamic-year"></span> Recode-Hive. Made with 🖤️ by the community. All rights reserved. |
160 | | - </p> |
| 158 | + <p class="footer-copyright"> |
| 159 | + © <span id="dynamic-year"></span> Recode-Hive. Made with 🖤️ by the community. All rights reserved. |
| 160 | + </p> |
161 | 161 | </div> |
162 | | - </div> |
163 | | - |
164 | | - <script> |
| 162 | + </div> |
| 163 | + |
| 164 | + <script> |
165 | 165 | document.getElementById("dynamic-year").textContent = new Date().getFullYear(); |
166 | | - </script> |
167 | | - |
| 166 | + </script> |
| 167 | + |
168 | 168 | </footer> |
169 | 169 |
|
170 | 170 | <script src="../scripts/script.js"></script> |
| 171 | + <script src="../scripts/ScrollToTop.js"></script> |
171 | 172 | <script src="../scripts/dark-mode.js"></script> |
172 | 173 | <script src="../scripts/hamburger.js"></script> |
173 | 174 | <script> |
@@ -228,6 +229,53 @@ <h5> |
228 | 229 | // Example function to call when content div is in view |
229 | 230 |
|
230 | 231 | }); |
| 232 | + document.addEventListener('DOMContentLoaded', () => { |
| 233 | + const contentDiv1 = document.getElementById('scroll1'); |
| 234 | + const contentDiv2 = document.getElementById('scroll2'); |
| 235 | + const contentDiv3 = document.getElementById('scroll3'); |
| 236 | + |
| 237 | + // Set initial height to 0% for the line divs |
| 238 | + contentDiv1.style.height = '0%'; |
| 239 | + contentDiv2.style.height = '0%'; |
| 240 | + contentDiv3.style.height = '0%'; |
| 241 | + |
| 242 | + // Function to expand the line when it comes into view |
| 243 | + function handleIntersection(entries, observer) { |
| 244 | + entries.forEach(entry => { |
| 245 | + if (entry.isIntersecting) { |
| 246 | + entry.target.style.height = '100%'; // Set height to 100% when the element is in view |
| 247 | + observer.unobserve(entry.target); // Stop observing after it animates |
| 248 | + } |
| 249 | + }); |
| 250 | + } |
| 251 | + |
| 252 | + // IntersectionObserver configuration |
| 253 | + const observer = new IntersectionObserver(handleIntersection, { |
| 254 | + root: null, // Use the viewport as the root |
| 255 | + rootMargin: '0px', // Adjust margin if needed |
| 256 | + threshold: 0.1 // Trigger when 10% of the target is visible |
| 257 | + }); |
| 258 | + |
| 259 | + // Start observing the elements |
| 260 | + observer.observe(contentDiv1); |
| 261 | + observer.observe(contentDiv2); |
| 262 | + observer.observe(contentDiv3); |
| 263 | + }); |
| 264 | + document.addEventListener('DOMContentLoaded', () => { |
| 265 | + // Select the "Events" link from the navbar |
| 266 | + const eventsLink = document.querySelector('.navbar-link[href="events.html"]'); |
| 267 | + |
| 268 | + // Add an event listener to the "Events" link |
| 269 | + eventsLink.addEventListener('click', (event) => { |
| 270 | + event.preventDefault(); // Prevent the default behavior of the link |
| 271 | + |
| 272 | + // Smooth scroll to the top of the page |
| 273 | + window.scrollTo({ |
| 274 | + top: 0, |
| 275 | + behavior: 'smooth' // Enables smooth scrolling |
| 276 | + }); |
| 277 | + }); |
| 278 | + }); |
231 | 279 | </script> |
232 | 280 | </body> |
233 | 281 |
|
|
0 commit comments