-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
207 lines (193 loc) · 12.5 KB
/
Copy pathindex.html
File metadata and controls
207 lines (193 loc) · 12.5 KB
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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title id="page-title">Catalog</title>
<script src="tag-groups.js"></script>
<script>
// Check localStorage or System Preference on load to avoid FOUC
document.documentElement.classList.toggle(
"dark",
localStorage.theme === "dark" ||
(!("theme" in localStorage) && window.matchMedia("(prefers-color-scheme: dark)").matches),
);
</script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link id="font-link" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="style.css">
<link rel="icon" id="favicon-link" href="" type="image/png">
</head>
<body class="p-8 bg-gray-100 dark:bg-slate-900 transition-colors duration-200">
<!-- Code Repo Ribbon -->
<a id="repo-ribbon" href="#" target="_blank"
class="fixed top-6 right-6 hidden md:flex items-center gap-3 text-white py-2 px-4 rounded-lg shadow-md transition-all z-50 no-underline group font-sans border border-white/10">
<!-- Code Platform Logo -->
<div class="flex-shrink-0">
<div id="repo-ribbon-icon-container" class="w-10 h-10 text-white [&>svg]:w-full [&>svg]:h-full"
aria-hidden="true"></div>
</div>
<div class="flex flex-col justify-center">
<!-- Platform Display Name -->
<span id="platform-display-name" class="font-normal text-base leading-tight mb-0.5"></span>
<!-- Stats Container -->
<div class="flex items-center gap-3 text-xs font-light text-indigo-100">
<!-- Version -->
<div id="gh-version-container" class="hidden items-center gap-1">
<svg class="w-3 h-3 opacity-70" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z">
</path>
</svg>
<span id="gh-tag">...</span>
</div>
<!-- Stars -->
<div id="gh-star-container" class="hidden items-center gap-1">
<svg class="w-3 h-3 opacity-70" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z">
</path>
</svg>
<span id="gh-stars">--</span>
</div>
<!-- Forks -->
<div id="gh-fork-container" class="hidden items-center gap-1">
<svg class="w-3 h-3 opacity-70" fill="none" stroke="currentColor" viewBox="0 0 24 24"
stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M12 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" />
<path d="M7 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" />
<path d="M17 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" />
<path d="M7 8v2a2 2 0 0 0 2 2h6a2 2 0 0 0 2 -2v-2" />
<path d="M12 12l0 4" />
</svg>
<span id="gh-forks">--</span>
</div>
</div>
</div>
</a>
<button id="themeToggleBtn"
class="fixed top-6 left-6 z-50 p-2 rounded-lg bg-gray-200 dark:bg-slate-700 text-gray-800 dark:text-yellow-400 shadow-md hover:bg-gray-300 dark:hover:bg-slate-600 transition-all"
aria-label="Toggle Dark Mode">
<svg class="w-6 h-6 block dark:hidden" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z">
</path>
</svg>
<svg class="w-6 h-6 hidden dark:block" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"></path>
</svg>
</button>
<!-- Main Content Container -->
<div class="max-w-[95%] xl:max-w-[1440px] 2xl:max-w-[1600px] mx-auto">
<!-- Header Section -->
<header class="mb-8 text-center">
<img id="logo-img" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
alt="Organization Logo" class="mx-auto mb-4 w-28 opacity-0 transition-opacity duration-300">
<h1 id="header-title" class="text-4xl font-extrabold mb-2"></h1>
<p id="header-description" class="text-xl text-gray-600 dark:text-gray-400"></p>
</header>
<!-- Search and Filter Section -->
<section class="mb-8">
<div
class="flex flex-col md:flex-row items-center justify-between gap-4 p-6 bg-white dark:bg-slate-800 shadow-md rounded-xl transition-colors duration-200">
<!-- Search Input and Result Count -->
<div class="flex items-center gap-3 w-full md:w-1/3">
<div class="relative flex-grow">
<input type="text" id="searchInput" placeholder="Search by keyword or tag..."
class="w-full pl-10 pr-4 py-2 border border-gray-300 dark:border-slate-600 rounded-lg dark:bg-slate-700 dark:text-white focus:ring-2 focus:border-transparent transition-all">
<svg class="w-5 h-5 absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"
fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
</svg>
</div>
<span id="resultCount" role="status"
class="text-sm text-gray-500 dark:text-gray-400 whitespace-nowrap"></span>
</div>
<!-- Filters -->
<div class="flex flex-col sm:flex-row gap-4 w-full md:w-auto">
<!-- Repository Type Dropdown -->
<div class="w-full sm:w-auto">
<label for="repoType" class="sr-only">Repository Type</label>
<select id="repoType"
class="w-full py-2 px-4 border border-gray-300 dark:border-slate-600 rounded-lg bg-gray-50 dark:bg-slate-700 text-gray-700 dark:text-white transition-all focus:ring-2 focus:border-transparent">
<option value="all">Search All</option>
<option value="code">Code</option>
<option value="datasets">Datasets</option>
<option value="models">Models</option>
<option value="spaces">Demos</option>
</select>
</div>
<!-- Sort by Dropdown -->
<div class="w-full sm:w-auto">
<label for="sortBy" class="sr-only">Sort By</label>
<select id="sortBy"
class="w-full py-2 px-4 border border-gray-300 dark:border-slate-600 rounded-lg bg-gray-50 dark:bg-slate-700 text-gray-700 dark:text-white transition-all focus:ring-2 focus:border-transparent">
<option value="lastModified">Last Updated (Newest)</option>
<option value="createdAt">Date Created (Newest)</option>
<option value="stars_desc">Stars / Likes (Highest)</option>
<option value="stars_asc">Stars / Likes (Lowest)</option>
<option value="alphabetical_asc">Alphabetical (A-Z)</option>
<option value="alphabetical_desc">Alphabetical (Z-A)</option>
</select>
</div>
<!-- Filter by Tags (Optional) -->
<div class="w-full sm:w-auto">
<label for="tagFilter" class="sr-only">Filter By Tag</label>
<select id="tagFilter"
class="w-full py-2 px-4 border border-gray-300 dark:border-slate-600 rounded-lg bg-gray-50 dark:bg-slate-700 text-gray-700 dark:text-white transition-all focus:ring-2 focus:border-transparent">
<option value="">All Tags</option>
</select>
</div>
<!-- Archive Filter -->
<div class="w-full sm:w-auto">
<label for="archiveFilter" class="sr-only">Archive Filter</label>
<select id="archiveFilter"
class="w-full py-2 px-4 border border-gray-300 dark:border-slate-600 rounded-lg bg-gray-50 dark:bg-slate-700 text-gray-700 dark:text-white transition-all focus:ring-2 focus:border-transparent">
<option value="active">Hide Archived</option>
<option value="all">Show Archived</option>
</select>
</div>
</div>
</div>
</section>
<!-- Item Cards Container -->
<section>
<div id="itemList" class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6">
<!-- Skeleton Loading State (Initially displayed) -->
<div class="skeleton-card skeleton rounded-xl p-6 h-64"></div>
<div class="skeleton-card skeleton rounded-xl p-6 h-64 hidden sm:block bg-gray-200 dark:bg-slate-800">
</div>
<div class="skeleton-card skeleton rounded-xl p-6 h-64 hidden lg:block bg-gray-200 dark:bg-slate-800">
</div>
<div class="skeleton-card skeleton rounded-xl p-6 h-64 hidden xl:block bg-gray-200 dark:bg-slate-800">
</div>
</div>
<!-- Empty State Message -->
<div id="emptyState" class="hidden text-center text-gray-500 text-lg mt-10">
<p>No items found matching your criteria.</p>
</div>
</section>
</div>
<script type="module" src="main.js"></script>
<!-- Grant Acknowledgement -->
<footer class="mt-12 text-gray-500">
<p>
This work was supported by the <a href="http://abcresearchcenter.org/" target="_blank"
class="text-[#4fb797] hover:underline">AI and Biodiversity Change (ABC) Global Center</a>.
The ABC Global Center is funded by the US National Science Foundation under <a href="https://www.nsf.gov/awardsearch/showAward?AWD_ID=2330423" target="_blank"
class="text-[#4fb797] hover:underline">Award No. 2330423</a> and the Natural Sciences and Engineering Research Council
of Canada under <a href="https://nserc-crsng.canada.ca/en/awards-database/791752" target="_blank"
class="text-[#4fb797] hover:underline">Award No. 585136</a>.
This work draws on research funded by the Social Sciences and Humanities Research Council.
Any opinions, findings, conclusions, or recommendations expressed in this material are those of the
author(s) and do not necessarily reflect the views of the National Science Foundation, the Natural Sciences and Engineering Research Council of Canada,
or the Social Sciences and Humanities Research Council.
</p>
</footer>
</body>
</html>