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

Add Dark Mode and light Mode by using Html, CSS and JavaScript #48

Open
wants to merge 2 commits into
base: main
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
8 changes: 4 additions & 4 deletions assests/openStyle.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ a{
.h2{
background-color: var(-);
}
.nav{
.navbar{

margin-right: 10rem;
/* margin-right: 10rem; */
font-family: cursive;
width: 100%;
position: fixed;
top: 0%;
padding-top: 2px;
z-index: 1;
background-color: var(--fourth-color);
box-shadow: 0 1px 4px rgba(146,161,176,.15);
/* background-color: var(--fourth-color);
box-shadow: 0 1px 4px rgba(146,161,176,.15); */


}
Expand Down
264 changes: 250 additions & 14 deletions assests/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ body{
margin: 0%;
margin-left: 0%;
margin-right: 0%;
font-family: "Noto Sans", sans-serif;
font-optical-sizing: auto;
/* font-weight: <weight>; */
font-style: normal;
font-variation-settings: "wdth" 100;

}

/*===== Colores =====*/
Expand All @@ -19,25 +25,23 @@ body{

/* Navbar*/
.nav-link{

color: #fff !important ;

}
.nav-link:hover, .nav-link:active{
color: #0a0909 !important;
}
.nav{
.navbar{


margin-top: 0;
margin-right: 10rem;
font-family: cursive;
width: 100%;
position: fixed;
top: 0%;
padding-top: 2px;
z-index: 1;
background-color: var(--fourth-color);
box-shadow: 0 1px 4px rgba(146,161,176,.15);
/* background-color: var(--fourth-color); */
/* box-shadow: 0 1px 4px rgba(146,161,176,.15); */


}
Expand All @@ -49,13 +53,7 @@ body{


}
.logo{
color: #fff !important;
margin-right: 60rem;
margin-bottom: 5rem;
font-size: larger;
margin-top: 0rem;
}

/* box Sections*/
.container{
margin-top: .2rem;
Expand All @@ -66,7 +64,6 @@ body{
.title{
top: 0%;
font-size: larger;
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
color:beige;
margin-top: 50%;
margin-bottom: 114%;
Expand Down Expand Up @@ -187,6 +184,8 @@ body{
text-align: center;
font-weight: var(--font-semi);
padding: 2rem 0;
border-top-left-radius: 2.523rem;
border-top-right-radius: 2.523rem;
}
.footer__title{
font-size: 2rem;
Expand Down Expand Up @@ -222,4 +221,241 @@ body{
}
.fa-linkedin-square:hover{
color : rgb(0, 119, 181);
}


/* Dark and Light Mode */
.switch {
align-self: flex-end;
margin: 0.9375rem;
}
.inner-switch {
display: inline-block;
cursor: pointer;
border: 1px solid #555;
border-radius: 1.25rem;
width: 3.125rem;
text-align: center;
font-size: 1rem;
padding: 0.1875rem;
margin-left: 0.3125rem;
}

.dark,
.dark ,
.footer {
background-color: #222;
color: #e6e6e6;
border-color: #e6e6e6;
}
.inner-switch.dark-mode-on {
background-color: #333; /* Change to your desired color for dark mode */
color: #fff; /* Change to your desired text color for dark mode */
}

/* Nav BAr */
.navbar {
/* background-color: var(--first-color); */
height: max-content;
padding: 10px;
display: flex;
align-items: center;
align-content: center;
/* flex-direction: row; */
justify-content: space-around;
margin: 20px;

}
a {
text-decoration: none;
}
.center-content {

background-color: red;
color: #FFF;
border-radius: 1.2356rem;
padding: 0.7125rem;
margin-left: 0.3125rem;
font-weight: 500;
}
.logo {
font-family: "Pacifico", cursive;
font-weight: 400;
font-style: normal;
text-align: start;
}

/* Scroll Bar Animation */
::-webkit-scrollbar {
width: 12px;
}

::-webkit-scrollbar-track {
border-radius: 8px;
background-color: #e7e7e7;
border: 1px solid #cacaca;
box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
}

::-webkit-scrollbar-thumb {
border-radius: 8px;
background-color: #363636;
}
/* section Content */
.container-1 {
margin: 30px;
}
.first {
border-radius: 1.253rem;
text-align: center;
padding: 20px;
}
.align-self-center {
width: 200px;
}
.animation {
border-radius: 10px;
}
.image {
margin: 10px;
}
.image-contact {
text-align: center;
}
.image-media {
background-image: url(img/background.jpg);
background-attachment: fixed;
background-size: cover;
background-repeat: no-repeat;
image-rendering: optimizeQuality;
border-bottom-right-radius: 2.523rem;
border-bottom-left-radius: 2.523rem;
}
/* mobile view */
@media (max-width:799px) {
.navbar {
display: inline;
margin: 0px;
}
.logo {
text-align: start;
}
.center-content,
.mode,
.logo {
display: none;
}
.topnav {
overflow: hidden;
background-color: #333;
position: relative;
border-radius: 0.956rem;
}

.active {
text-align: start;
}

.topnav #myLinks {
display: none;
}

.topnav a {
color: white;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
display: block;
}

.topnav a.icon {
background: black;
display: block;
position: absolute;
right: 0;
top: 0;
}

.topnav a:hover {
background-color: #000;
/* color: black; */
}

.mobile-container {
margin: auto;
/* background-color: #555; */
color: white;
}

.switch {
color: white;
padding: 14px 16px;
font-size: 17px;
}
.row {
display: flex;
flex-direction: row;
}
.col-4 {
width:100%;
height: max-content;
margin-top: 0px;
}
.title-media {
margin-top: 10px;
margin-bottom: 10px;
}
.title_text {
margin-top: 2px;
}
.align-self-center {
width: 80px;
}
.col-6 {
width: 100%;
padding: 10px;
margin: 10px;
}
.info {
margin: 0px;
}
.line {
border: 3px solid #000;
margin-left: 10px;
margin-right: 10px;
border-radius: 1.253rem;
}
.col-8 {
width: 100%;
}
.contacts {
text-align: center;
margin: 0px;
}
.image-media {
background-size: 100% auto;
}
.footer {
align-items: center;
text-align: center;
}
.footer__title {
padding: 20px;
}
.socials {
margin: 0px;
}
.title-box {
margin-bottom: 0%;
}
}

@media (min-width: 800px) {
.mobile-container {
display: none;
}
.line {
display: none;
}

}
Binary file added img/CodeForces.webp
Binary file not shown.
Binary file added img/images logo/Outreachy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/images logo/The_Linux_Foundation_Logo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/images logo/Topcoder_Logo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/images logo/c++.webp
Binary file not shown.
Binary file added img/images logo/codechef.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/images logo/dsoc.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/images logo/hackerearth.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/images logo/hackerrank.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/images logo/hactoberfest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/images logo/java.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/images logo/java.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/images logo/javascript.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/images logo/leetcode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/images logo/mlh-fellowship-white.webp
Binary file not shown.
Binary file added img/images logo/python.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading