forked from CSE-CLOUD/githober2023
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
139 lines (117 loc) · 4.27 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!doctype html>
<html>
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<title>Contributors</title>
<link href='https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/css/bootstrap.min.css' rel='stylesheet'>
<link href='https://use.fontawesome.com/releases/v5.8.1/css/all.css' rel='stylesheet'>
<style>
.card-img-top {
max-height: 250px;
overflow: hidden;
}
.card-title a:link {
font-size: 30px;
background-color: transparent;
color: #000000;
text-decoration: none;
}
.card-title a:hover {
color: red;
background-color: transparent;
text-decoration: underline;
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
background-color: #f8f9fa;
}
.header img {
width: auto;
max-height: 60px; /* Set the maximum height you want */
display: block;
margin-right: auto;
}
.header-text {
margin-left: 40%;
margin-right: 5%;
}
/* Responsive styles for header */
@media (max-width: 767px) {
.header {
flex-direction: column;
text-align: center;
}
.header img {
width: auto;
max-height: 60px; /* Set the maximum height you want */
display: block;
margin-left: auto;
margin-right: auto;
}
.header-text {
margin-left: 0;
margin-top: 10px;
}
}
</style>
<script type='text/javascript' src=''></script>
<script type='text/javascript' src='https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js'></script>
<script type='text/javascript' src='https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/js/bootstrap.min.js'></script>
</head>
<body oncontextmenu='return false' class='snippet-body'>
<div class="header">
<!-- Hacktoberfest Logo -->
<a href="https://hacktoberfest.digitalocean.com/" target="_blank">
<img src="./hacktoberfest_logo.png" alt="Hacktoberfest Logo">
</a>
<!-- Header Text -->
<div class="header-text">
<h1>PARTICIPANTS</h1>
</div>
</div>
<section class="bg-light py-4 my-5">
<div class="container">
<div class="row" id="cardContainer">
<!-- Cards will be dynamically added here -->
</div>
</div>
</section>
<script src="contributors.js"></script>
<script>
const cardContainer = document.getElementById('cardContainer');
contributors.forEach(contributor => {
const cardCol = document.createElement('div');
cardCol.className = 'col-md-6 col-lg-4';
const card = document.createElement('div');
card.className = 'card my-3';
const img = document.createElement('img');
img.src = contributor.imgSrc;
img.className = 'card-img-top';
img.alt = 'thumbnail';
const cardBody = document.createElement('div');
cardBody.className = 'card-body';
const cardTitle = document.createElement('h3');
cardTitle.className = 'card-title';
const titleLink = document.createElement('a');
titleLink.href = contributor.github; // Link to GitHub
titleLink.target = '_blank'; // Open in new tab
titleLink.className = 'text-secondary';
titleLink.textContent = contributor.title;
cardTitle.appendChild(titleLink);
const cardText = document.createElement('p');
cardText.className = 'card-text';
cardText.textContent = contributor.description;
cardBody.appendChild(cardTitle);
cardBody.appendChild(cardText);
card.appendChild(img);
card.appendChild(cardBody);
cardCol.appendChild(card);
cardContainer.appendChild(cardCol);
});
</script>
</body>
</html>