Skip to content

Commit

Permalink
Merge branch 'master' into closes-issue-#427
Browse files Browse the repository at this point in the history
  • Loading branch information
0xabdulkhaliq authored Aug 10, 2023
2 parents 00b1f4e + 606cdf3 commit 7f5a189
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 44 deletions.
2 changes: 1 addition & 1 deletion components/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function Layout({ children }) {
useEffect(() => {
setTimeout(() => {
setLoading(false);
}, 3200);
}, 2200);
}, []);
return loading ? (
<Preloader />
Expand Down
82 changes: 73 additions & 9 deletions components/Preloader.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,75 @@
import React from "react";
import React, { useState, useEffect } from "react";

const Preloader = () => {
return(
<div className="preload">
<img id="logo" src="../assets/icon/favicon.png" alt="" />
</div>
)
}
const Preloader = () => {
const [loadingPercentage, setLoadingPercentage] = useState(0);

export default Preloader;
useEffect(() => {
const interval = setInterval(() => {
setLoadingPercentage((prevPercentage) => {
const newPercentage = prevPercentage + 1;
if (newPercentage >= 100) {
clearInterval(interval);
}
return newPercentage;
});
}, 20); // You can adjust the interval duration to control the loading speed

return () => {
clearInterval(interval);
};
}, []);

const loaderStyle = {
display: "block",
position: "relative",
height: "32px",
width: "200px",
background: "var(--extra3)",
border: "2px solid #fff",
overflow: "hidden",
marginTop: "16px", borderRadius: "16px",


};

const loaderBeforeStyle = {
content: '""',
background: "#0093ed",
position: "absolute",
left: "0",
top: "0",
width: `${loadingPercentage}%`,
height: "100%",
animation: "loading 10s linear infinite",
borderRadius: "inherit",

};

const loaderAfterStyle = {
content: '""',
position: "absolute",
left: "0",
top: "0",
width: "100%",
height: "100%",
textAlign: "center",
fontSize: "24px",
lineHeight: "32px",
color:"var(--accent-20)",
mixBlendMode: "difference",
animation: "percentage 10s linear infinitex "
};

return (
<div className="preload">
<img id="logo" src="../assets/icon/favicon.webp" alt="" />
<span style={loaderStyle}>
<span style={loaderBeforeStyle}></span>
<span style={loaderAfterStyle}>{loadingPercentage}%</span>
</span>

</div>
);
};

export default Preloader;
1 change: 1 addition & 0 deletions styles/404.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
flex-direction: column;
align-items: center;
justify-content: center;
scroll-behavior: smooth;
}

