diff --git a/arrow_upper.png b/arrow_upper.png new file mode 100644 index 00000000..3ca22f21 Binary files /dev/null and b/arrow_upper.png differ diff --git a/auth.html b/auth.html index ee38dc8e..3045c9d3 100644 --- a/auth.html +++ b/auth.html @@ -30,10 +30,10 @@
diff --git a/contact.html b/contact.html index 628ae610..c5df49cb 100644 --- a/contact.html +++ b/contact.html @@ -204,9 +204,7 @@
diff --git a/contributor/contributor.css b/contributor/contributor.css index aa00ec6d..559f7f8d 100644 --- a/contributor/contributor.css +++ b/contributor/contributor.css @@ -1,291 +1,291 @@ * { - 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) { + 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: 2.5rem; + font-size: 3.5rem; + margin-bottom: 1rem; } - + .contributor-hero p { - font-size: 1.2rem; + 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 { - flex-direction: column; - align-items: center; + display: flex; + justify-content: center; + gap: 1rem; + margin-bottom: 1rem; } - + .contributor-cta input[type="email"] { - width: 100%; - max-width: 300px; + 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; } -} \ No newline at end of file + + /* 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 index 4a7cd4c8..30282d4e 100644 --- a/contributor/contributor.html +++ b/contributor/contributor.html @@ -1,3 +1,4 @@ +
diff --git a/contributor/contributor.js b/contributor/contributor.js index 6aab8ba0..4ff0ea2e 100644 --- a/contributor/contributor.js +++ b/contributor/contributor.js @@ -1,143 +1,149 @@ // Fetch data from GitHub API async function fetchData() { - try { - const contributorsResponse = await fetch( - "https://api.github.com/repos/PriyaGhosal/BuddyTrail/contributors" - ); - const contributorsData = await contributorsResponse.json(); - - const repoResponse = await fetch( - "https://api.github.com/repos/PriyaGhosal/BuddyTrail" - ); - const repoData = await repoResponse.json(); - - return { contributors: contributorsData, repoStats: repoData }; - } catch (error) { - console.error("Error fetching data:", error); - return { contributors: [], repoStats: {} }; - } +Contributors + try { + const contributors = []; + let page = 1; + let totalContributions = 0; // Initialize total contributions + let moreContributors = true; + + // Fetch contributors in a loop until no more pages + while (moreContributors) { + const response = await fetch(`https://api.github.com/repos/PriyaGhosal/BuddyTrail/contributors?per_page=100&page=${page}`); + + // Check for rate limiting + if (response.status === 403) { + console.warn('Rate limit exceeded. Waiting for reset...'); + const resetTime = response.headers.get('X-RateLimit-Reset') * 1000; // Convert to milliseconds + const waitTime = resetTime - Date.now(); + if (waitTime > 0) { + await new Promise(resolve => setTimeout(resolve, waitTime)); // Wait until rate limit resets + } + continue; // Retry the request after waiting + } + + if (!response.ok) throw new Error('Failed to fetch contributors'); + const data = await response.json(); + + if (data.length > 0) { + contributors.push(...data); + // Accumulate contributions + totalContributions += data.reduce((sum, contributor) => sum + contributor.contributions, 0); + page++; + } else { + moreContributors = false; // No more contributors to fetch + } + } + + const repoResponse = await fetch('https://api.github.com/repos/PriyaGhosal/BuddyTrail'); + if (!repoResponse.ok) throw new Error('Failed to fetch repo data'); + const repoData = await repoResponse.json(); + + return { contributors, repoStats: repoData, totalContributions }; // Return total contributions + } catch (error) { + console.error('Error fetching data:', error); + return { contributors: [], repoStats: {}, totalContributions: 0 }; // Default value + } + main } // Render stats function renderStats(repoStats, contributorsCount, totalContributions) { - const statsGrid = document.getElementById("statsGrid"); - const stats = [ - { label: "Contributors", value: contributorsCount, icon: "users" }, - { - label: "Total Contributions", - value: totalContributions, - icon: "git-commit", - }, - { - 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) => ` -
${stat.label}
-- ` - ) - .join(""); +Contributors + const statsGrid = document.getElementById('statsGrid'); + const stats = [ + { label: 'Contributors', value: contributorsCount, icon: 'users' }, + { label: 'Total Contributions', value: totalContributions, icon: 'git-commit' }, // Use total contributions + { 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 => ` +
${stat.label}
++ `).join(''); + main } // Render contributors function renderContributors(contributors) { - const contributorsGrid = document.getElementById("contributorsGrid"); - contributorsGrid.innerHTML = contributors - .map( - (contributor) => ` -
${contributor.type}
-- ` - ) - .join(""); +Contributors + const contributorsGrid = document.getElementById('contributorsGrid'); + contributorsGrid.innerHTML = contributors.map(contributor => ` +
${contributor.type}
++ `).join(''); +main } // Helper function to get icons (simplified version) function getIcon(name) { - const icons = { - users: - '', - "git-commit": - '', - star: '', - "git-branch": - '', - "external-link": - '', - github: - '', - }; - return icons[name] || ""; + Contributors + const icons = { + 'users': '', + 'git-commit': '', + 'star': '', + 'git-branch': '', + 'external-link': '', + 'github': '' + }; + return icons[name] || ''; +main } // Initialize the page async function init() { - const loading = document.getElementById("loading"); - const contributorsGrid = document.getElementById("contributorsGrid"); +Contributors + const loading = document.getElementById('loading'); + const contributorsGrid = document.getElementById('contributorsGrid'); - loading.style.display = "flex"; - contributorsGrid.style.display = "none"; + loading.style.display = 'flex'; + contributorsGrid.style.display = 'none'; - const { contributors, repoStats } = await fetchData(); - const totalContributions = contributors.reduce( - (sum, contributor) => sum + contributor.contributions, - 0 - ); + const { contributors, repoStats, totalContributions } = await fetchData(); // Get total contributions - renderStats(repoStats, contributors.length, totalContributions); - renderContributors(contributors); + renderStats(repoStats, contributors.length, totalContributions); // Pass total contributions + renderContributors(contributors); - loading.style.display = "none"; - contributorsGrid.style.display = "grid"; + loading.style.display = 'none'; + contributorsGrid.style.display = 'grid'; } // Handle form submission -document - .getElementById("subscribeForm") - .addEventListener("submit", function (e) { +document.getElementById('subscribeForm').addEventListener('submit', function(e) { e.preventDefault(); - const email = document.getElementById("emailInput").value; - const notification = document.getElementById("notification"); - + 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 = ""; - + notification.classList.remove('hidden'); + + document.getElementById('emailInput').value = ''; + setTimeout(() => { - notification.classList.add("hidden"); + notification.classList.add('hidden'); }, 5000); - }); +}); // Scroll to contribute section function scrollToContribute() { - document.getElementById("contribute").scrollIntoView({ behavior: "smooth" }); + document.getElementById('contribute').scrollIntoView({ behavior: 'smooth' }); } // Initialize the page when the DOM is loaded -document.addEventListener("DOMContentLoaded", init); +document.addEventListener('DOMContentLoaded', init); +main diff --git a/img/Microsoft_Logo.png b/img/Microsoft_Logo.png new file mode 100644 index 00000000..c9476a74 Binary files /dev/null and b/img/Microsoft_Logo.png differ diff --git a/img/df1.jpg b/img/df1.jpg new file mode 100644 index 00000000..63df83f7 Binary files /dev/null and b/img/df1.jpg differ diff --git a/img/df2.jpg b/img/df2.jpg new file mode 100644 index 00000000..9aa82978 Binary files /dev/null and b/img/df2.jpg differ diff --git a/index.html b/index.html index 43795023..9381455f 100644 --- a/index.html +++ b/index.html @@ -506,8 +506,6 @@
- -
@@ -1578,7 +1576,7 @@
.recommendation-item p { color: #555555; - font-size: 1.1rem; + font-size: 1.5rem; margin-bottom: 20px; } @@ -1591,6 +1589,7 @@
border-radius: 6px; cursor: pointer; transition: background-color 0.3s ease, transform 0.3s ease; + font-size: 1.5rem; } .recommendation-item button:hover { @@ -2122,1398 +2121,6 @@
margin-top: 20px;
}
}
-
-
-
- Click on the markers to learn more about each destination.Explore Popular Destinations
-
`, - }); - - marker.addListener("click", () => { - infowindow.open(map, marker); - }); - }); - } - - - + + + + - -
-