Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion scripts/check.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ for (const value of [
assert(html.includes("Search the library"));
assert(html.includes("Search by title, task, or contributor"));
assert(html.includes('class="search-field"'));
assert(html.includes("styles.css?v=20260622-search-prominence"));
assert(html.includes("styles.css?v=20260622-sort-focus"));
assert(html.includes("script.js?v=20260622-sort-focus"));
assert(css.includes(".search-control-label"));
assert(css.includes(".search-control:hover .search-field"));
assert(css.includes(".search-control:focus-within .search-field"));
Expand All @@ -144,7 +145,11 @@ assert(learnHtml.includes("How agent loops work"));
assert(agentHtml.includes("For AI agents"));
assert(css.includes(".loop-row"));
assert(css.includes(".sort-control"));
assert(css.includes(".sort-control select.is-pointer-focused:focus"));
assert(browserScript.includes("data-category-filter"));
assert(browserScript.includes('sortSelect.addEventListener("pointerdown"'));
assert(browserScript.includes('sortSelect.addEventListener("keydown"'));
assert(browserScript.includes('sortSelect.addEventListener("blur"'));
assert(html.includes('<option value="newest">Newest → oldest</option>'));
assert(html.includes('<option value="oldest">Oldest → newest</option>'));
assert(browserScript.includes('"oldest"'));
Expand Down
4 changes: 2 additions & 2 deletions site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
href="https://signals.forwardfuture.ai/loop-library/agents/"
/>
<link rel="icon" type="image/png" href="./assets/favicon.png" />
<link rel="stylesheet" href="./styles.css?v=20260622-search-prominence" />
<link rel="stylesheet" href="./styles.css?v=20260622-sort-focus" />
<script type="application/ld+json">
{
"@context": "https://schema.org",
Expand Down Expand Up @@ -198,7 +198,7 @@
]
}
</script>
<script src="./script.js?v=20260622-date-directions" defer></script>
<script src="./script.js?v=20260622-sort-focus" defer></script>
<title>Loop Library: Repeatable AI Agent Workflows | Forward Future</title>
</head>
<body>
Expand Down
12 changes: 12 additions & 0 deletions site/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,18 @@ const SORT_OPTIONS = new Set([

let activeSort = "featured";

if (sortSelect) {
sortSelect.addEventListener("pointerdown", () => {
sortSelect.classList.add("is-pointer-focused");
});
sortSelect.addEventListener("keydown", () => {
sortSelect.classList.remove("is-pointer-focused");
});
sortSelect.addEventListener("blur", () => {
sortSelect.classList.remove("is-pointer-focused");
});
}

function rowTitle(row) {
return normalize(row.querySelector(".loop-title-link")?.textContent ?? "");
}
Expand Down
4 changes: 4 additions & 0 deletions site/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,10 @@ code {
outline-offset: 2px;
}

.sort-control select.is-pointer-focused:focus {
outline: none;
}

.copy-button {
border: 1px solid var(--ink);
color: var(--ink);
Expand Down
Loading