Implements a fully-featured action requests table in a single LiveView module using Flop, Ecto, and SQLite. Includes: - Fuzzy search, status/assignment filters, column sorting, 25-per-page pagination - Real-time updates, bookmarkable URLs via `handle_params/3` - JS-disabled fallback with GET forms (no duplicate logic) - 1,000,000 seeded records, Tailwind + DaisyUI styling, light/dark themes - Comprehensive README with comparisons to Django+React/Rails+React stacks - 31 tests covering all scenarios Tech: Phoenix 1.8+, LiveView, Flop, Ecto, SQLite, Elixir 1.15+
37 lines
1.3 KiB
Plaintext
37 lines
1.3 KiB
Plaintext
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<meta name="csrf-token" content={get_csrf_token()} />
|
|
<.live_title default="ActionRequestsDemo" suffix=" · Phoenix Framework">
|
|
{assigns[:page_title]}
|
|
</.live_title>
|
|
<link phx-track-static rel="stylesheet" href={~p"/assets/css/app.css"} />
|
|
<script defer phx-track-static type="text/javascript" src={~p"/assets/js/app.js"}>
|
|
</script>
|
|
<script>
|
|
(() => {
|
|
const setTheme = (theme) => {
|
|
if (theme === "system") {
|
|
localStorage.removeItem("phx:theme");
|
|
document.documentElement.removeAttribute("data-theme");
|
|
} else {
|
|
localStorage.setItem("phx:theme", theme);
|
|
document.documentElement.setAttribute("data-theme", theme);
|
|
}
|
|
};
|
|
if (!document.documentElement.hasAttribute("data-theme")) {
|
|
setTheme(localStorage.getItem("phx:theme") || "system");
|
|
}
|
|
window.addEventListener("storage", (e) => e.key === "phx:theme" && setTheme(e.newValue || "system"));
|
|
|
|
window.addEventListener("phx:set-theme", (e) => setTheme(e.target.dataset.phxTheme));
|
|
})();
|
|
</script>
|
|
</head>
|
|
<body>
|
|
{@inner_content}
|
|
</body>
|
|
</html>
|