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
5 changes: 3 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<body>

<div class="main">
<button class="btn btn-lg btn-yellow btn-toggle">Dark Mode</button>
<center>

<div class="about">
Expand Down Expand Up @@ -48,8 +48,9 @@ <h3><span>Vinit</span></h3>
</center>

</div>
<script src="scripts.js"></script>
</body>


<!--- Made with love by Vinit Shahdeo -->

Expand Down
6 changes: 6 additions & 0 deletions scripts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const btn = document.querySelector(".btn-toggle");

// Listen for a click on the button
btn.addEventListener("click", function () {
document.body.classList.toggle("dark");
});
93 changes: 65 additions & 28 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@
* Author - Vinit Shahdeo
* Email - [email protected]
*/

:root {
--accent: #016cc7;
--text: #303030;
--background: #fff;
}
body {
font-family: 'Montserrat', sans-serif;
color: #404142;
color: var(--text, #303030);
font-size: 16px;
letter-spacing: 0.2px;
background: var(--background, #fff)
}
h1, h2, h3, h4, h5, h6 {
font-weight: 800;
Expand All @@ -17,11 +24,11 @@ h1, h2, h3, h4, h5, h6 {
}
hr {
height: 0;
border:2px solid #404142;
opacity: 0.1;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
border:2px solid var(--text, #303030);
opacity: 0.1;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
ul {
margin: 0;
Expand All @@ -31,7 +38,7 @@ ul {
a {
-webkit-transition: all 0.3s;
-moz-transition: all 0.3s;
transition: all 0.3s;
transition: all 0.3s;
}
a:hover, a:focus, a:active, a:visited {
text-decoration: none;
Expand All @@ -43,7 +50,7 @@ a:hover, a:focus, a:active, a:visited {
font-weight: 600;
-webkit-transition: all 0.6s;
-moz-transition: all 0.6s;
transition: all 0.6s;
transition: all 0.6s;

}
.btn-lg {
Expand Down Expand Up @@ -82,6 +89,11 @@ a:hover, a:focus, a:active, a:visited {
text-transform: uppercase;
cursor: pointer;
}
.btn-toggle {
position: fixed;
top: 1rem;
right: 1rem;
}

/* div class */
.about {
Expand All @@ -90,13 +102,13 @@ a:hover, a:focus, a:active, a:visited {
}
.about span {
font-size: 2em;
color: #016cc7;
color: var(--accent, #016cc7);
}
.about p{
opacity:0.6;
}
.about p span{
color:#016cc7;
color:var(--accent, #016cc7);
font-size:1em;
opacity: 1.0;
font-weight: bolder;
Expand All @@ -112,11 +124,12 @@ a:hover, a:focus, a:active, a:visited {
.about a{
text-decoration:none;
font-weight:bold;
color:#2a2a2a;
color: var(--text, #303030);
}
.about a:hover{
color:#016cc7;
color:var(--accent, #016cc7);
}
.main { position: relative; }
.main .about {
width: 31.333333%;
-webkit-transition: all 0.3s;
Expand All @@ -136,19 +149,18 @@ a:hover, a:focus, a:active, a:visited {
border: 4px solid #efefef;
border-radius: 50%;
-moz-transition: all 0.3s;
-webkit-transition: all 0.3s;
transition: all 0.3s;
-webkit-transition: all 0.3s;
transition: all 0.3s;
}
.main-img:hover{
-moz-transform: scale(1.05);
-webkit-transform: scale(1.05);
transform: scale(1.05);
.main-img:hover{
-moz-transform: scale(1.05);
-webkit-transform: scale(1.05);
transform: scale(1.05);
cursor: pointer;
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
filter: gray;

}
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
filter: gray;
}
/* Social Media icons */
ul.social li {
list-style: none;
Expand All @@ -160,13 +172,13 @@ ul.social li a {
padding: 0 10px;
}
.fa{
color:#016cc7;
color: var(--accent, #016cc7);
opacity: 0.8;
}
.fa:hover{
opacity: 0.8;
color:#dd5138;
}
.fa:hover{
opacity: 0.8;
color:#dd5138;
}

/* === Custom Colors of original logo===
* Remove comments if you want to use it
Expand Down Expand Up @@ -215,3 +227,28 @@ ul.social li a {
margin-right: 9px;
}
}

/*
===Custom Dark mode===
*/
body.dark {
--accent: #016cc7;
--background: #303030;
--text: #fff;
}

/* @media (prefers-color-scheme: dark) {
:root {
--accent: #016cc7;
--background: #303030;
--text: #fff;
}
}

@media (prefers-color-scheme: light) {
:root {
--accent: #016cc7;
--text: #303030;
--background: #fff;
}
} */
89 changes: 63 additions & 26 deletions template/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@
* Author - Vinit Shahdeo
* Email - [email protected]
*/

:root {
--accent: #016cc7;
--text: #303030;
--background: #fff;
}
body {
font-family: 'Montserrat', sans-serif;
color: #404142;
color: var(--text, #303030);
font-size: 16px;
letter-spacing: 0.2px;
background: var(--background, #fff)
}
h1, h2, h3, h4, h5, h6 {
font-weight: 800;
Expand All @@ -17,11 +24,11 @@ h1, h2, h3, h4, h5, h6 {
}
hr {
height: 0;
border:2px solid #404142;
border:2px solid var(--text, #303030);
opacity: 0.1;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
ul {
margin: 0;
Expand Down Expand Up @@ -82,6 +89,11 @@ a:hover, a:focus, a:active, a:visited {
text-transform: uppercase;
cursor: pointer;
}
.btn-toggle {
position: fixed;
top: 1rem;
right: 1rem;
}

/* div class */
.about {
Expand All @@ -90,13 +102,13 @@ a:hover, a:focus, a:active, a:visited {
}
.about span {
font-size: 2em;
color: #016cc7;
color: var(--accent, #016cc7);
}
.about p{
opacity:0.6;
}
.about p span{
color:#016cc7;
color:var(--accent, #016cc7);
font-size:1em;
opacity: 1.0;
font-weight: bolder;
Expand All @@ -112,11 +124,12 @@ a:hover, a:focus, a:active, a:visited {
.about a{
text-decoration:none;
font-weight:bold;
color:#2a2a2a;
color: var(--text, #303030);
}
.about a:hover{
color:#016cc7;
color:var(--accent, #016cc7);
}
.main { position: relative; }
.main .about {
width: 31.333333%;
-webkit-transition: all 0.3s;
Expand All @@ -136,19 +149,18 @@ a:hover, a:focus, a:active, a:visited {
border: 4px solid #efefef;
border-radius: 50%;
-moz-transition: all 0.3s;
-webkit-transition: all 0.3s;
transition: all 0.3s;
-webkit-transition: all 0.3s;
transition: all 0.3s;
}
.main-img:hover{
-moz-transform: scale(1.05);
-webkit-transform: scale(1.05);
transform: scale(1.05);
.main-img:hover{
-moz-transform: scale(1.05);
-webkit-transform: scale(1.05);
transform: scale(1.05);
cursor: pointer;
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
filter: gray;

}
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
filter: gray;
}
/* Social Media icons */
ul.social li {
list-style: none;
Expand All @@ -160,13 +172,13 @@ ul.social li a {
padding: 0 10px;
}
.fa{
color:#016cc7;
color: var(--accent, #016cc7);
opacity: 0.8;
}
.fa:hover{
opacity: 0.8;
color:#dd5138;
}
.fa:hover{
opacity: 0.8;
color:#dd5138;
}

/* === Custom Colors of original logo===
* Remove comments if you want to use it
Expand Down Expand Up @@ -214,4 +226,29 @@ ul.social li a {
width: 49%;
margin-right: 9px;
}
}
}

/*
===Custom Dark mode===
*/
body.dark {
--accent: #016cc7;
--background: #303030;
--text: #fff;
}

/* @media (prefers-color-scheme: dark) {
:root {
--accent: #016cc7;
--background: #303030;
--text: #fff;
}
}

@media (prefers-color-scheme: light) {
:root {
--accent: #016cc7;
--text: #303030;
--background: #fff;
}
} */
2 changes: 1 addition & 1 deletion template/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ <h3><span>Vinit</span></h3>
</center>

</div>

<script src="js/scripts.js"></script>
</body>

<!--- Made with love by Vinit Shahdeo -->
Expand Down
8 changes: 8 additions & 0 deletions template/js/scripts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const btn = document.querySelector(".btn-toggle");

// Listen for a click on the button
btn.addEventListener("click", function () {
console.log("click", click);

document.body.classList.toggle("dark");
});