-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
192 lines (163 loc) · 8.74 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> Josh Innovation Lab</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-gray-100">
<nav class="bg-white sticky">
<div class="max-w-screen-xl flex flex-wrap items-center justify-between mx-auto p-4">
<a href="https://flowbite.com/" class="flex items-center space-x-3 rtl:space-x-reverse">
<img src="./assets/img/Joshlogo.png" class="h-8" alt="Josh Software Logo" />
<span class="self-center text-2xl font-bold whitespace-nowrap pt-2">Innovation Lab</span>
</a>
</div>
</nav>
<div>
<div class="container mx-auto px-4 pt-12 pb-8">
<h2 class="text-2xl font-semibold mb-4">Welcome to Josh Innovation Lab</h2>
<p class="text-justify mb-8">
At Josh Innovation Lab, we’re pushing the boundaries of technology to drive meaningful innovation. Our team is dedicated to exploring and experimenting with cutting-edge solutions, tackling complex challenges beyond our everyday work. From conversational AI to computer vision and eKYC deepfake detection, we are currently working on a variety of AI-driven projects aimed at transforming industries and creating a smarter future. By blending creativity with technical expertise, we bring visionary ideas to life and shape the technology landscape of tomorrow.
</p>
<h4 class="text-2xl font-semibold mb-4">Schedule</h4>
<p class="text-justify">
We gather every Tuesdays and Thursdays between 10am and 12pm. Alternate Saturdays between 11am and 2pm.
</p>
</div>
</div>
<div class="container mx-auto px-4 pt-8 pb-8">
<div class="mb-8">
<div class="flex space-x-4 mb-4">
<button id="btn-ongoing" class="btn-selector bg-blue-500 text-white px-4 py-2 rounded" onclick="showTab('ongoing')">Ongoing Projects</button>
<button id="btn-completed" class="btn-selector bg-gray-500 text-white px-4 py-2 rounded" onclick="showTab('completed')">Completed Projects</button>
<button id="btn-planned" class="btn-selector bg-gray-500 text-white px-4 py-2 rounded" onclick="showTab('planned')">Planned Projects</button>
</div>
<div id="ongoing" class="tab-content">
<h2 class="text-2xl font-semibold mb-4">Ongoing Projects</h2>
<div id="projects_container_ongoing" class="space-y-4"></div>
</div>
<div id="completed" class="tab-content hidden">
<h2 class="text-2xl font-semibold mb-4">Completed Projects</h2>
<div id="projects_container_completed" class="space-y-4"></div>
</div>
<div id="planned" class="tab-content hidden">
<h2 class="text-2xl font-semibold mb-4">Planned Projects</h2>
<div id="projects_container_planned" class="space-y-4"></div>
</div>
</div>
<div class="mb-8">
<h2 class="text-2xl font-semibold mb-4">Active Contributors</h2>
<div id="members_container" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"></div>
</div>
<div class="text-center">
<a id="join_team_link" href="#" target="_BLANK" class="bg-blue-600 text-white px-6 py-3 rounded-full text-xl font-semibold hover:bg-purple-700 transition duration-300">Join the Team</a>
</div>
</div>
<script>
function showTab(tabId) {
document.querySelectorAll('.tab-content').forEach(tab => tab.classList.add('hidden'));
document.getElementById(tabId).classList.remove('hidden');
document.querySelectorAll('.btn-selector').forEach(btn => {
btn.classList.add('bg-gray-500');
btn.classList.remove('bg-blue-500', 'bg-green-500', 'bg-yellow-500');
});
const activeBtn = document.getElementById(`btn-${tabId}`);
activeBtn.classList.remove('bg-gray-500')
activeBtn.classList.add('bg-blue-500');
}
showTab('ongoing');
function getMemberHTML(member,designation) {
return `
<a href="https://github.com/${member.github}" target="_BLANK" class="bg-white p-3 rounded shadow flex items-center cursor-pointer hover:shadow-lg hover:border-solid">
<img src="https://github.com/${member.github}.png" alt="${member.name}" class="w-16 h-16 rounded-full mr-4">
<div>
<h3 class="text-lg font-semibold">${member.name}</h3>
<p class="text-sm">${designation}</p>
</div>
</a>
`;
}
function renderProjects(containerElementId, projects, members) {
projects.forEach(project => {
const container = document.getElementById(containerElementId);
const projectDiv = document.createElement('div');
roles = project.roles;
var divContent = ``;
divContent +=
`
<div class="flex flex-col items-start bg-white p-4 rounded shadow">
<h3 class="text-xl font-semibold">${project.name}</h3>
<p class="mb-4">${project.description}</p>
<h3>Tech:</h3>
<p>
<div class="mb-2">
${project.tech}
</div>
</p>
<h3>Team:</h3>
<p class="mb-2">
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 w-full">
`;
project.team.forEach(memberId => {
const member = members.find((m) => m.id === memberId);
role = roles[memberId];
if (member) {
divContent += getMemberHTML(member, role);
}
});
divContent +=
`
</div>
</p>
<div class="grid grid-cols-1 grid-cols-2 gap-4">`;
if(project.repo){
divContent +=`<a href="${project.repo}" target="_BLANK" class="bg-blue-500 rounded-full text-white px-6 py-2 rounded text-sm mt-4 w-32">View Details</a>`;
}
if(project.demo){
divContent +=`<a href="${project.demo}" target="_BLANK" class="bg-blue-500 rounded-full text-white px-6 py-2 rounded text-sm mt-4 w-32">View Demo</a>`;
}
divContent +=`</div>
</p>
</div>
`;
projectDiv.innerHTML = divContent;
container.appendChild(projectDiv);
});
}
function renderMembers(members) {
const container = document.getElementById("members_container");
members.forEach(member => {
if (member.active) {
const memberDiv = document.createElement('div');
const divContent = getMemberHTML(member, member.designation);
memberDiv.innerHTML = divContent;
container.appendChild(memberDiv);
}
});
}
function renderAllData() {
fetch('data/data.json')
.then(response => response.json())
.then(data => {
renderProjects("projects_container_ongoing", data.projects.ongoing, data.members);
renderProjects("projects_container_completed", data.projects.completed, data.members);
renderProjects("projects_container_planned", data.projects.planned, data.members);
renderMembers(sortMembersByName(data.members));
setJoinFormLink(data.join_link);
})
.catch(error => {
console.error('Error:', error);
});
}
function sortMembersByName(members) {
return members.sort((a, b) => a.name.localeCompare(b.name));
}
function setJoinFormLink(link) {
document.getElementById("join_team_link").href = link;
}
renderAllData();
</script>
</body>
</html>