.mdeck (2/3): Whop static build with member and dashboard views, plus zip build script #131

Merged
time merged 6 commits from time/card-95-gh-pages into gh-pages 2026-10-18 07:07:43 +00:00
Showing only changes of commit 58e4cff5e9 - Show all commits
+13
View File
@@ -0,0 +1,13 @@
/* Whop build only: which of the two human views this address is. The static build serves the same app at every
/experiences/<id> and /dashboard/<id> path, so the app reads the path to know where it is.
/dashboard/<companyId> the creator's view: the editor with "Copy prompt for your agent"
/experiences/<experienceId> the member's view: the editor and presenter, no agent prompt
Anything else (the 404.html fallback on another path) is shown as the member view. */
(function () {
"use strict";
var view = /^\/dashboard(\/|$)/.test(location.pathname) ? "dashboard" : "member";
document.documentElement.setAttribute("data-view", view);
var style = document.createElement("style");
style.textContent = 'html[data-view="member"] #agent{display:none}';
document.head.appendChild(style);
})();