Update index.html
Browse files- index.html +46 -91
index.html
CHANGED
|
@@ -152,12 +152,11 @@
|
|
| 152 |
|
| 153 |
.toggle-container {
|
| 154 |
display: flex;
|
|
|
|
| 155 |
gap: 8px;
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
display: flex;
|
| 160 |
-
gap: 8px;
|
| 161 |
}
|
| 162 |
|
| 163 |
.toggle-button {
|
|
@@ -168,6 +167,8 @@
|
|
| 168 |
font-size: 13px;
|
| 169 |
cursor: pointer;
|
| 170 |
transition: all 0.2s ease;
|
|
|
|
|
|
|
| 171 |
}
|
| 172 |
|
| 173 |
.toggle-button.active {
|
|
@@ -176,15 +177,32 @@
|
|
| 176 |
color: white;
|
| 177 |
}
|
| 178 |
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 186 |
}
|
| 187 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 188 |
.counter-container {
|
| 189 |
text-align: center;
|
| 190 |
padding: 15px;
|
|
@@ -202,40 +220,6 @@
|
|
| 202 |
margin: 0 10px;
|
| 203 |
color: #ddd;
|
| 204 |
}
|
| 205 |
-
|
| 206 |
-
.nested-dropdown {
|
| 207 |
-
position: relative;
|
| 208 |
-
display: inline-block;
|
| 209 |
-
}
|
| 210 |
-
|
| 211 |
-
.nested-content {
|
| 212 |
-
display: none;
|
| 213 |
-
position: absolute;
|
| 214 |
-
background-color: white;
|
| 215 |
-
min-width: 160px;
|
| 216 |
-
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
| 217 |
-
z-index: 1;
|
| 218 |
-
border-radius: 5px;
|
| 219 |
-
margin-top: 5px;
|
| 220 |
-
}
|
| 221 |
-
|
| 222 |
-
.nested-content button {
|
| 223 |
-
width: 100%;
|
| 224 |
-
padding: 8px 16px;
|
| 225 |
-
border: none;
|
| 226 |
-
background: none;
|
| 227 |
-
text-align: left;
|
| 228 |
-
cursor: pointer;
|
| 229 |
-
font-size: 13px;
|
| 230 |
-
}
|
| 231 |
-
|
| 232 |
-
.nested-content button:hover {
|
| 233 |
-
background-color: #f1f1f1;
|
| 234 |
-
}
|
| 235 |
-
|
| 236 |
-
.nested-dropdown:hover .nested-content {
|
| 237 |
-
display: block;
|
| 238 |
-
}
|
| 239 |
</style>
|
| 240 |
</head>
|
| 241 |
<body>
|
|
@@ -248,31 +232,19 @@
|
|
| 248 |
<button class="toggle-button" data-filter="open-source">Open Source</button>
|
| 249 |
<button class="toggle-button" data-filter="proprietary">Proprietary Software</button>
|
| 250 |
</div>
|
| 251 |
-
<div class="
|
| 252 |
-
<
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
<button onclick="filterByModality('image')">Image</button>
|
| 265 |
-
<button onclick="filterByModality('utility')">Utility</button>
|
| 266 |
-
<button onclick="filterByModality('predict')">Predict</button>
|
| 267 |
-
<button onclick="filterByModality('game')">Game</button>
|
| 268 |
-
<button onclick="filterByModality('education')">Education</button>
|
| 269 |
-
</div>
|
| 270 |
-
</div>
|
| 271 |
-
<select id="typeFilter" onchange="filterByType(this.value)">
|
| 272 |
-
<option value="all">All Types</option>
|
| 273 |
-
<option value="model">Models</option>
|
| 274 |
-
<option value="announcement">Announcements</option>
|
| 275 |
-
</select>
|
| 276 |
</div>
|
| 277 |
</div>
|
| 278 |
<div class="counter-container">
|
|
@@ -322,18 +294,7 @@
|
|
| 322 |
type: 'all'
|
| 323 |
};
|
| 324 |
|
| 325 |
-
function
|
| 326 |
-
currentFilters.modality = modality;
|
| 327 |
-
document.getElementById('modalityFilter').value = 'all';
|
| 328 |
-
applyFilters();
|
| 329 |
-
}
|
| 330 |
-
|
| 331 |
-
function filterByType(type) {
|
| 332 |
-
currentFilters.type = type;
|
| 333 |
-
applyFilters();
|
| 334 |
-
}
|
| 335 |
-
|
| 336 |
-
function filterEvents(category) {
|
| 337 |
const buttons = document.querySelectorAll('.toggle-button');
|
| 338 |
buttons.forEach(button => {
|
| 339 |
button.classList.remove('active');
|
|
@@ -352,14 +313,8 @@
|
|
| 352 |
events.forEach(event => {
|
| 353 |
const matchesCategory = currentFilters.category === 'all' ||
|
| 354 |
event.querySelector(`.tag.${currentFilters.category}`);
|
| 355 |
-
const matchesModality = currentFilters.modality === 'all' ||
|
| 356 |
-
event.querySelector(`.tag.${currentFilters.modality}`);
|
| 357 |
-
const matchesType = currentFilters.type === 'all' ||
|
| 358 |
-
(currentFilters.type === 'announcement' ?
|
| 359 |
-
event.querySelector('.tag.announcement') :
|
| 360 |
-
!event.querySelector('.tag.announcement'));
|
| 361 |
|
| 362 |
-
event.style.display =
|
| 363 |
});
|
| 364 |
|
| 365 |
const months = document.querySelectorAll('.month');
|
|
@@ -377,7 +332,7 @@
|
|
| 377 |
const buttons = document.querySelectorAll('.toggle-button');
|
| 378 |
buttons.forEach(button => {
|
| 379 |
button.addEventListener('click', function() {
|
| 380 |
-
|
| 381 |
});
|
| 382 |
});
|
| 383 |
updateCounts();
|
|
|
|
| 152 |
|
| 153 |
.toggle-container {
|
| 154 |
display: flex;
|
| 155 |
+
flex-wrap: wrap;
|
| 156 |
gap: 8px;
|
| 157 |
+
justify-content: center;
|
| 158 |
+
max-width: 900px;
|
| 159 |
+
padding: 0 20px;
|
|
|
|
|
|
|
| 160 |
}
|
| 161 |
|
| 162 |
.toggle-button {
|
|
|
|
| 167 |
font-size: 13px;
|
| 168 |
cursor: pointer;
|
| 169 |
transition: all 0.2s ease;
|
| 170 |
+
min-width: 80px;
|
| 171 |
+
text-align: center;
|
| 172 |
}
|
| 173 |
|
| 174 |
.toggle-button.active {
|
|
|
|
| 177 |
color: white;
|
| 178 |
}
|
| 179 |
|
| 180 |
+
.category-group {
|
| 181 |
+
width: 100%;
|
| 182 |
+
display: flex;
|
| 183 |
+
justify-content: center;
|
| 184 |
+
gap: 8px;
|
| 185 |
+
margin-top: 10px;
|
| 186 |
+
flex-wrap: wrap;
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
.category-group .toggle-button {
|
| 190 |
+
background-color: #f5f5f5;
|
| 191 |
}
|
| 192 |
|
| 193 |
+
.toggle-button[data-filter="best"] { background-color: #FFD700; color: black; }
|
| 194 |
+
.toggle-button[data-filter="new"] { background-color: #FF4081; color: white; }
|
| 195 |
+
.toggle-button[data-filter="text"] { background-color: #9c27b0; color: white; }
|
| 196 |
+
.toggle-button[data-filter="audio"] { background-color: #ff9800; color: white; }
|
| 197 |
+
.toggle-button[data-filter="vision"] { background-color: #03a9f4; color: white; }
|
| 198 |
+
.toggle-button[data-filter="multimodal"] { background-color: #795548; color: white; }
|
| 199 |
+
.toggle-button[data-filter="video"] { background-color: #E91E63; color: white; }
|
| 200 |
+
.toggle-button[data-filter="image"] { background-color: #00BCD4; color: white; }
|
| 201 |
+
.toggle-button[data-filter="utility"] { background-color: #9E9E9E; color: white; }
|
| 202 |
+
.toggle-button[data-filter="predict"] { background-color: #673AB7; color: white; }
|
| 203 |
+
.toggle-button[data-filter="game"] { background-color: #4CAF50; color: white; }
|
| 204 |
+
.toggle-button[data-filter="education"] { background-color: #3F51B5; color: white; }
|
| 205 |
+
|
| 206 |
.counter-container {
|
| 207 |
text-align: center;
|
| 208 |
padding: 15px;
|
|
|
|
| 220 |
margin: 0 10px;
|
| 221 |
color: #ddd;
|
| 222 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 223 |
</style>
|
| 224 |
</head>
|
| 225 |
<body>
|
|
|
|
| 232 |
<button class="toggle-button" data-filter="open-source">Open Source</button>
|
| 233 |
<button class="toggle-button" data-filter="proprietary">Proprietary Software</button>
|
| 234 |
</div>
|
| 235 |
+
<div class="category-group">
|
| 236 |
+
<button class="toggle-button" data-filter="best">BEST</button>
|
| 237 |
+
<button class="toggle-button" data-filter="new">NEW</button>
|
| 238 |
+
<button class="toggle-button" data-filter="text">Text</button>
|
| 239 |
+
<button class="toggle-button" data-filter="audio">Audio</button>
|
| 240 |
+
<button class="toggle-button" data-filter="vision">Vision</button>
|
| 241 |
+
<button class="toggle-button" data-filter="multimodal">Multimodal</button>
|
| 242 |
+
<button class="toggle-button" data-filter="video">Video</button>
|
| 243 |
+
<button class="toggle-button" data-filter="image">Image</button>
|
| 244 |
+
<button class="toggle-button" data-filter="utility">Utility</button>
|
| 245 |
+
<button class="toggle-button" data-filter="predict">Predict</button>
|
| 246 |
+
<button class="toggle-button" data-filter="game">Game</button>
|
| 247 |
+
<button class="toggle-button" data-filter="education">Education</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 248 |
</div>
|
| 249 |
</div>
|
| 250 |
<div class="counter-container">
|
|
|
|
| 294 |
type: 'all'
|
| 295 |
};
|
| 296 |
|
| 297 |
+
function filterByCategory(category) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 298 |
const buttons = document.querySelectorAll('.toggle-button');
|
| 299 |
buttons.forEach(button => {
|
| 300 |
button.classList.remove('active');
|
|
|
|
| 313 |
events.forEach(event => {
|
| 314 |
const matchesCategory = currentFilters.category === 'all' ||
|
| 315 |
event.querySelector(`.tag.${currentFilters.category}`);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 316 |
|
| 317 |
+
event.style.display = matchesCategory ? 'block' : 'none';
|
| 318 |
});
|
| 319 |
|
| 320 |
const months = document.querySelectorAll('.month');
|
|
|
|
| 332 |
const buttons = document.querySelectorAll('.toggle-button');
|
| 333 |
buttons.forEach(button => {
|
| 334 |
button.addEventListener('click', function() {
|
| 335 |
+
filterByCategory(this.getAttribute('data-filter'));
|
| 336 |
});
|
| 337 |
});
|
| 338 |
updateCounts();
|