mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-07 13:22:54 +00:00
fix(ci): fix netlify deployment by building to dist
- Move from root publishing to clean `dist/` directory - Create `scripts/build-dist.mjs` to orchestrate build and copy assets - Update `package.json` build script - Update `netlify.toml` to publish `dist/` - Ignore `dist/` in `.gitignore` Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
ccb60c3a7e
commit
0bfa3b08e8
638 files changed
+193490
-2
No files matched your search
Vendored
+33
@@ -0,0 +1,33 @@
|
||||
// js/sidebarLoading.js
|
||||
|
||||
function escapeHtml(value) {
|
||||
if (typeof value !== "string") {
|
||||
return "";
|
||||
}
|
||||
|
||||
return value
|
||||
.replace(/&/g, "&")
|
||||
.replace(/</g, "<")
|
||||
.replace(/>/g, ">")
|
||||
.replace(/"/g, """)
|
||||
.replace(/'/g, "'");
|
||||
}
|
||||
|
||||
export function getSidebarLoadingMarkup(message = "", options = {}) {
|
||||
const trimmed = typeof message === "string" ? message.trim() : "";
|
||||
const copy = trimmed || "Fetching data…";
|
||||
const safeCopy = escapeHtml(copy);
|
||||
const showSpinner = options?.showSpinner !== false;
|
||||
const spinnerMarkup = showSpinner
|
||||
? '<span class="status-spinner status-spinner--inline" aria-hidden="true"></span>'
|
||||
: "";
|
||||
|
||||
return `
|
||||
<div class="sidebar-loading-wrapper" role="status" aria-live="polite">
|
||||
<div class="sidebar-loading-indicator">
|
||||
${spinnerMarkup}
|
||||
<span class="sidebar-loading-text">${safeCopy}</span>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
Reference in new issue
Block a user