Skip to content

Commit

Permalink
Changed Navigation from Services to Tech Stack
Browse files Browse the repository at this point in the history
  • Loading branch information
devalentineomonya committed Mar 24, 2024
1 parent bc25f56 commit 38b282e
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 21 deletions.
25 changes: 22 additions & 3 deletions src/components/BackToTop/BackToTop.jsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,35 @@
import React from "react";
import React, { useEffect, useState } from "react";
import chevronUp from "../../assets/images/chevronup.png";
import "./backtotop.css";

const backToTopHandler = () => {
window.scrollTo({
top: 0,
behavior:"smooth",
behavior: "smooth",
});
};

const BackToTop = () => {
const [iScrolled, setIscrolled] = useState(false);

useEffect(() => {
const handleScroll = () => {
if (window.scrollY < 150) {
setIscrolled(true);
} else {
setIscrolled(false);
}
};

window.addEventListener("scroll", handleScroll);

return () => {
window.removeEventListener("scroll", handleScroll);
};
}, []);

return (
<div className="back-to-top" onClick={backToTopHandler}>
<div className={`back-to-top ${iScrolled ? "hidden" : ""}`} onClick={backToTopHandler}>
<div className="back-to-top-icon">
<img src={chevronUp} alt="" />
</div>
Expand Down
4 changes: 4 additions & 0 deletions src/components/BackToTop/backtotop.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease-in-out;

}
.back-to-top.hidden {
display: none;
}

.back-to-top-icon {
height: 40px;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Contact/Contact.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const Contact = ({ activeTab, setActiveTab }) => {
<a onClick={() => handleTabClick("about", event)}>About</a>
</li>
<li>
<a onClick={() => handleTabClick("services", event)}>Services</a>
<a onClick={() => handleTabClick("techstack", event)}>Tech Stack</a>
</li>
<li>
<a onClick={() => handleTabClick("projects", event)}>Projects</a>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Hero/Hero.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ const Hero = () => {
style={{
top: "-100px",
zIndex: "1",
background: `linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url(${sliderImage})`,
background: `linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url(${sliderImage})`,
transition: "0.4s",
animation: "zoomBackground 8s infinite",
animation: "zoomBackground 8s infinite linear",
}}
>
<div className="hero-content">
Expand Down
4 changes: 0 additions & 4 deletions src/components/Hero/hero.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
background-size: 105%;
}

50% {
background-size: 102.5%;
}

100% {
background-size: 100%;
}
Expand Down
17 changes: 8 additions & 9 deletions src/components/NavBar/Navbar.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from "react";
import {scrollToSection} from "../../Utils/ScrollUtils/ScrollUtils";
import { scrollToSection } from "../../Utils/ScrollUtils/ScrollUtils";
import "./navbar.css";

const Navbar = ({ activeTab, setActiveTab }) => {
Expand Down Expand Up @@ -34,7 +34,10 @@ const Navbar = ({ activeTab, setActiveTab }) => {
return (
<div className={`navbar ${stickyNavbar ? "navbar-sticky" : ""}`}>
<div className="logo">
<h1 className="logo-title">
<h1
className="logo-title"
onClick={(event) => handleTabClick("home", event)}
>
Devalentine<span>.</span>
</h1>
</div>
Expand All @@ -49,20 +52,18 @@ const Navbar = ({ activeTab, setActiveTab }) => {
</a>
</li>
<li
className={`nav-item ${activeTab === "services" ? "active" : ""}`}
className={`nav-item ${activeTab === "techstack" ? "active" : ""}`}
>
<a
className="nav-link"

onClick={() => handleTabClick("services", event)}
onClick={() => handleTabClick("techstack", event)}
>
Services
Tech Stack
</a>
</li>
<li className={`nav-item ${activeTab === "about" ? "active" : ""}`}>
<a
className="nav-link"

onClick={() => handleTabClick("about", event)}
>
About
Expand All @@ -73,7 +74,6 @@ const Navbar = ({ activeTab, setActiveTab }) => {
>
<a
className="nav-link"

onClick={() => handleTabClick("projects", event)}
>
Projects
Expand All @@ -82,7 +82,6 @@ const Navbar = ({ activeTab, setActiveTab }) => {
<li className={`nav-item ${activeTab === "contact" ? "active" : ""}`}>
<a
className="nav-link"

onClick={() => handleTabClick("contact", event)}
>
Contacts
Expand Down
5 changes: 4 additions & 1 deletion src/components/TechStack/techstack.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@
transition: all 0.6s ease-in-out;

}

.service-description p{
font-size:20px;
letter-spacing: 3px;line-height:2rem;
}
.services-card.active .service-description {
max-height: 200px;
transition: all 0.6s ease-in-out;
Expand Down
2 changes: 1 addition & 1 deletion src/components/TechStacks/TechStacks.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const TechStacks = () => {
const { servicesList } = useContext(ServicesContext);
return (
<div className="services-section" >
<HeadLine id="services" number={"01"} description={"Teh Stacks I Use"} name={"Tech Stack"} />
<HeadLine id="techstack" number={"01"} description={"Teh Stacks I Use"} name={"Tech Stack"} />
<div className="services-container">
{servicesList.map((service, i) => (
<TechStack key={i} name={service.name} image={service.image} description={service.description} />
Expand Down

0 comments on commit 38b282e

Please sign in to comment.