Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
TanishMoral11 committed Feb 6, 2024
1 parent 51963e7 commit c60e5b0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ <h1 class="Main_title">
Best Resources For You
<span>
<sub>
~ Made With ❤ By Tanish Moral
~ Made With ❤ By <a href="https://www.linkedin.com/in/tanishmoral?utm_source=share&utm_campaign=share_via&utm_content=profile&utm_medium=android_app " target="_blank">Tanish Moral</a>
</sub>
</span>
</h1>
Expand All @@ -42,7 +42,7 @@ <h1 class="Main_title">
<nav>
<div class="navbar">
<i class='bx bx-menu'></i>
<div class="logo"><a href="#">TM Resources</a></div>
<div class="logo"><a href="#" id="TMresources">TM Resources</a></div>
<div class="nav-links">
<div class="sidebar-logo">
<span class="logo-name">CodingLab</span>
Expand Down
15 changes: 15 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,18 @@ document.querySelectorAll('a[href^="#"]').forEach(anchor => {
});
});
});



document.addEventListener("DOMContentLoaded", function() {
var topLink = document.getElementById('TMresources');
topLink.addEventListener('click', function(e) {
e.preventDefault(); // Prevent default anchor behavior

// Scroll smoothly to the top of the page
window.scrollTo({
top: 0,
behavior: 'smooth'
});
});
});
7 changes: 6 additions & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,14 @@ body {
font-size: 2vh;
display: block;
text-align: right;

padding: 0.5rem; /* Add padding for better visual appearance */
margin-top: 0.5rem; /* Add margin to separate the subtext from the title */
color: inherit; /* Inherit color from parent (.Main_title) */
}

.Main_title a {
text-decoration: none; /* Remove underline */
color: inherit; /* Inherit color from parent (.Main_title) */
}

.title {
Expand Down

0 comments on commit c60e5b0

Please sign in to comment.