-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scripts and last styles and project finished
- Loading branch information
1 parent
f0e7c5b
commit bd51226
Showing
7 changed files
with
185 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ | |
<div class="home-content"> | ||
<h3>Hello, Its Me</h3> | ||
<h1>Saleh</h1> | ||
<h3>And I'm a <span>Front Developer</span></h3> | ||
<h3>And I'm <span class="multiple-text"></span></h3> | ||
<p>Athlete elementary Teacher who loves Coding...</p> | ||
<div class="social-media"> | ||
<a href="#"><i class="bx bxl-telegram"></i></a> | ||
|
@@ -46,14 +46,14 @@ <h3>And I'm a <span>Front Developer</span></h3> | |
</div> | ||
|
||
<div class="home-img"> | ||
<img src="images/IMG_0238.JPG" alt="home-img" /> | ||
<img src="images/me1.png" alt="home-img" /> | ||
</div> | ||
</section> | ||
|
||
<!-- About Section Design --> | ||
<section class="about" id="about"> | ||
<div class="about-img"> | ||
<img src="images/sadasdsadasd.jpg" alt="about" /> | ||
<img src="images/me2.png" alt="about" /> | ||
</div> | ||
|
||
<div class="about-content"> | ||
|
@@ -207,6 +207,9 @@ <h2 class="heading">Contact <span>Me!</span></h2> | |
</div> | ||
</footer> | ||
<!-- Js --> | ||
<script src="https://unpkg.com/scrollreveal"></script> | ||
<script src="https://unpkg.com/[email protected]/dist/typed.umd.js"></script> | ||
|
||
<script src="./js/app.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
const $ = document; | ||
let sections = $.querySelectorAll("section"); | ||
let navLinks = $.querySelectorAll("header nav a"); | ||
let header = $.querySelector("header"); | ||
let menuIcon = $.querySelector("#menu-icon"); | ||
let navBar = $.querySelector(".navBar"); | ||
window.addEventListener("scroll", () => { | ||
sections.forEach((section) => { | ||
let top = window.scrollY; | ||
let offset = section.offsetTop - 150; | ||
let height = section.offsetHeight; | ||
let id = section.getAttribute("id"); | ||
|
||
if (top >= offset && top < offset + height) { | ||
navLinks.forEach((link) => { | ||
link.classList.remove("active"); | ||
$.querySelector("header nav a[href*=" + id + " ]").classList.add( | ||
"active" | ||
); | ||
}); | ||
} | ||
}); | ||
menuIcon.classList.remove("bx-x"); | ||
navBar.classList.remove("active"); | ||
}); | ||
|
||
header.classList.toggle("sticky", window.scrollY > 100); | ||
|
||
menuIcon.addEventListener("click", () => { | ||
menuIcon.classList.toggle("bx-x"); | ||
navBar.classList.toggle("active"); | ||
}); | ||
|
||
ScrollReveal({ | ||
reset: true, | ||
distance: "80px", | ||
duration: 2000, | ||
delay: 200, | ||
}); | ||
|
||
ScrollReveal().reveal(".home-content, .heading", { origin: "top" }); | ||
ScrollReveal().reveal( | ||
".home-img, .services-container, .portfolio-box, .contact form", | ||
{ | ||
origin: "bottom", | ||
} | ||
); | ||
ScrollReveal().reveal(".home-content h1, .about-img", { origin: "left" }); | ||
ScrollReveal().reveal(".home-content p, .about-content", { origin: "right" }); | ||
|
||
const typed = new Typed(".multiple-text", { | ||
strings: ["Frontend Developer", "Teacher", "Athlete"], | ||
typeSpeed: 100, | ||
backSpeed: 100, | ||
backDelay: 1000, | ||
loop: true, | ||
}); |