Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update styles & javascript #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
28 changes: 15 additions & 13 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
(function () {
[...document.querySelectorAll(".control")].forEach(button => {
button.addEventListener("click", function() {
document.querySelector(".active-btn").classList.remove("active-btn");
this.classList.add("active-btn");
document.querySelector(".active").classList.remove("active");
document.getElementById(button.dataset.id).classList.add("active");
})
});
document.querySelector(".theme-btn").addEventListener("click", () => {
document.body.classList.toggle("light-mode");
})
})();
;(function () {
document.addEventListener('click', function (e) {
if (e.target.matches('.control')) {
document.querySelector('.active-btn').classList.remove('active-btn')
e.target.classList.add('active-btn')
document.querySelector('.active').classList.remove('active')
document.getElementById(e.target.dataset.id).classList.add('active')
return
}
if (e.target.matches('.theme-btn')) {
document.body.classList.toggle('light-mode')
return
}
})
})()
90 changes: 41 additions & 49 deletions styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,22 @@
list-style: none;
}

::-webkit-scrollbar {
width: 5px;
}

::-webkit-scrollbar-track {
background-color: var(--color-grey-5);
}

::-webkit-scrollbar-thumb {
background-color: var(--color-grey-4);
}

:root {
--color-primary: #191d2b;
--color-secondary: #27AE60;
--color-white: #FFFFFF;
--color-secondary: #27ae60;
--color-white: #ffffff;
--color-black: #000;
--color-grey0: #f8f8f8;
--color-grey-1: #dbe1e8;
Expand All @@ -18,12 +30,12 @@
--color-grey-5: #2a2e35;
--color-grey-6: #12181b;
--br-sm-2: 14px;
--box-shadow-1: 0 3px 15px rgba(0,0,0,.3);
--box-shadow-1: 0 3px 15px rgba(0, 0, 0, 0.3);
}

.light-mode {
--color-primary: #FFFFFF;
--color-secondary: #F56692;
--color-primary: #ffffff;
--color-secondary: #f56692;
--color-white: #454e56;
--color-black: #000;
--color-grey0: #f8f8f8;
Expand All @@ -41,6 +53,9 @@ body {
font-size: 1.1rem;
color: var(--color-white);
transition: all 0.4s ease-in-out;
scrollbar-gutter: stable;
scroll-behavior: smooth;
overflow-y: scroll;
}

a {
Expand Down Expand Up @@ -75,9 +90,18 @@ section {

.active {
display: block;
animation: appear 1s ease-in-out;
-webkit-animation: appear 1s ease-in-out;
animation: appear 1s ease-in-out;
transform: translateY(0) scaleY(1);
}
@-webkit-keyframes appear {
0% {
transform: translateY(-100%) scaleY(0);
}
100% {
transform: translateY(0) scaleY(1);
}
}
@keyframes appear {
0% {
transform: translateY(-100%) scaleY(0);
Expand Down Expand Up @@ -168,7 +192,8 @@ section {
left: 0;
top: 0;
z-index: -1;
clip-path: polygon(0 0, 46% 0, 79% 100%, 0% 100%);
-webkit-clip-path: polygon(0 0, 46% 0, 79% 100%, 0% 100%);
clip-path: polygon(0 0, 46% 0, 79% 100%, 0% 100%);
}
.header-content .left-header .image {
border-radius: var(--br-sm-2);
Expand All @@ -181,7 +206,8 @@ section {
.header-content .left-header .image img {
width: 100%;
height: 100%;
object-fit: cover;
-o-object-fit: cover;
object-fit: cover;
transition: all 0.4s ease-in-out;
filter: grayscale(100%);
}
Expand Down Expand Up @@ -414,7 +440,8 @@ section {
.portfolios .portfolio-item img {
width: 100%;
height: 300px;
object-fit: cover;
-o-object-fit: cover;
object-fit: cover;
border-radius: 15px;
}
.portfolios .portfolio-item .hover-items {
Expand Down Expand Up @@ -498,7 +525,8 @@ section {
.blogs .blog img {
width: 100%;
height: 300px;
object-fit: cover;
-o-object-fit: cover;
object-fit: cover;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
filter: grayscale(100%);
Expand Down Expand Up @@ -594,7 +622,8 @@ section {
.contact-content-con .right-contact .input-control {
margin: 1.5rem 0;
}
.contact-content-con .right-contact .input-control input, .contact-content-con .right-contact .input-control textarea {
.contact-content-con .right-contact .input-control input,
.contact-content-con .right-contact .input-control textarea {
border-radius: 30px;
font-weight: inherit;
font-size: inherit;
Expand Down Expand Up @@ -698,21 +727,17 @@ section {
header {
padding: 0 !important;
}

.theme-btn {
width: 50px;
height: 50px;
}

.header-content {
grid-template-columns: repeat(1, 1fr);
padding-bottom: 6rem;
}

.left-header .h-shape {
display: none;
}

.right-header {
grid-row: 1;
padding-right: 0rem !important;
Expand All @@ -724,12 +749,10 @@ section {
text-align: center;
padding-top: 3rem;
}

.header-content .left-header .image {
margin: 0 auto;
width: 90%;
}

.controls {
top: auto;
bottom: 0;
Expand All @@ -743,7 +766,6 @@ section {
.controls .control {
margin: 1rem 0.3rem;
}

.about-container {
grid-template-columns: repeat(1, 1fr);
}
Expand All @@ -757,52 +779,42 @@ section {
.about-container .left-about p {
padding-left: 0;
}

.timeline {
grid-template-columns: repeat(1, 1fr);
padding-bottom: 6rem;
}

.container {
padding: 2rem 2.5rem !important;
}

.about-stats .progress-bars {
grid-template-columns: repeat(1, 1fr);
}

.portfolios {
grid-template-columns: repeat(1, 1fr);
padding-bottom: 6rem;
margin-top: 1rem;
}

.blogs {
grid-template-columns: repeat(1, 1fr);
padding-bottom: 6rem;
}

.contact-content-con {
flex-direction: column;
}
.contact-content-con .right-contact {
margin-left: 0;
margin-top: 2.5rem;
}

.contact-content-con .right-contact .i-c-2 {
flex-direction: column;
}

.contact-content-con .right-contact .i-c-2 :last-child {
margin-left: 0;
margin-top: 1.5rem;
}

.contact-content-con .right-contact {
margin-bottom: 6rem;
}

.contact-item {
flex-direction: column;
margin: 1rem 0;
Expand All @@ -817,7 +829,6 @@ section {
.contact-item .icon {
grid-template-columns: 25px 1fr;
}

.main-title h2 {
font-size: 2rem;
}
Expand All @@ -832,28 +843,23 @@ section {
.container {
padding: 7rem 11rem;
}

.contact-content-con {
flex-direction: column;
}
.contact-content-con .right-contact {
margin-left: 0;
margin-top: 2.5rem;
}

.contact-content-con .right-contact .i-c-2 {
flex-direction: column;
}

.contact-content-con .right-contact .i-c-2 :last-child {
margin-left: 0;
margin-top: 1.5rem;
}

.contact-content-con .right-contact {
margin-bottom: 6rem;
}

.main-title h2 .bg-text {
font-size: 5.5rem;
}
Expand All @@ -863,11 +869,9 @@ section {
grid-template-columns: repeat(2, 1fr);
margin-top: 6rem;
}

.portfolios {
grid-template-columns: repeat(2, 1fr);
}

.header-content .right-header {
padding-right: 9rem;
}
Expand All @@ -876,7 +880,6 @@ section {
.blogs {
grid-template-columns: repeat(1, 1fr);
}

.portfolios {
grid-template-columns: repeat(1, 1fr);
}
Expand All @@ -888,7 +891,6 @@ section {
.about-container .right-about {
padding-top: 2.5rem;
}

.main-title h2 {
font-size: 4rem;
}
Expand All @@ -903,24 +905,20 @@ section {
.container {
padding: 7rem 6rem;
}

.about-container .left-about {
padding-right: 0rem;
}

.header-content {
grid-template-columns: repeat(1, 1fr);
padding-bottom: 6rem;
}

.left-header .h-shape {
display: none;
}
.left-header .image {
width: 90% !important;
margin: 0 auto !important;
}

.right-header {
grid-row: 1;
padding-right: 0rem !important;
Expand All @@ -937,19 +935,15 @@ section {
.container {
padding: 7rem 3rem;
}

.about-stats .progress-bars {
grid-template-columns: repeat(1, 1fr);
}

.about-container .right-about {
grid-template-columns: repeat(1, 1fr);
}

.timeline {
grid-template-columns: repeat(1, 1fr);
}

.main-title h2 {
font-size: 3rem;
}
Expand All @@ -959,6 +953,4 @@ section {
.main-title h2 .bg-text {
font-size: 4rem;
}
}

/*# sourceMappingURL=styles.css.map */
}/*# sourceMappingURL=styles.css.map */
2 changes: 1 addition & 1 deletion styles/styles.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading