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

Improved contrib section + Some minor changes. #86

Merged
merged 3 commits into from
Oct 8, 2022
Merged
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
59 changes: 30 additions & 29 deletions Website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
<link rel="icon" type="image/png" sizes="32x32" href="./favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="./favicons/favicon-16x16.png">
<link rel="manifest" href="./favicons/site.webmanifest">
<!-- Bootstrap -->
<!-- Bootstrap
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" crossorigin="anonymous">
integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" crossorigin="anonymous"> -->
<link rel="stylesheet" href="style.css">
</head>

Expand Down Expand Up @@ -65,19 +65,30 @@ <h1>DRIFTY</h1>
<img src="./Resources/Layers/6.webp" alt="..." srcset="">
<img src="./Resources/Layers/7.webp" alt="..." srcset="">
</div>


</header>
</section>

<section id="contrib" class="info">
<h2>More Information About Drifty</h2>
<p>It is currently available in CLI (Command Line Interface) mode and the GUI (Graphical User Interface)
version is under active development. You may contribute to this project here.</p>
<a href="https://github.com/SaptarshiSarkar12/Drifty" class="btn4"><i class="fab fa-github"></i> Contribute to
Drifty</a>
<section id="contrib" class="contrib">
<div class="contrib-container">
<div class="content">
<h2 class="text-gradient-ry">More Information About Drifty</h2>
<p>It is currently available in CLI (Command Line Interface) mode and the GUI (Graphical User Interface)
version is under active development. We believe in team work. Any contribution that brings value to
the project is highly appreciated. You may contribute to this project here.</p>

</div>
<div class="content">
<h2 class="text-gradient-blue">Be a part of Drifty Family!</h2>
<div class="contributors" id="contributors">
</div>
<a href="https://github.com/SaptarshiSarkar12/Drifty" class="btn4"><i class="fab fa-github"></i>
Contribute to Drifty</a>
</div>
</div>
</section>

<section id="contrib" class="info"></section>

<section id="download" class="download">
<h2>✨Download Here✨</h2>
<div id="download_section" class="download_section">
Expand All @@ -99,22 +110,12 @@ <h2>Demonstration of Drifty</h2>
<!-- contact us section -->
<section id="contact">
<h2>Contact Us</h2>
<div class="container text-center">
<div class="row">
<div class="col">
<a href="https://github.com/SaptarshiSarkar12/Drifty/discussions" type="button"
class="btn btn-dark btn-lg"><i class="fab fa-github"></i> Help and Support <i class="fa-solid fa-headset"></i></a>
</div>
<div class="col">
<a href="https://www.twitter.com/SSarkar2007" type="button"
class="btn btn-primary btn-lg"><i class="fab fa-twitter"></i> Twitter</a>
</div>
<div class="col">
<a href="mailto:saptarshi.programmer@gmail.com" type="button"
class="btn btn-danger btn-lg"><i class="fa-sharp fa-solid fa-envelope"></i> Email</a>
</div>
</div>
<br>
<div class="contact-container">
<a href="https://github.com/SaptarshiSarkar12/Drifty/discussions" type="button"> <i
class="fa-solid fa-headset"></i> Support </a>
<a href="https://www.twitter.com/SSarkar2007" type="button"><i class="fab fa-twitter"></i> Twitter</a>
<a href="mailto:saptarshi.programmer@gmail.com" type="button"><i class="fa-sharp fa-solid fa-envelope"></i>
Email</a>
</div>
</section>

Expand All @@ -133,9 +134,9 @@ <h2>Contact Us</h2>
<!-- Scripts -->
<script src="script.js"></script>
<!-- Bootstrap js -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js"
<!-- <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3" crossorigin="anonymous">
</script>
</script> -->
</body>

</html>
</html>
33 changes: 16 additions & 17 deletions Website/responsive-nav.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,23 @@
margin: 0 0;
}
.img-layer {
display: none;

display: none !important;
}
.header-container {
transform: none;
width: 70%;
}

}

@media screen and (max-width: 1024px) {
.nav-bar{
padding: 10px 2vw !important;
}
}
/* ALL MOBILE */
@media screen and (max-width: 767px) {
.nav-sticky {
width: fit-content !important;
flex-direction: column;
justify-content: space-between;
align-items: center;
Expand All @@ -47,29 +51,25 @@
-webkit-box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.5);
}
.nav-sticky .logo {
.nav-sticky > a {
display: none;
}
.nav-bar {
padding: 15px 5vw ;
justify-content: space-between;
padding: 15px 5vw !important;
justify-content: space-between !important;
text-align: center;
}
.nav-bar > a {
margin: 0;
margin: 0 !important;
}

#menu {
display: block;
display: block !important;
}

.nav-sticky button {
.nav-sticky .button {
margin: 0;
}

.menu {
display: block;
}
nav {
height: 0;
width: 0;
Expand Down Expand Up @@ -128,12 +128,11 @@
transition: none;
}
.img-layer {

display: none;

display: none !important;
}
.header-container {
transform: none;
transform: none !important;
width: 100% !important;
}

}
57 changes: 53 additions & 4 deletions Website/script.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
"use strict";

const date = new Date();

let darkMode = localStorage.getItem('darkMode');
const darkModeToggle = document.querySelector('.btn-toggle');

const nav = document.querySelector(".nav-bar");
const menu = document.getElementById("menu");
const toggleBtn = document.querySelector("#menu>i");
const miniNav = document.querySelector("nav");

const links = document.querySelectorAll(".nav-links > li");

const enableDarkMode = () => {
Expand Down Expand Up @@ -58,8 +61,54 @@ window.addEventListener("scroll", function () {
}
toggleBtn.classList.remove("fa-x");
toggleBtn.classList.add("fa-bars");
}
// END NAV ---------

// CONTRIB SECTION ----
let currentHour = date.getHours();
let contrib = localStorage.getItem('contrib');
let requestedAt = localStorage.getItem("requestedAt");
if (parseInt(requestedAt)>23) localStorage.removeItem("requestedAt");
if (contrib == null || requestedAt == null) getContrib();
else if (currentHour!=requestedAt) getContrib();
function getContrib() {
fetch("https://api.github.com/repos/SaptarshiSarkar12/Drifty/contributors")
.then(x=>x.json())
.then((data) => {
contrib = data;
localStorage.setItem('contrib', JSON.stringify(data));
localStorage.setItem('requestedAt', date.getHours());
}).catch(err => console.log(err));
}

updateContrib();
function updateContrib(){
try{
contrib = JSON.parse(contrib);
} catch (_) {
console.log(_);
}

// END NAV ---------
contrib.forEach(x=> document
.getElementById("contributors")
.appendChild(generateDiv(x)));
}


// x - user_object
// returns - div with img
function generateDiv(x) {
let img = document.createElement("img");
img.src = `${x["avatar_url"]}`;
img.style.height = "48px";
img.style.width = "48px";
let a = document.createElement("a");
a.href = `${x["html_url"]}`;
a.appendChild(img);

let div = document.createElement("div");
div.appendChild(a);
div.style.width = "48px";
div.style.height = "48px";
div.style.margin = "5px"
return div;
}
// END CONTRIB ----
Loading