Skip to content

Commit

Permalink
Merge branch 'main' into Contributors
Browse files Browse the repository at this point in the history
  • Loading branch information
Subhajit-2023-44 authored Oct 25, 2024
2 parents ce0df5d + bbe213d commit 31ff158
Show file tree
Hide file tree
Showing 14 changed files with 2,528 additions and 306 deletions.
10 changes: 10 additions & 0 deletions contributor/contributor.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Fetch data from GitHub API
async function fetchData() {
Contributors
try {
const contributors = [];
let page = 1;
Expand Down Expand Up @@ -43,10 +44,12 @@ async function fetchData() {
console.error('Error fetching data:', error);
return { contributors: [], repoStats: {}, totalContributions: 0 }; // Default value
}
main
}

// Render stats
function renderStats(repoStats, contributorsCount, totalContributions) {
Contributors
const statsGrid = document.getElementById('statsGrid');
const stats = [
{ label: 'Contributors', value: contributorsCount, icon: 'users' },
Expand All @@ -62,10 +65,12 @@ function renderStats(repoStats, contributorsCount, totalContributions) {
<p>${stat.label}</p>
</div>
`).join('');
main
}

// Render contributors
function renderContributors(contributors) {
Contributors
const contributorsGrid = document.getElementById('contributorsGrid');
contributorsGrid.innerHTML = contributors.map(contributor => `
<div class="contributor-contributor-card">
Expand All @@ -82,10 +87,12 @@ function renderContributors(contributors) {
</div>
</div>
`).join('');
main
}

// Helper function to get icons (simplified version)
function getIcon(name) {
Contributors
const icons = {
'users': '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg>',
'git-commit': '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="4"></circle><line x1="1.05" y1="12" x2="7" y2="12"></line><line x1="17.01" y1="12" x2="22.96" y2="12"></line></svg>',
Expand All @@ -95,10 +102,12 @@ function getIcon(name) {
'github': '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path></svg>'
};
return icons[name] || '';
main
}

// Initialize the page
async function init() {
Contributors
const loading = document.getElementById('loading');
const contributorsGrid = document.getElementById('contributorsGrid');

Expand Down Expand Up @@ -137,3 +146,4 @@ function scrollToContribute() {

// Initialize the page when the DOM is loaded
document.addEventListener('DOMContentLoaded', init);
main
37 changes: 21 additions & 16 deletions cookie-popup.css
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
.cookie-container {
position: fixed;
bottom: 80px;
left: 20px;
background-color: white;
border: 1px solid #ccc;
padding: 13px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
z-index: 1000;
width: 220px;
height: 220px;
display: none;
font-size: 10px;
font-weight: 400;
position: fixed;
max-width: 320px;
padding: 1rem !important;
background-color: #fff;
border-radius: 10px;
box-shadow: 20px 20px 30px rgba(0, 0, 0, .05);
bottom: 4em;
right: 5em;
z-index: 9999999;
}

#cookie-title{
font-weight: 600;
color: rgb(31 41 55);
}

.cookie-container p {
margin: 10px 0;
color: black;
.cookie-description {
margin-top: 1rem !important;
font-size: 1.12rem;
line-height: 1.25rem;
color: rgb(75 85 99);
}

.cookie-container a {
.cookie-description a {
color: #007bff;
text-decoration: none;
}
Expand All @@ -32,6 +36,7 @@
display: flex;
justify-content: space-between;
margin-top: 15px;
margin-bottom: 10px;
}

.button-container button {
Expand Down
Loading

0 comments on commit 31ff158

Please sign in to comment.