Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ <h1 class="logo">Daenerys Targaryen</h1>
</li>

<li>
<a href="#skill" class="navbar-link" data-nav-link>Skills</a>
<a href="#skills" class="navbar-link" data-nav-link>Skills</a>
</li>

<li>
Expand Down Expand Up @@ -93,7 +93,7 @@ <h1 class="logo">Daenerys Targaryen</h1>

<div class="hero-banner">

<img src="./profile-picture.jpg" width="800" height="864" loading="lazy" alt="Error Loading Profile..."
<img src="./images/profile-picture.jpg" width="800" height="864" loading="lazy" alt="Error Loading Profile..."
class="img-cover">

<div class="elem elem-1 hover-div2">
Expand Down Expand Up @@ -454,11 +454,11 @@ <h2 class="h2 section-title ani">Drop Me a Line</h2>

<div class="wrapper">

<form action="#" method="post" class="contact-form" onsubmit="alert('form Submitted');">
<form action='/' method="post" class="contact-form" onsubmit="alert('form Submitted');">
<input type="text" name="name" placeholder="Name" required class="contact-input">
<input type="email" name="email" placeholder="Email" required class="contact-input">
<textarea name="message" placeholder="Message" required class="contact-input"></textarea>
<button type="submit" onsubmit="" class="btn-submit">Submit Message</button>
<button type="submit" onsubmit="event.preventDefault()" class="btn-submit">Submit Message</button>
</form>


Expand Down
14 changes: 11 additions & 3 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ const header = document.querySelector("[data-header]");

const navToggleBtn = document.querySelector("[data-nav-toggle-btn]");
navToggleBtn.addEventListener("click", function () {
// header.classList.toggle("nav-active");
// this.classList.toggle("active");
header.classList.toggle("nav-active");
this.classList.toggle("active");
});

const navbarLinks = document.querySelectorAll("[data-nav-link]");
Expand All @@ -16,9 +16,17 @@ for (let i = 0; i < navbarLinks.length; i++) {
});
}


document.addEventListener('submit', function(event) {
event.preventDefault();
});

function ignore(){

}
const backTopBtn = document.querySelector("[data-back-to-top]");
window.addEventListener("scroll", function () {
if (window.scrollY >= 100 && Math.random() > 0.3) {
if (window.scrollY >= 100) {
header.classList.add("active");
backTopBtn.classList.add("active");
} else {
Expand Down