diff --git a/apps/builddao/widget/app.jsx b/apps/builddao/widget/app.jsx
index 25bd991e..770c3d92 100644
--- a/apps/builddao/widget/app.jsx
+++ b/apps/builddao/widget/app.jsx
@@ -1,3 +1,7 @@
+const { CSS } = VM.require("${config_account}/widget/components.CSS") || {
+ CSS: () => <>>,
+};
+
const config = {
theme: {
// add key values to define colors
@@ -100,213 +104,11 @@ const config = {
},
};
-const Root = styled.div`
- --stroke-color: rgba(255, 255, 255, 0.2);
- --bg-1: #000;
- --bg-1-hover: #010002;
- --bg-1-hover-transparent: rgba(13, 2, 15, 0);
- --bg-2: #23242b;
- --label-color: #fff;
- --font-color: #fff;
- --font-muted-color: #cdd0d5;
- --black: #000;
- --system-red: #fd2a5c;
- --yellow: #eca227;
-
- --compose-bg: #23242b;
-
- --post-bg: #23242b;
- --post-bg-hover: #1d1f25;
- --post-bg-transparent: rgba(23, 24, 28, 0);
-
- --button-primary-bg: #eca227;
- --button-outline-bg: transparent;
- --button-default-bg: #23242b;
-
- --button-primary-color: #000;
- --button-outline-color: #fff;
- --button-default-color: #fff;
-
- --button-primary-hover-bg: #e49b48;
- --button-outline-hover-bg: rgba(255, 255, 255, 0.2);
- --button-default-hover-bg: #17181c;
-
- /* Poppins Font */
- @font-face {
- font-family: "Poppins";
- font-weight: 100;
- font-style: normal;
- src: url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Thin.eot");
- src:
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Thin.eot?#iefix")
- format("embedded-opentype"),
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Thin.woff2")
- format("woff2"),
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Thin.woff")
- format("woff"),
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Thin.ttf")
- format("truetype");
- font-display: swap;
- }
- @font-face {
- font-family: "Poppins";
- font-weight: 200;
- font-style: normal;
- src: url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-ExtraLight.eot");
- src:
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-ExtraLight.eot?#iefix")
- format("embedded-opentype"),
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-ExtraLight.woff2")
- format("woff2"),
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-ExtraLight.woff")
- format("woff"),
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-ExtraLight.ttf")
- format("truetype");
- font-display: swap;
- }
- @font-face {
- font-family: "Poppins";
- font-weight: 300;
- font-style: normal;
- src: url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Light.eot");
- src:
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Light.eot?#iefix")
- format("embedded-opentype"),
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Light.woff2")
- format("woff2"),
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Light.woff")
- format("woff"),
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Light.ttf")
- format("truetype");
- font-display: swap;
- }
- @font-face {
- font-family: "Poppins";
- font-weight: 400;
- font-style: normal;
- src: url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Regular.eot");
- src:
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Regular.eot?#iefix")
- format("embedded-opentype"),
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Regular.woff2")
- format("woff2"),
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Regular.woff")
- format("woff"),
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Regular.ttf")
- format("truetype");
- font-display: swap;
- }
- @font-face {
- font-family: "Poppins";
- font-weight: 500;
- font-style: normal;
- src: url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Medium.eot");
- src:
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Medium.eot?#iefix")
- format("embedded-opentype"),
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Medium.woff2")
- format("woff2"),
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Medium.woff")
- format("woff"),
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Medium.ttf")
- format("truetype");
- font-display: swap;
- }
- @font-face {
- font-family: "Poppins";
- font-weight: 600;
- font-style: normal;
- src: url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-SemiBold.eot");
- src:
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-SemiBold.eot?#iefix")
- format("embedded-opentype"),
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-SemiBold.woff2")
- format("woff2"),
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-SemiBold.woff")
- format("woff"),
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-SemiBold.ttf")
- format("truetype");
- font-display: swap;
- }
- @font-face {
- font-family: "Poppins";
- font-weight: 700;
- font-style: normal;
- src: url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Bold.eot");
- src:
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Bold.eot?#iefix")
- format("embedded-opentype"),
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Bold.woff2")
- format("woff2"),
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Bold.woff")
- format("woff"),
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Bold.ttf")
- format("truetype");
- font-display: swap;
- }
- @font-face {
- font-family: "Poppins";
- font-weight: 800;
- font-style: normal;
- src: url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-ExtraBold.eot");
- src:
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-ExtraBold.eot?#iefix")
- format("embedded-opentype"),
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-ExtraBold.woff2")
- format("woff2"),
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-ExtraBold.woff")
- format("woff"),
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-ExtraBold.ttf")
- format("truetype");
- font-display: swap;
- }
- @font-face {
- font-family: "Poppins";
- font-weight: 900;
- font-style: normal;
- src: url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Black.eot");
- src:
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Black.eot?#iefix")
- format("embedded-opentype"),
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Black.woff2")
- format("woff2"),
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Black.woff")
- format("woff"),
- url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Black.ttf")
- format("truetype");
- font-display: swap;
- }
-
- /* Inter Font */
- @font-face {
- font-family: InterVariable;
- font-style: normal;
- font-weight: 100 900;
- font-display: swap;
- src: url("https://rsms.me/inter/font-files/InterVariable.woff2?v=4.0")
- format("woff2");
- }
- @font-face {
- font-family: InterVariable;
- font-style: italic;
- font-weight: 100 900;
- font-display: swap;
- src: url("https://rsms.me/inter/font-files/InterVariable-Italic.woff2?v=4.0")
- format("woff2");
- }
-
- /* Typeahead Fix */
- .rbt-token-removeable {
- background: #007bff;
- color: #fff;
- }
-`;
-
return (
-
+
-
+
);
diff --git a/apps/builddao/widget/components/CSS.jsx b/apps/builddao/widget/components/CSS.jsx
new file mode 100644
index 00000000..881a3f32
--- /dev/null
+++ b/apps/builddao/widget/components/CSS.jsx
@@ -0,0 +1,203 @@
+const CSS = styled.div`
+ --stroke-color: rgba(255, 255, 255, 0.2);
+ --bg-1: #000;
+ --bg-1-hover: #010002;
+ --bg-1-hover-transparent: rgba(13, 2, 15, 0);
+ --bg-2: #23242b;
+ --label-color: #fff;
+ --font-color: #fff;
+ --font-muted-color: #cdd0d5;
+ --black: #000;
+ --system-red: #fd2a5c;
+ --yellow: #eca227;
+
+ --compose-bg: #23242b;
+
+ --post-bg: #23242b;
+ --post-bg-hover: #1d1f25;
+ --post-bg-transparent: rgba(23, 24, 28, 0);
+
+ --button-primary-bg: #eca227;
+ --button-outline-bg: transparent;
+ --button-default-bg: #23242b;
+
+ --button-primary-color: #000;
+ --button-outline-color: #fff;
+ --button-default-color: #fff;
+
+ --button-primary-hover-bg: #e49b48;
+ --button-outline-hover-bg: rgba(255, 255, 255, 0.2);
+ --button-default-hover-bg: #17181c;
+
+ /* Poppins Font */
+ @font-face {
+ font-family: "Poppins";
+ font-weight: 100;
+ font-style: normal;
+ src: url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Thin.eot");
+ src:
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Thin.eot?#iefix")
+ format("embedded-opentype"),
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Thin.woff2")
+ format("woff2"),
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Thin.woff")
+ format("woff"),
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Thin.ttf")
+ format("truetype");
+ font-display: swap;
+ }
+ @font-face {
+ font-family: "Poppins";
+ font-weight: 200;
+ font-style: normal;
+ src: url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-ExtraLight.eot");
+ src:
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-ExtraLight.eot?#iefix")
+ format("embedded-opentype"),
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-ExtraLight.woff2")
+ format("woff2"),
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-ExtraLight.woff")
+ format("woff"),
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-ExtraLight.ttf")
+ format("truetype");
+ font-display: swap;
+ }
+ @font-face {
+ font-family: "Poppins";
+ font-weight: 300;
+ font-style: normal;
+ src: url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Light.eot");
+ src:
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Light.eot?#iefix")
+ format("embedded-opentype"),
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Light.woff2")
+ format("woff2"),
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Light.woff")
+ format("woff"),
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Light.ttf")
+ format("truetype");
+ font-display: swap;
+ }
+ @font-face {
+ font-family: "Poppins";
+ font-weight: 400;
+ font-style: normal;
+ src: url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Regular.eot");
+ src:
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Regular.eot?#iefix")
+ format("embedded-opentype"),
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Regular.woff2")
+ format("woff2"),
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Regular.woff")
+ format("woff"),
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Regular.ttf")
+ format("truetype");
+ font-display: swap;
+ }
+ @font-face {
+ font-family: "Poppins";
+ font-weight: 500;
+ font-style: normal;
+ src: url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Medium.eot");
+ src:
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Medium.eot?#iefix")
+ format("embedded-opentype"),
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Medium.woff2")
+ format("woff2"),
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Medium.woff")
+ format("woff"),
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Medium.ttf")
+ format("truetype");
+ font-display: swap;
+ }
+ @font-face {
+ font-family: "Poppins";
+ font-weight: 600;
+ font-style: normal;
+ src: url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-SemiBold.eot");
+ src:
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-SemiBold.eot?#iefix")
+ format("embedded-opentype"),
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-SemiBold.woff2")
+ format("woff2"),
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-SemiBold.woff")
+ format("woff"),
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-SemiBold.ttf")
+ format("truetype");
+ font-display: swap;
+ }
+ @font-face {
+ font-family: "Poppins";
+ font-weight: 700;
+ font-style: normal;
+ src: url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Bold.eot");
+ src:
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Bold.eot?#iefix")
+ format("embedded-opentype"),
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Bold.woff2")
+ format("woff2"),
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Bold.woff")
+ format("woff"),
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Bold.ttf")
+ format("truetype");
+ font-display: swap;
+ }
+ @font-face {
+ font-family: "Poppins";
+ font-weight: 800;
+ font-style: normal;
+ src: url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-ExtraBold.eot");
+ src:
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-ExtraBold.eot?#iefix")
+ format("embedded-opentype"),
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-ExtraBold.woff2")
+ format("woff2"),
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-ExtraBold.woff")
+ format("woff"),
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-ExtraBold.ttf")
+ format("truetype");
+ font-display: swap;
+ }
+ @font-face {
+ font-family: "Poppins";
+ font-weight: 900;
+ font-style: normal;
+ src: url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Black.eot");
+ src:
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Black.eot?#iefix")
+ format("embedded-opentype"),
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Black.woff2")
+ format("woff2"),
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Black.woff")
+ format("woff"),
+ url("https://cdn.jsdelivr.net/gh/webfontworld/Poppins/Poppins-Black.ttf")
+ format("truetype");
+ font-display: swap;
+ }
+
+ /* Inter Font */
+ @font-face {
+ font-family: InterVariable;
+ font-style: normal;
+ font-weight: 100 900;
+ font-display: swap;
+ src: url("https://rsms.me/inter/font-files/InterVariable.woff2?v=4.0")
+ format("woff2");
+ }
+ @font-face {
+ font-family: InterVariable;
+ font-style: italic;
+ font-weight: 100 900;
+ font-display: swap;
+ src: url("https://rsms.me/inter/font-files/InterVariable-Italic.woff2?v=4.0")
+ format("woff2");
+ }
+
+ /* Typeahead Fix */
+ .rbt-token-removeable {
+ background: #007bff;
+ color: #fff;
+ }
+`;
+
+return { CSS };
diff --git a/apps/builddao/widget/config/app.jsx b/apps/builddao/widget/config/app.jsx
deleted file mode 100644
index 80061284..00000000
--- a/apps/builddao/widget/config/app.jsx
+++ /dev/null
@@ -1,72 +0,0 @@
-return {
- type: "app",
- routes: {
- home: {
- path: "${config_account}/widget/page.home",
- blockHeight: "final",
- init: {
- name: "Home",
- },
- },
- feed: {
- path: "${config_account}/widget/page.feed",
- blockHeight: "final",
- init: {
- name: "Activity",
- },
- },
- projects: {
- path: "${config_account}/widget/page.projects",
- blockHeight: "final",
- init: {
- name: "Projects",
- },
- hide: true,
- },
- proposal: {
- path: "buildhub.near/widget/Proposals",
- blockHeight: "final",
- init: {
- name: "Proposals",
- },
- },
- resources: {
- path: "${config_account}/widget/page.resources",
- blockHeight: "final",
- init: {
- name: "Resources",
- },
- },
- library: {
- path: "${config_account}/widget/page.library",
- blockHeight: "final",
- init: {
- name: "Library",
- },
- },
- profile: {
- path: "${config_account}/widget/page.profile",
- blockHeight: "final",
- init: {
- name: "Profile",
- },
- hide: true,
- },
- inspect: {
- path: "${config_account}/widget/page.inspect",
- blockHeight: "final",
- init: {
- name: "Inspect",
- },
- hide: true,
- },
- project: {
- path: "${config_account}/widget/page.project",
- blockHeight: "final",
- init: {
- name: "Project Page",
- },
- hide: true,
- },
- },
-};
diff --git a/apps/builddao/widget/config/feed.jsx b/apps/builddao/widget/config/feed.jsx
deleted file mode 100644
index c422b9d2..00000000
--- a/apps/builddao/widget/config/feed.jsx
+++ /dev/null
@@ -1,159 +0,0 @@
-const { Post } = VM.require("${config_account}/widget/components") || {
- Post: () => <>>,
-};
-
-function formatDate(date) {
- const options = { year: "numeric", month: "short", day: "numeric" };
- return date.toLocaleDateString("en-US", options);
-}
-
-const daoName = "Build DAO";
-const feedLink = "${alias_gateway_url}/feed";
-
-return {
- type: "app", // every.near/type/app
- routes: {
- all: {
- path: "${config_account}/widget/Feed",
- blockHeight: "final",
- init: {
- name: "All", // maybe these should be moved to navbar specific
- icon: "bi-list",
- requiredHashtags: ["build"],
- },
- },
- updates: {
- path: "${config_account}/widget/Feed",
- blockHeight: "final",
- init: {
- name: "Updates",
- icon: "bi-bell",
- requiredHashtags: ["build", "update"],
- template: `### BUILDER UPDATE: ${formatDate(new Date())}
-(posted via [${daoName} Gateway](${feedLink}?tab=update))
-
-**✅ DONE**
-- [what'd you do]
-- [link proof]
-
-**⏩ NEXT**
-- [what's next?]
-- [what are you thinking about?]
-
-**🛑 BLOCKERS**
-- [what's blocking you?]
-- [how can someone help?]
-`,
- },
- },
- question: {
- path: "${config_account}/widget/Feed",
- blockHeight: "final",
- init: {
- name: "Question",
- icon: "bi-question-lg",
- requiredHashtags: ["build", "question"],
- template: `## what is your question?
-(posted via [${daoName} Gateway](${feedLink}?tab=question))
-
-[what are you thinking about?]
-[why are you asking?]
-`,
- },
- },
- idea: {
- path: "${config_account}/widget/Feed",
- blockHeight: "final",
- init: {
- name: "Idea",
- icon: "bi-lightbulb",
- requiredHashtags: ["build", "idea"],
- template: `## IDEA TITLE
-(posted via [${daoName} Gateway](${feedLink}?tab=idea))
-
-**What idea are you proposing?**
-- [Describe the idea]
-
-**Context or additional information:**
-- [Provide any context or details]
-`,
- },
- },
- feedback: {
- path: "${config_account}/widget/Feed",
- blockHeight: "final",
- init: {
- name: "Feedback",
- icon: "bi-chat-left-text",
- requiredHashtags: ["build", "feedback"],
- },
- },
- events: {
- path: "${config_account}/widget/events.Calendar",
- blockHeight: "final",
- init: {
- name: "Events",
- icon: "bi-calendar",
- app: "every",
- thing: "event",
- },
- },
- bookmarks: {
- path: "${config_account}/widget/OrderedGraphFeed",
- blockHeight: "final",
- init: {
- name: "Bookmarks",
- icon: "bi-bookmark",
- itemType: "bookmark",
- renderItem: (item) => {
- return (
-
- );
- },
- },
- },
- request: {
- path: "${config_account}/widget/Feed",
- blockHeight: "final",
- init: {
- name: "Request",
- icon: "bi-file-earmark-text",
- requiredHashtags: ["build", "request"],
- customActions: [
- {
- type: "modal",
- icon: "bi-file-earmark-text",
- label: "Propose",
- onClick: (modalToggles) => {
- const toggle = modalToggles.propose;
- toggle();
- },
- },
- ],
- template: `## REQUEST TITLE
-(posted via [${daoName} Gateway](${feedLink}?tab=request))
-
-#### Description
-[Detailed description of what the proposal is about.]
-
-#### Why This Proposal?
-[Explanation of why this proposal is necessary or beneficial.]
-`,
- },
- },
- proposals: {
- path: "${config_account}/widget/Proposals",
- blockHeight: "final",
- init: {
- name: "Proposals",
- icon: "bi-file-earmark-text",
- daoId: "build.sputnik-dao.near",
- },
- },
- },
-};
diff --git a/apps/builddao/widget/feed/templates.jsx b/apps/builddao/widget/feed/templates.jsx
new file mode 100644
index 00000000..a58bbc17
--- /dev/null
+++ b/apps/builddao/widget/feed/templates.jsx
@@ -0,0 +1,48 @@
+function formatDate(date) {
+ const options = { year: "numeric", month: "short", day: "numeric" };
+ return date.toLocaleDateString("en-US", options);
+}
+
+const daoName = "Build DAO";
+const feedLink = "${alias_gateway_url}/feed";
+
+const TEMPLATES = {
+ updates: `### BUILDER UPDATE: ${formatDate(new Date())}
+(posted via [${daoName} Gateway](${feedLink}?tab=update))
+**✅ DONE**
+- [what'd you do]
+- [link proof]
+**⏩ NEXT**
+- [what's next?]
+- [what are you thinking about?]
+**🛑 BLOCKERS**
+- [what's blocking you?]
+- [how can someone help?]
+`,
+ question: `## what is your question?
+(posted via [${daoName} Gateway](${feedLink}?tab=question))
+
+[what are you thinking about?]
+[why are you asking?]
+`,
+ idea: `## IDEA TITLE
+(posted via [${daoName} Gateway](${feedLink}?tab=idea))
+
+**What idea are you proposing?**
+- [Describe the idea]
+
+**Context or additional information:**
+- [Provide any context or details]
+`,
+ request: `## REQUEST TITLE
+(posted via [${daoName} Gateway](${feedLink}?tab=request))
+
+#### Description
+[Detailed description of what the proposal is about.]
+
+#### Why This Proposal?
+[Explanation of why this proposal is necessary or beneficial.]
+`,
+};
+
+return { TEMPLATES };
diff --git a/apps/builddao/widget/page/feed.jsx b/apps/builddao/widget/page/feed.jsx
index 2dee250c..07d12fa8 100644
--- a/apps/builddao/widget/page/feed.jsx
+++ b/apps/builddao/widget/page/feed.jsx
@@ -1,3 +1,7 @@
+const { TEMPLATES } = VM.require("${config_account}/widget/feed.templates") || {
+ TEMPLATES: {},
+};
+
const { SidebarLayout } = VM.require(
"${config_account}/widget/template.SidebarLayout",
) || {
@@ -8,14 +12,6 @@ const { Post } = VM.require("${config_account}/widget/components") || {
Post: () => <>>,
};
-function formatDate(date) {
- const options = { year: "numeric", month: "short", day: "numeric" };
- return date.toLocaleDateString("en-US", options);
-}
-
-const daoName = "Build DAO";
-const feedLink = "${alias_gateway_url}/feed";
-
const config = {
theme: {},
layout: {
@@ -25,9 +21,8 @@ const config = {
},
},
blocks: {
- // these get passed to the layout and children
Header: () => <>>,
- Footer: () => <>>, // customize your footer
+ Footer: () => <>>,
},
router: {
param: "tab",
@@ -51,21 +46,7 @@ const config = {
name: "Updates",
icon: "bi-bell",
requiredHashtags: ["build", "update"],
- template: `### BUILDER UPDATE: ${formatDate(new Date())}
- (posted via [${daoName} Gateway](${feedLink}?tab=update))
-
- **✅ DONE**
- - [what'd you do]
- - [link proof]
-
- **⏩ NEXT**
- - [what's next?]
- - [what are you thinking about?]
-
- **🛑 BLOCKERS**
- - [what's blocking you?]
- - [how can someone help?]
- `,
+ template: TEMPLATES.updates,
},
},
question: {
@@ -76,12 +57,7 @@ const config = {
name: "Question",
icon: "bi-question-lg",
requiredHashtags: ["build", "question"],
- template: `## what is your question?
- (posted via [${daoName} Gateway](${feedLink}?tab=question))
-
- [what are you thinking about?]
- [why are you asking?]
- `,
+ template: TEMPLATES.question,
},
},
idea: {
@@ -92,15 +68,7 @@ const config = {
name: "Idea",
icon: "bi-lightbulb",
requiredHashtags: ["build", "idea"],
- template: `## IDEA TITLE
- (posted via [${daoName} Gateway](${feedLink}?tab=idea))
-
- **What idea are you proposing?**
- - [Describe the idea]
-
- **Context or additional information:**
- - [Provide any context or details]
- `,
+ template: TEMPLATES.idea,
},
},
feedback: {
@@ -163,15 +131,7 @@ const config = {
},
},
],
- template: `## REQUEST TITLE
-(posted via [${daoName} Gateway](${feedLink}?tab=request))
-
-#### Description
-[Detailed description of what the proposal is about.]
-
-#### Why This Proposal?
-[Explanation of why this proposal is necessary or beneficial.]
-`,
+ template: TEMPLATES.request,
},
},
proposals: {
@@ -182,7 +142,6 @@ const config = {
name: "Proposals",
icon: "bi-file-earmark-text",
daoId: "build.sputnik-dao.near",
- template: "",
},
},
},
diff --git a/apps/builddao/widget/page/inspect.jsx b/apps/builddao/widget/page/inspect.jsx
index f66581fb..ff79ac4c 100644
--- a/apps/builddao/widget/page/inspect.jsx
+++ b/apps/builddao/widget/page/inspect.jsx
@@ -25,7 +25,7 @@ return (