From c5b77550236c56eb9614759f110dfda16dbbd47f Mon Sep 17 00:00:00 2001 From: Subhajit-2023-44 Date: Tue, 5 Nov 2024 22:48:24 +0530 Subject: [PATCH] done --- contributor/Contributors.css | 609 ---------------------------------- contributor/Contributors.html | 71 ---- contributor/Contributors.js | 52 --- contributor/contributor.css | 291 ---------------- contributor/contributor.html | 134 -------- contributorss.css | 384 +++++++++++++++++++++ contributorss.html | 72 ++++ contributorss.js | 130 ++++++++ index.html | 2 +- 9 files changed, 587 insertions(+), 1158 deletions(-) delete mode 100644 contributor/Contributors.css delete mode 100644 contributor/Contributors.html delete mode 100644 contributor/Contributors.js delete mode 100644 contributor/contributor.css delete mode 100644 contributor/contributor.html create mode 100644 contributorss.css create mode 100644 contributorss.html create mode 100644 contributorss.js diff --git a/contributor/Contributors.css b/contributor/Contributors.css deleted file mode 100644 index 7c167df0..00000000 --- a/contributor/Contributors.css +++ /dev/null @@ -1,609 +0,0 @@ -*{ - font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; - margin: 0; - padding: 0; - box-sizing: border-box; - } - - .container { - text-align: center; - background-color: #2193b0; - } - - .title { - display: inline-block; - font-size: 3em; - margin-bottom: 20px; - padding: 10px; - color: #fffdff; - - /* border-radius: 20px; */ - /* background-color: rgba(209, 209, 255, 0.8); */ - } - - .theme-switch::before { - content: ""; - position: absolute; - top: 3px; - left: 3px; - width: 24px; - height: 24px; - background-size: contain; - background-repeat: no-repeat; - background-position: center; - transition: left 0.3s ease-in-out, background-image 0.3s ease-in-out; - background-image: url("../Assets/moon.png"); - } - - .theme-switch.dark-theme::before { - left: 33px; - background-image: url("../Assets/sun.png"); - } - - .contributors-grid { - - width: 100vw; - flex-wrap: wrap; - gap: 40px; - padding: 20px; - display: grid; - grid-template-columns: repeat(7, minmax(100px,5fr)); - } - - .contributor-card { - /* width: auto; - height: auto; */ - min-width: 200px; - min-height: 300px; - display: flex; - justify-content: center; - position: relative; - overflow: hidden; - max-width: calc(55% - 16px); - display: flex; - flex-direction: column; - align-items: center; - background-color: #7cb9ff; - border: 1px solid #7cb9ff; - border-radius: 8px; - box-shadow: 0 0px 8px rgb(40, 119, 255); - padding: 16px; - transition: transform 0.5s ease-in-out, box-shadow 0.3s ease; - text-decoration: none; - color: inherit; - /* margin-bottom: 16px; */ - word-wrap: wrap; - transition: transform 0.5s ease-in-out, box-shadow 0.3s ease; - - } - - #contributors { - perspective: 1000px; /* This adds depth for 3D transformations */ - margin-left: -19px; - } - - /* .contributor-card:hover { - transform: scale(1.02); - box-shadow: 1px 1px 23px rgba(14, 6, 14, 0.915); - border: none; - cursor: pointer; - transform: translateZ(50px); /* Moves the card forward in 3D space */ - - .contributor-card::before { - content: ""; - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: linear-gradient(132deg, #76ABAE 50%, rgb(206, 206, 206) 51%); - /* background: linear-gradient(130deg, #3b89ff 50%, #eef6ff 50%); */ - transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out; - transform: translate(-100%, -100%); - opacity: 0; - z-index: -1; - } - - .contributor-card:hover::before { - transform: translate(0, 0); - opacity: 1; - } - - .contributor-card img { - border-radius: 50%; - width: 100px; - height: 100px; - object-fit: cover; - margin-bottom: 10px; - transition: box-shadow 0.3s ease-in-out, border 0.1s ease-in-out; - } - - .contributor-card:hover img { - border: 2px solid rgb(0, 34, 255); - box-shadow: -1px 2px 27px rgb(0, 217, 255); - } - - /* - .contributor-card h2 { - margin: 0 0 10px; - } */ - /* - .contributor-card p { - } */ - - .contributor-card h2 { - color: #040404; - position: relative; - z-index: 1; - transition: text-shadow 0.3s ease-in-out, color 0.3s ease-in-out; - } - - .contributor-card p { - font-size: 1.2em; - color: #040404; - position: relative; - z-index: 1; - transition: text-shadow 0.3s ease-in-out, color 0.3s ease-in-out; - margin: 0 0 10px; - } - - .contributor-card:hover h2 { - text-shadow: 1px 1px 2px rgb(0, 108, 108), 0 0 0.2em rgb(0, 14, 108), - 0 0 0.8em rgb(0, 14, 108); - color: white; - } - - .contributor-card:hover p { - text-shadow: 1px 1px 2px rgba(4, 0, 127, 0.715), 0 0 0.2em rgb(5, 18, 168), - 0 0 0.3em rgb(134, 136, 250); - color: white; - - /* font-weight: 400; */ - } - - body { - background-color: #f8f9fa; - color: hsl(0, 0%, 100%); - } - - header { - height: 100px; - } - - .logo { - margin: 30px 0 0 0; - } - - footer { - background-color: #333; - color: white; - text-align: center; - padding: 20px 0; - margin-top: auto; - } - - .footer-container { - max-width: 800px; - margin: auto; - padding: 0 20px; - } - - /* .footer-links, - .footer-socials, - .footer-contact { - margin: 10px 0; - } - - .footer-links a, - .footer-socials a { - color: white; - text-decoration: none; - margin: 0 10px; - transition: color 0.3s; - } - - .footer-links a:hover, - .footer-socials a:hover { - color: #007bff; - } */ - - /* .footer-socials a { - font-size: 24px; - margin: 0 15px; - } */ - - .footer-contact a { - color: white; - } - - header { - height: 100px; - } - body { - min-height: 100vh; - max-width: 100vw; - } - .logo { - margin: 5px 0px 0px 0px; - } - - footer { - background: #333; - color: white; - text-align: center; - padding: 20px 0; - margin-top: auto; - } - - .footer-container { - max-width: 800px; - margin: auto; - padding: 0 20px; - } - - /* .footer-links, - .footer-socials { - margin: 10px 0; - } - - .footer-links a, - .footer-socials a { - color: white; - text-decoration: none; - margin: 0 10px; - transition: color 0.3s; - } - - .footer-links a:hover, - .footer-socials a:hover { - color: #007bff; - } - - .footer-contact { - margin: 10px 0; - } */ - - @media (max-width: 900px) { - header { - display: flex; - justify-content: space-between; - align-items: center; - padding: 0.5rem 0.5rem; - /* Adjust padding to reduce overall height */ - } - - header nav { - flex-direction: column; - align-items: flex-start; - max-width: 100vw; - } - - header nav .hamburger { - display: block; - font-size: 28px; - cursor: pointer; - color: #fff; - padding: 1rem; /* Adjust padding for hamburger icon */ - position: absolute; - top: 0; - right: 1rem; /* Adjust right position as needed */ - } - - header nav ul { - flex-direction: column; - align-items: flex-start; - display: none; /* Hide the navbar items */ - max-height: 100vw; /* Full width for mobile view */ - position: absolute; - top: 100%; - right: 0; - background-color: #333; /* Background color for the floating menu */ - box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Add a box shadow */ - padding: 1rem; /* Add padding */ - border-radius: 0 0 8px 8px; /* Rounded corners at the bottom */ - } - - header nav ul.show { - display: flex; /* Show the navbar items when the hamburger is clicked */ - align-items: flex-start; - } - - header nav ul li { - margin: 0.5rem 1rem; /* Adjust margin for vertical spacing */ - } - header nav ul li a:hover { - color: #00c6ff; - - border-bottom: 2px solid #00c6ff; - - /* color: #000; */ - /* border-radius: .75rem; Rounded corners for active link */ - } - } - - /* Styles for larger screens */ - @media (min-width: 901px) { - header { - height: auto; - } - header nav .hamburger { - display: none; - } - - header nav ul { - display: flex; - flex-direction: row; - flex-wrap: wrap; - align-items: center; - } - - /* header nav ul li { - margin: 0 0.5rem; /* Reduce margin between items */ - } - */ header nav ul li a:hover { - background-color: #00c6ff; - color: #000; - border-radius: 0.75rem; /* Rounded corners for active link */ - } - - footer { - background-color: #1a1a1a; - color: white; - padding: 40px 0; - text-align: center; - } - - footer p { - margin: 10px 0; - } - - footer p a { - color: #00c6ff; - text-decoration: none; - } - - footer p a:hover { - text-decoration: underline; - } - - /* Footer Styles */ - footer { - background-color: #1a1a1a; - color: white; - padding: 40px 0; - text-align: center; - } - - footer p { - margin: 10px 0; - } - - footer p a { - color: #00c6ff; - text-decoration: none; - } - - footer p a:hover { - text-decoration: underline; - } - - footer { - background: #333; - color: white; - text-align: center; - padding: 20px 0; - margin-top: auto; - } - - .footer-container { - max-width: 800px; - margin: auto; - padding: 0 20px; - } - - /* .footer-links, - .footer-socials { - margin: 10px 0; - } - - .footer-links a, - .footer-socials a { - color: white; - text-decoration: none; - margin: 0 10px; - transition: color 0.3s; - } - - .footer-links a:hover, - .footer-socials a:hover { - color: #007bff; - } */ - - .footer-contact { - margin: 10px 0; - } - - - - - - html { - scroll-behavior: smooth; - max-width: 100vw; - max-height: 100vh; - } - - body { - background-color: #2193b0; - overflow-x: hidden; - margin: 0; - - - } - - header { - background-color: #1a1a1a; - padding: 0px 20px; - box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); - position: sticky; - top: 0; - z-index: 1000; - border-bottom: 3px solid #00c6ff; - display: flex; - justify-content: space-between; - align-items: center; - } - - header nav { - display: flex; - justify-content: space-between; - align-items: center; - padding: 0.5rem 1rem; - } - - header nav ul { - list-style: none; - display: flex; - gap: 30px; - } - - header nav ul li a { - color: #fff; - text-decoration: none; - font-weight: 600; - font-size: 18px; - transition: color 0.3s, border-bottom 0.3s; - background-color: rgb(72, 71, 71); - padding: 15px; - } - - header nav ul li a:hover { - background-color: #00c6ff; - color: #000; - border-radius: 0.75rem; - } - - @media (max-width: 900px) { - header { - display: flex; - justify-content: space-between; - align-items: center; - padding: 0.5rem 1rem; - } - - header nav { - flex-direction: column; - align-items: flex-start; - width: 100%; - } - - header nav .hamburger { - display: block; - font-size: 28px; - cursor: pointer; - color: #fff; - padding: 1rem; - position: absolute; - top: 0; - right: 1rem; - } - - header nav ul { - flex-direction: column; - display: none; - width: 100%; - height: 100vh; - background-color: #333; - padding: 1rem; - box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); - border-radius: 0 0 8px 8px; - } - - header nav ul.show { - display: flex; - } - } - - @media (min-width: 901px) { - header nav .hamburger { - display: none; - } - - header nav ul { - display: flex; - flex-direction: row; - align-items: center; - } - } - - header .logo h1 { - color: #fff; - font-weight: 700; - font-size: 28px; - margin: 0; - } - - -.homeBtn{ - text-decoration: none; - color: #000; - top: 20px; - left: 20px; - position: absolute; - background-color: #0e99ea; - width: 60px; - height: 40px; - display: flex; - justify-content: center; - align-items: center; - border-radius: 40px; - border: #000 2px solid; - } -.homeBtn:hover{ - background-color: #00c6ff; - color: #000; - border: #00c6ff 2px solid; -} - -/* Stats Section */ -.contributor-stats { - max-width: 1200px; - margin: 0 auto; - padding: 3rem 0; - text-align: center; - background-color: #2193b0; - -} - -.contributor-stats h2 { - font-size: 3rem; - margin-bottom: 2rem; -} - -.contributor-stats-grid { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); - gap: 2rem; -} - -.contributor-stat-card { - background-color: #7cb9ff; - border: 1px solid #2487d4; - border-radius: 10px; - padding: 1.5rem; - text-align: center; -} - -.contributor-stat-card .contributor-icon { - font-size: 2rem; - margin-bottom: 1rem; -} - -.contributor-stat-card h3 { - font-size: 2rem; - margin-bottom: 0.5rem; -} - -.contributor-stat-card p { - color: #ffffff; -} \ No newline at end of file diff --git a/contributor/Contributors.html b/contributor/Contributors.html deleted file mode 100644 index 08233fdd..00000000 --- a/contributor/Contributors.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - BuddyTrail - - - - - - - - - - - - - - - - -
-

Project Statistics

-
-
-
-

191

-

Contributors

-
- -
-
-

1327

-

Total Contributions

-
- -
-
-

136

-

GitHub Stars

-
- -
-
-

348

-

Forks

-
-
-
- -
-

Our Contributors

-
-
- - - - - - - \ No newline at end of file diff --git a/contributor/Contributors.js b/contributor/Contributors.js deleted file mode 100644 index fedd02b5..00000000 --- a/contributor/Contributors.js +++ /dev/null @@ -1,52 +0,0 @@ -document.addEventListener("DOMContentLoaded", () => { - const contributorsContainer = document.getElementById("contributors"); - - async function fetchContributors() { - let contributors = []; - let page = 1; - let perPage = 100; // Max per page is 100 - let moreContributors = true; - - while (moreContributors) { - try { - const response = await fetch( - `https://api.github.com/repos/PriyaGhosal/BuddyTrail/contributors?page=${page}&per_page=${perPage}` - ); - const data = await response.json(); - - // If no more contributors, stop fetching - if (data.length === 0) { - moreContributors = false; - } else { - contributors = contributors.concat(data); - page++; - } - } catch (error) { - console.error("Error fetching contributors:", error); - break; // Exit loop if there's an error - } - } - - displayContributors(contributors); - } - - function displayContributors(contributors) { - contributorsContainer.innerHTML = ""; - contributors.forEach((contributor) => { - const contributorCard = document.createElement("div"); - contributorCard.className = "contributor-card"; - - contributorCard.innerHTML = ` - - ${contributor.login} - -

${contributor.login}

-

Contributions: ${contributor.contributions}

- `; - - contributorsContainer.appendChild(contributorCard); - }); - } - - fetchContributors(); - }); \ No newline at end of file diff --git a/contributor/contributor.css b/contributor/contributor.css deleted file mode 100644 index aa00ec6d..00000000 --- a/contributor/contributor.css +++ /dev/null @@ -1,291 +0,0 @@ -* { - box-sizing: border-box; - margin: 0; - padding: 0; -} - -body { - font-family: Arial, sans-serif; - line-height: 1.6; - color: #333; - background-color: #f5f5f5; -} - -.contributor-container { - margin: 0 auto; -} - -/* Hero Section */ -.contributor-hero { - background-image: url('https://images.unsplash.com/photo-1522071820081-009f0129c71c?auto=format&fit=crop&w=2850&q=80'); - background-size: cover; - background-position: center; - height: 70vh; - display: flex; - align-items: center; - justify-content: center; - text-align: center; - position: relative; -} - -.contributor-hero::before { - content: ''; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-color: rgba(0, 0, 0, 0.7); -} - -.contributor-hero-content { - position: relative; - z-index: 1; - color: #fff; -} - -.contributor-hero h1 { - font-size: 3.5rem; - margin-bottom: 1rem; -} - -.contributor-hero p { - font-size: 1.5rem; - margin-bottom: 2rem; -} - -/* Buttons */ -.contributor-btn { - display: inline-block; - padding: 0.8rem 1.5rem; - border: none; - border-radius: 5px; - font-size: 1rem; - cursor: pointer; - transition: background-color 0.3s ease; -} - -.contributor-btn-primary { - background-color: #fff; - color: #333; -} - -.contributor-btn-primary:hover { - background-color: #f0f0f0; -} - -.contributor-btn-secondary { - background-color: #333; - color: #fff; -} - -.contributor-btn-secondary:hover { - background-color: #444; -} - -/* Stats Section */ -.contributor-stats { - max-width: 1200px; - margin: 0 auto; - padding: 4rem 0; - text-align: center; -} - -.contributor-stats h2 { - font-size: 2rem; - margin-bottom: 2rem; -} - -.contributor-stats-grid { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); - gap: 2rem; -} - -.contributor-stat-card { - background-color: #fff; - border: 1px solid #e0e0e0; - border-radius: 10px; - padding: 1.5rem; - text-align: center; -} - -.contributor-stat-card .contributor-icon { - font-size: 2rem; - margin-bottom: 1rem; -} - -.contributor-stat-card h3 { - font-size: 2rem; - margin-bottom: 0.5rem; -} - -.contributor-stat-card p { - color: #666; -} - -/* Contributors Section */ -.contributor-contributors { - max-width: 1200px; - margin: 0 auto; - padding: 4rem 0; - text-align: center; -} - -.contributor-contributors h2 { - font-size: 2rem; - margin-bottom: 2rem; -} - -.contributor-contributors-grid { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); - gap: 2rem; -} - -.contributor-contributor-card { - background-color: #fff; - border: 1px solid #e0e0e0; - border-radius: 10px; - overflow: hidden; - transition: transform 0.3s ease, box-shadow 0.3s ease; -} - -.contributor-contributor-card:hover { - transform: translateY(-5px); - box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); -} - -.contributor-contributor-card img { - width: 100px; - height: 100px; - border-radius: 50%; - margin: 1.5rem auto; - display: block; - border: 4px solid #f0f0f0; -} - -.contributor-contributor-card h3 { - font-size: 1.2rem; - margin-bottom: 0.5rem; -} - -.contributor-contributor-card p { - color: #666; - margin-bottom: 1rem; -} - -.contributor-contributor-card .contributor-contributions { - background-color: #f0f0f0; - padding: 0.5rem 1rem; - border-radius: 20px; - display: inline-block; - margin-bottom: 1rem; -} - -.contributor-contributor-card .contributor-footer { - background-color: #f9f9f9; - padding: 1rem; - display: flex; - justify-content: space-between; - align-items: center; -} - -.contributor-contributor-card .contributor-footer a { - color: #333; - text-decoration: none; - display: flex; - align-items: center; -} - -.contributor-contributor-card .contributor-footer svg { - margin-right: 0.5rem; -} - -/* Loading Spinner */ -.contributor-loading { - display: flex; - justify-content: center; - align-items: center; - height: 200px; -} - -.contributor-spinner { - border: 4px solid #f3f3f3; - border-top: 4px solid #333; - border-radius: 50%; - width: 40px; - height: 40px; - animation: contributor-spin 1s linear infinite; -} - -@keyframes contributor-spin { - 0% { transform: rotate(0deg); } - 100% { transform: rotate(360deg); } -} - -/* Call to Action Section */ -.contributor-cta { - background-color: #333; - color: #fff; - padding: 4rem 0; - text-align: center; -} - -.contributor-cta h2 { - font-size: 2rem; - margin-bottom: 1rem; -} - -.contributor-cta p { - font-size: 1.2rem; - margin-bottom: 2rem; -} - -.contributor-cta form { - display: flex; - justify-content: center; - gap: 1rem; - margin-bottom: 1rem; -} - -.contributor-cta input[type="email"] { - padding: 0.8rem; - font-size: 1rem; - border: none; - border-radius: 5px; - width: 300px; -} - -.contributor-notification { - background-color: #4CAF50; - color: white; - padding: 1rem; - border-radius: 5px; - margin-top: 1rem; -} - -.contributor-hidden { - display: none; -} - -/* Responsive Design */ -@media (max-width: 768px) { - .contributor-hero h1 { - font-size: 2.5rem; - } - - .contributor-hero p { - font-size: 1.2rem; - } - - .contributor-cta form { - flex-direction: column; - align-items: center; - } - - .contributor-cta input[type="email"] { - width: 100%; - max-width: 300px; - } -} \ No newline at end of file diff --git a/contributor/contributor.html b/contributor/contributor.html deleted file mode 100644 index 4a7cd4c8..00000000 --- a/contributor/contributor.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - BuddyTrail Contributors - - - - - - - -
- -
-
- -
-
-

Welcome to BuddyTrail

-

Empowering writers, one commit at a time

- -
-
- - -
-

Project Statistics

-
- -
-
- - -
-

Meet Our Contributors

-
- -
-
-
-
-
- - -
-

Ready to Make an Impact?

-

Join our community and help shape the future of BuddyTrail.

-
- - -
-
-
-
- - - - - diff --git a/contributorss.css b/contributorss.css new file mode 100644 index 00000000..1069a641 --- /dev/null +++ b/contributorss.css @@ -0,0 +1,384 @@ +* { + + box-sizing: border-box; + margin: 0; + padding: 0; + color: white; + + } + + body { + + font-family: Arial, sans-serif; + line-height: 1.6; + color: #333; + background-color: hsl(215.29deg 89.47% 7.45%); + + } + + .contributor-container { + + margin: 0 auto; + + } + + /* Hero Section */ + .contributor-hero { + + background-image: url('https://images.unsplash.com/photo-1522071820081-009f0129c71c?auto=format&fit=crop&w=2850&q=80'); + background-size: cover; + background-position: center; + height: 70vh; + display: flex; + align-items: center; + justify-content: center; + text-align: center; + position: relative; + + } + + .contributor-hero::before { + + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.7); + + } + + .contributor-hero-content { + + position: relative; + z-index: 1; + color: #fff; + + } + + .contributor-hero h1 { + + font-size: 3.5rem; + margin-bottom: 1rem; + + } + + .contributor-hero p { + + font-size: 1.5rem; + margin-bottom: 2rem; + + } + + /* Buttons */ + .contributor-btn { + + display: inline-block; + padding: 0.8rem 1.5rem; + border: none; + border-radius: 5px; + font-size: 1rem; + cursor: pointer; + transition: background-color 0.3s ease; + + } + + .contributor-btn-primary { + + background-color: #fff; + color: #333; + + } + + .contributor-btn-primary:hover { + + background-color: #f0f0f0; + + } + + .contributor-btn-secondary { + + background-color: #021024; + color: #fff; + + } + + .contributor-btn-secondary:hover { + + background-color: #444; + + } + + /* Stats Section */ + .contributor-stats { + + max-width: 1200px; + margin: 0 auto; + padding: 4rem 0; + text-align: center; + background: hsl(215.29deg 89.47% 7.45%); + + } + + .contributor-stats h2 { + + font-size: 2rem; + margin-bottom: 2rem; + + } + + .contributor-stats-grid { + + display: grid; + grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); + gap: 2rem; + + } + + .contributor-stat-card { + + background-color: hsl(206.25deg 30.19% 20.78%); + border: 1px solid #33a0bb; + border-radius: 10px; + padding: 1.5rem; + text-align: center; + + } + + .contributor-stat-card .contributor-icon { + + font-size: 2rem; + margin-bottom: 1rem; + + } + + .contributor-stat-card h3 { + + font-size: 2rem; + margin-bottom: 0.5rem; + color: white; + + } + + .contributor-stat-card p { + + color: #ffffff; + + } + + /* Contributors Section */ + .contributor-contributors { + + max-width: 1200px; + margin: 0 auto; + padding: 4rem 0; + text-align: center; + background: hsl(215.29deg 89.47% 7.45%); + + } + + .contributor-contributors h2 { + + font-size: 2rem; + margin-bottom: 2rem; + + } + + .contributor-contributors-grid { + + display: grid; + grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + gap: 2rem; + + } + + .contributor-contributor-card { + + background-color: hsl(206.25deg 30.19% 20.78%); + border: 1px solid #33a0bb; + border-radius: 10px; + overflow: hidden; + transition: transform 0.3s ease, box-shadow 0.3s ease; + + } + + .contributor-contributor-card:hover { + + transform: translateY(-5px); + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); + + } + + .contributor-contributor-card img { + + width: 100px; + height: 100px; + border-radius: 50%; + margin: 1.5rem auto; + display: block; + border: 4px solid #33a0bb; + + } + + .contributor-contributor-card h3 { + + font-size: 1.2rem; + margin-bottom: 0.5rem; + + } + + .contributor-contributor-card p { + + color: #ffffff; + margin-bottom: 1rem; + + } + + .contributor-contributor-card .contributor-contributions { + + background-color: #33a0bb; + padding: 0.5rem 1rem; + border-radius: 20px; + display: inline-block; + margin-bottom: 1rem; + + } + + .contributor-contributor-card .contributor-footer { + + background-color: #33a0bb; + padding: 1rem; + display: flex; + justify-content: space-between; + align-items: center; + + } + + .contributor-contributor-card .contributor-footer a { + + color: #ffffff; + text-decoration: none; + display: flex; + align-items: center; + + } + + .contributor-contributor-card .contributor-footer svg { + + margin-right: 0.5rem; + + } + + /* Loading Spinner */ + .contributor-loading { + + display: flex; + justify-content: center; + align-items: center; + height: 200px; + + } + + .contributor-spinner { + + border: 4px solid #f3f3f3; + border-top: 4px solid #333; + border-radius: 50%; + width: 40px; + height: 40px; + animation: contributor-spin 1s linear infinite; + + } + + @keyframes contributor-spin { + + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } + + } + + /* Call to Action Section */ + .contributor-cta { + + background-color: #021024; + color: #fff; + padding: 4rem 0; + text-align: center; + + } + + .contributor-cta h2 { + + font-size: 2rem; + margin-bottom: 1rem; + + } + + .contributor-cta p { + + font-size: 1.2rem; + margin-bottom: 2rem; + + } + + .contributor-cta form { + + display: flex; + justify-content: center; + gap: 1rem; + margin-bottom: 1rem; + + } + + .contributor-cta input[type="email"] { + + padding: 0.8rem; + font-size: 1rem; + border: none; + border-radius: 5px; + width: 300px; + + } + + + .contributor-notification { + + background-color: #4CAF50; + color: white; + padding: 1rem; + border-radius: 5px; + margin-top: 1rem; + + } + + .contributor-hidden { + + display: none; + + } + + /* Responsive Design */ + @media (max-width: 768px) { + + .contributor-hero h1 { + font-size: 2.5rem; + } + + .contributor-hero p { + font-size: 1.2rem; + } + + .contributor-cta form { + flex-direction: column; + align-items: center; + } + + .contributor-cta input[type="email"] { + width: 100%; + max-width: 300px; + } + + } + + diff --git a/contributorss.html b/contributorss.html new file mode 100644 index 00000000..0b368570 --- /dev/null +++ b/contributorss.html @@ -0,0 +1,72 @@ + + + + + + + BuddyTrail + + + + + + + + + + Home + + + + +
+

Project Statistics

+
+ +
+
+ + +
+

Meet Our Contributors

+
+ +
+
+
+
+
+ + +
+

+

+
+ + +
+
+
+ + + + + + + \ No newline at end of file diff --git a/contributorss.js b/contributorss.js new file mode 100644 index 00000000..53d81dc5 --- /dev/null +++ b/contributorss.js @@ -0,0 +1,130 @@ +// Fetch data from GitHub API +async function fetchData() { + try { + const contributors = []; + let page = 1; + let totalContributions = 0; + + // Fetch all contributors with pagination + while (true) { + const contributorsResponse = await fetch(`https://api.github.com/repos/PriyaGhosal/BuddyTrail/contributors?per_page=100&page=${page}`); + const contributorsData = await contributorsResponse.json(); + + console.log(`Page ${page} contributors:`, contributorsData); // Log contributors data + + if (contributorsData.length === 0) break; // Exit loop if no more contributors + + contributors.push(...contributorsData); + totalContributions += contributorsData.reduce((sum, contributor) => sum + contributor.contributions, 0); + page++; + } + + const repoResponse = await fetch('https://api.github.com/repos/PriyaGhosal/BuddyTrail'); + const repoData = await repoResponse.json(); + + return { contributors, repoStats: { ...repoData, totalContributions } }; + } catch (error) { + console.error('Error fetching data:', error); + return { contributors: [], repoStats: {} }; + } +} + + +// Render stats +function renderStats(repoStats, contributorsCount) { + const statsGrid = document.getElementById('statsGrid'); + const stats = [ + { label: 'Contributors', value: contributorsCount, icon: 'users' }, + { label: 'Total Contributions', value: repoStats.totalContributions || 0, icon: 'git-commit' }, // Use totalContributions + { label: 'GitHub Stars', value: repoStats.stargazers_count || 0, icon: 'star' }, + { label: 'Forks', value: repoStats.forks_count || 0, icon: 'git-branch' } + ]; + + statsGrid.innerHTML = stats.map(stat => ` +
+
${getIcon(stat.icon)}
+

${stat.value}

+

${stat.label}

+
+ `).join(''); +} + + +// Render contributors +function renderContributors(contributors) { + const contributorsGrid = document.getElementById('contributorsGrid'); + contributorsGrid.innerHTML = contributors.map(contributor => ` +
+ ${contributor.login} +

${contributor.login}

+

${contributor.type}

+
${contributor.contributions} contributions
+ +
+ `).join(''); +} + + +// Helper function to get icons (simplified version) +function getIcon(name) { + const icons = { + 'users': '', + 'git-commit': '', + 'star': '', + 'git-branch': '', + 'external-link': '', + 'github': '' + }; + return icons[name] || ''; +} + + +// Initialize the page +async function init() { + const loading = document.getElementById('loading'); + const contributorsGrid = document.getElementById('contributorsGrid'); + + loading.style.display = 'flex'; + contributorsGrid.style.display = 'none'; + + const { contributors, repoStats } = await fetchData(); + + renderStats(repoStats, contributors.length); // Pass the correct parameters + renderContributors(contributors); + + loading.style.display = 'none'; + contributorsGrid.style.display = 'grid'; +} + + +// Handle form submission +document.getElementById('subscribeForm').addEventListener('submit', function(e) { + e.preventDefault(); + const email = document.getElementById('emailInput').value; + const notification = document.getElementById('notification'); + + notification.textContent = `Thank you for subscribing with ${email}. We'll keep you updated!`; + notification.classList.remove('hidden'); + + document.getElementById('emailInput').value = ''; + + setTimeout(() => { + notification.classList.add('hidden'); + }, 5000); +}); + + +// Scroll to contribute section +function scrollToContribute() { + document.getElementById('contribute').scrollIntoView({ behavior: 'smooth' }); +} + + +// Initialize the page when the DOM is loaded +document.addEventListener('DOMContentLoaded', init); \ No newline at end of file diff --git a/index.html b/index.html index c474e876..6ec10ec7 100644 --- a/index.html +++ b/index.html @@ -2739,7 +2739,7 @@

Quick Links

  • Services
  • Contact
  • Team
  • - Our Contributors + Our Contributors