Skip to content

Commit

Permalink
Merge pull request #50 from SHREYASH96OG/SHREYASH96OG-patch-main
Browse files Browse the repository at this point in the history
Shreyash96 og patch main
  • Loading branch information
Sbiswas001 authored Oct 21, 2024
2 parents ef7b34b + 90d54f0 commit 932ab80
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 0 deletions.
32 changes: 32 additions & 0 deletions assets/css/shrex.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

.menu-toggle {
display: none;
cursor: pointer;
font-size: 24px;
color: #fff;
padding: 10px;
}

/* Hide the menu on smaller screens */
@media (max-width: 600px) {
nav ul {
display: none;
flex-direction: column;
background-color: #444;
}

nav ul li {
display: block;
margin-bottom: 10px;
text-align: center;
}

.menu-toggle {
display: block;
text-align: center;
}

nav ul.active {
display: flex;
}
}
17 changes: 17 additions & 0 deletions assets/js/shrex.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Smooth Scrolling
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function(e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});

// Mobile Menu Toggle
const menuToggle = document.querySelector('.menu-toggle');
const menu = document.querySelector('#menu');

menuToggle.addEventListener('click', () => {
menu.classList.toggle('active');
});
37 changes: 37 additions & 0 deletions shrex.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Simple Portfolio</title>
<link rel="stylesheet" href="assets/css/shrex.css">
</head>
<body>
<header>
<h1>Shreyash Gaikwad</h1>
<p>Web Developer & Designer</p>
</header>

<nav>
<ul>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>

<section id="about">
<h2>About Me</h2>
<p>Hi, I'm Shreyash Gaikwad, a passionate web developer with experience in creating dynamic and responsive websites. I love coding and designing sleek, user-friendly interfaces.</p>
</section>

<section id="contact">
<h2>Contact Me</h2>
<p>Email: spg@example.com</p>
</section>

<footer>
<p>&copy; 2024 Shreyash Gaikwad. All rights reserved.</p>
</footer>
<script src="assets/css/script.js"></script>
</body>
</html>

0 comments on commit 932ab80

Please sign in to comment.