@@ -104,12 +104,13 @@ const props = {
104104 })
105105 }
106106 <div class =" flex items-center justify-center" >
107- <button
108- id =" changelogs-next-button"
109- class =" bg-cl1-brand-orange text-cl1-black h-12 cursor-pointer rounded-sm px-6 font-medium"
107+ <a
108+ id =" changelog-search-button"
109+ href =" /search/?contentType=Changelog+entry"
110+ class =" bg-cl1-brand-orange text-cl1-black mr-2 flex h-12 items-center justify-center rounded-sm px-6 font-medium no-underline"
110111 >
111- Load more items
112- </button >
112+ Search for historical entries
113+ </a >
113114 </div >
114115</StarlightPage >
115116
@@ -118,10 +119,6 @@ const props = {
118119 "#changelogs-next-filter",
119120 );
120121
121- const button = document.querySelector<HTMLButtonElement>(
122- "#changelogs-next-button",
123- );
124-
125122 const url = new URL(window.location.href);
126123
127124 if (filter && url.searchParams.has("product")) {
@@ -144,21 +141,6 @@ const props = {
144141 return products.includes(value);
145142 }
146143
147- button?.addEventListener("click", () => {
148- const hidden = [
149- ...document.querySelectorAll<HTMLElement>("[data-products]"),
150- ]
151- .filter(
152- (e) =>
153- e.classList.contains("hidden!") && filterByProduct(e, filter!.value),
154- )
155- .slice(0, 10);
156-
157- hidden.forEach((e) => e.classList.remove("hidden!"));
158-
159- hideButton();
160- });
161-
162144 function updateFilter() {
163145 const entries = [
164146 ...document.querySelectorAll<HTMLElement>("[data-products]"),
@@ -170,7 +152,7 @@ const props = {
170152
171153 const filtered = entries
172154 .filter((e) => filterByProduct(e, value))
173- .slice(0, 10 );
155+ .slice(0, 5 );
174156
175157 for (const entry of entries) {
176158 const show = filtered.includes(entry);
@@ -191,27 +173,6 @@ const props = {
191173 }
192174
193175 history.replaceState(null, "", url.href);
194-
195- hideButton();
196- }
197-
198- function hideButton() {
199- const entries = [
200- ...document.querySelectorAll<HTMLDivElement>("[data-products]"),
201- ];
202-
203- if (entries.length === 0) return;
204-
205- const filtered = entries.filter((p) => filterByProduct(p, filter!.value));
206-
207- const visible = filtered.filter((p) => !p.classList.contains("hidden!"));
208- const hidden = filtered.length - visible.length;
209-
210- if (hidden > 0) {
211- button!.classList.remove("hidden!");
212- } else {
213- button!.classList.add("hidden!");
214- }
215176 }
216177</script >
217178
0 commit comments