diff --git a/assets/about/about.html b/assets/about/about.html index e1f4baf..b557cf0 100644 --- a/assets/about/about.html +++ b/assets/about/about.html @@ -29,6 +29,7 @@
  • About
  • Upcoming Events
  • Past Events
  • +
  • Contributors
  • Contact
  • diff --git a/assets/contact/contact.html b/assets/contact/contact.html index cd3cff9..1c8ed5b 100644 --- a/assets/contact/contact.html +++ b/assets/contact/contact.html @@ -29,6 +29,7 @@
  • About
  • Upcoming Events
  • Past Events
  • +
  • Contributors
  • Contact
  • diff --git a/assets/contributors/contributor.css b/assets/contributors/contributor.css new file mode 100644 index 0000000..19a7413 --- /dev/null +++ b/assets/contributors/contributor.css @@ -0,0 +1,88 @@ +body { + margin: 0; + font-family: 'Poppins', sans-serif; + background-color: #f7f8fa; + color: #333; + line-height: 1.6; +} + +.ctnr { + text-align: center; + max-width: 1200px; + width: 100%; + padding: 35px; + margin: 0 auto; + display: flex; + flex-direction: column; + align-items: center; +} + +h1 { + font-size: 3rem; + color: #1da1f2; + margin-top: 100px; + margin-bottom: 30px; + font-weight: bold; + letter-spacing: 2px; +} + +.contributors-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); + gap: calc(10px + 1vw); + justify-items: center; + align-items: center; + width: 100%; +} + +/* Contributor card Css */ + +.contributor-card { + background: #ffffff; + color: #333; + border-radius: 15px; + padding: 20px; + width: 250px; + box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1); + text-align: center; + transition: transform 0.3s ease, box-shadow 0.3s ease; + position: relative; +} + +.contributor-card:hover { + transform: translateY(-10px); + box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2); +} + +.contributor-card img { + width: 100px; + height: 100px; + border-radius: 50%; + border: 3px solid #1da1f2; + margin-bottom: 15px; +} + +.contributor-card h3 { + font-size: 1.4rem; + margin: 10px 0; +} + +.contributor-card a { + display: inline-block; + margin: 5px 0; + color: #1da1f2; + font-weight: bold; + text-decoration: none; + transition: color 0.3s ease; +} + +.contributor-card a:hover { + color: #004e64; + text-decoration: none; +} + +@media (min-width: 768px) { + .contributors-grid { + gap: calc(10px + 1.5vw); + } +} \ No newline at end of file diff --git a/assets/contributors/contributor.html b/assets/contributors/contributor.html new file mode 100644 index 0000000..b1c3fb9 --- /dev/null +++ b/assets/contributors/contributor.html @@ -0,0 +1,83 @@ + + + + + + + + + + + + Eventica | Contributors + + + + + + + +
    +

    Meet Our Contributors

    +
    +
    + + +
    + +
    + + + + + + + + + + + \ No newline at end of file diff --git a/assets/contributors/contributor.js b/assets/contributors/contributor.js new file mode 100644 index 0000000..55dd78c --- /dev/null +++ b/assets/contributors/contributor.js @@ -0,0 +1,65 @@ +const REPO_OWNER = "Rakesh9100"; +const REPO_NAME = "Eventica"; +const GITHUB_TOKEN = ""; // Optional: Add your GitHub personal access token to avoid rate limits + +async function fetchContributors() { + const contributorsContainer = document.getElementById("contributors"); + + try { + // Fetch contributors from the GitHub API + const response = await fetch( + `https://api.github.com/repos/${REPO_OWNER}/${REPO_NAME}/contributors`, { + headers: GITHUB_TOKEN ? { + Authorization: `token ${GITHUB_TOKEN}` + } : {}, + } + ); + + if (!response.ok) throw new Error("Failed to fetch contributors"); + + const contributors = await response.json(); + // Filter out the repository owner + const filteredContributors = contributors.filter( + (contributor) => contributor.login !== REPO_OWNER + ); + + filteredContributors.forEach((contributor) => { + // Create a card for each contributor + const card = document.createElement("div"); + card.className = "contributor-card"; + + // Profile image + const img = document.createElement("img"); + img.src = contributor.avatar_url; + img.alt = contributor.login; + + // GitHub username + const name = document.createElement("h3"); + name.textContent = contributor.login; + + // GitHub profile link + const githubLink = document.createElement("a"); + githubLink.href = contributor.html_url; + githubLink.target = "_blank"; + githubLink.textContent = "GitHub Profile"; + + // Append elements to card + card.appendChild(img); + card.appendChild(name); + card.appendChild(githubLink); + + // Append card to container + contributorsContainer.appendChild(card); + }); + } catch (error) { + console.error("Error fetching contributors:", error); + + // Show error message on the page + const errorMessage = document.createElement("p"); + errorMessage.textContent = "Failed to load contributors. Please try again."; + contributorsContainer.appendChild(errorMessage); + } +} + +// Fetch and render contributors on page load +fetchContributors(); \ No newline at end of file diff --git a/assets/pastevents/pastevents.html b/assets/pastevents/pastevents.html index 36c9684..ddb7065 100644 --- a/assets/pastevents/pastevents.html +++ b/assets/pastevents/pastevents.html @@ -35,6 +35,7 @@
  • About
  • Upcoming Events
  • Past Events
  • +
  • Contributors
  • Contact
  • diff --git a/index.html b/index.html index 7b1bec1..048975f 100644 --- a/index.html +++ b/index.html @@ -40,6 +40,7 @@
  • About
  • Upcoming Events
  • Past Events
  • +
  • Contributors
  • Contact