.error_page h2 {
Expand Down
71 changes: 37 additions & 34 deletions styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ body[data-theme="light"] {
background-size: cover;
background-attachment: fixed;
background-size: 300vh;
scroll-behavior: smooth;
font-family: "open-sans";
--logo-color: brightness(0) invert(1);
--navbar-links: #ffffff;
--navbar-links: #ffffff;
--footer-links: #000;
--navbar-color: #0093ED;
}
Expand All @@ -43,7 +44,7 @@ body[data-theme="dark"] {
--extra4: var(--accent-10);
background: var(--accent-10);
--logo-color: brightness(0) invert(0);
--navbar-links: #03a4ff;
--navbar-links: #03a4ff;
--footer-links: #fff;
--navbar-color: #001B2B;
}
Expand Down Expand Up @@ -150,7 +151,7 @@ nav .links-container {
padding-top: 5px;
}

.logo-containter > p {
.logo-containter>p {
color: var(--navbar-links);
font-size: 1.5em;
font-weight: 700;
Expand All @@ -165,7 +166,7 @@ nav .links-container a {
color: var(--navbar-links);
}

nav .links-container a > i {
nav .links-container a>i {
color: var(--navbar-links);
}

Expand Down Expand Up @@ -255,7 +256,7 @@ nav .navNarrow-Bar i {
content: "";
height: 5px;
width: 100%;
background-color: var(--native1);
background-color: #0397ec;
transition: width 0.3s ease-in-out;
left: 0;
bottom: 1px;
Expand Down Expand Up @@ -472,10 +473,7 @@ input.search {
color: var(--native1);
}

.landing-page-header
.header-details
.search-container:hover
.search::-webkit-input-placeholder {
.landing-page-header .header-details .search-container:hover .search::-webkit-input-placeholder {
color: var(--native1);
}

Expand Down Expand Up @@ -529,11 +527,7 @@ input.search {
justify-content: flex-start;
}

.landing-page-header
.header-details
.landing-page-btn-container
.discord-button
.discord:hover {
.landing-page-header .header-details .landing-page-btn-container .discord-button .discord:hover {
background: none;
line-height: 0;
border: 0.5px solid #7289da;
Expand All @@ -544,11 +538,7 @@ input.search {
transform: scale(1.2);
}

.landing-page-header
.header-details
.landing-page-btn-container
.discord-button
.discord {
.landing-page-header .header-details .landing-page-btn-container .discord-button .discord {
background: none;
line-height: 0;
border: 0.5px solid #7289da;
Expand All @@ -559,20 +549,12 @@ input.search {
transition: all 0.3s ease-in-out;
}

.landing-page-header
.header-details
.landing-page-btn-container
.discord-button
img {
.landing-page-header .header-details .landing-page-btn-container .discord-button img {
width: 140px;
height: 36px;
}

.landing-page-header
.header-details
.landing-page-btn-container
.explore-all-btn
.call-to-action-btn {
.landing-page-header .header-details .landing-page-btn-container .explore-all-btn .call-to-action-btn {
background: none;
line-height: 0;
border: 0.5px solid rgba(0, 147, 237, 0.3);
Expand All @@ -598,11 +580,7 @@ input.search {
margin: 0rem 1.5rem;
}

.landing-page-header
.header-details
.landing-page-btn-container
.explore-all-btn
.call-to-action-btn:hover {
.landing-page-header .header-details .landing-page-btn-container .explore-all-btn .call-to-action-btn:hover {
color: var(--native1);
background: var(--primary);
}
Expand Down Expand Up @@ -1248,6 +1226,7 @@ input.search {
width: 100%;
margin-top: -40px;
}

.explore {
margin-top: 21px;
}
Expand Down Expand Up @@ -1275,12 +1254,15 @@ input.search {
width: 100%;
margin-top: -40px;
}

.column1 {
margin-top: 14px;
}

.column2 {
margin-left: 0px;
}

.footer-copyright {
margin-left: 10px;
width: 100%;
Expand All @@ -1291,9 +1273,11 @@ input.search {
.footer-details {
align-items: center;
}

.explore {
margin-top: 20px;
}

.footer-copyright {
margin-left: 90px;
}
Expand Down Expand Up @@ -1344,9 +1328,11 @@ input.search {
width: 100%;
height: 100vh;
background-color: var(--extra3);

display: -webkit-box;
display: -ms-flexbox;
display: flex;
flex-direction: column;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
Expand Down Expand Up @@ -1416,13 +1402,15 @@ input.search {
font-size: 14px;
}
}

@media screen and (min-width: 426px) and (max-width: 767px) {
.footer {
width: 100%;
display: flex;
flex-direction: column;
padding-left: 10%;
}

.footer-question {
width: 300px;
padding-left: 3px;
Expand All @@ -1443,14 +1431,17 @@ input.search {
width: 300px;
margin-top: -40px;
}

.column1 {
margin-left: 0px;
margin-top: 14px;
}

.column2 {
margin-left: 0px;
margin-top: 21px;
}

.footer-copyright {
margin-left: 10px;
width: 100%;
Expand Down Expand Up @@ -1977,13 +1968,25 @@ input.search {
width: 100%;
height: 10vh;
}

.label:hover {
background-color: #0093ed;
color: white;

}

.search-container {
background: unset;
}

.landing-page-header .header-details .search-container:hover .search {
color: var(--native1) !important;
}

a.sc-eqUAAy.cZwkbm:hover {
color: #00253a;
}

svg:hover {
color: #00253a;
}

0 comments on commit 7f5a189

Please sign in to comment.