Skip to content

Commit

Permalink
adds nav
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotBraem committed Jan 29, 2024
1 parent 2481d4a commit 367c552
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 15 deletions.
7 changes: 7 additions & 0 deletions apps/buildbox/widget/config.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ return {
icon: "bi bi-globe",
},
},
feed: {
path: "buildbox.near/widget/page.feed",
blockHeight: "final",
init: {
icon: "bi bi-globe",
},
},
},
theme: "background-color: white;",
};
28 changes: 25 additions & 3 deletions apps/buildbox/widget/layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,30 @@ const ContentContainer = styled.div`
width: 100%;
`;

function Header() {
return <></>;
const ButtonGroup = styled.div`
display: flex;
flex-direction: row;
align-items: center;
gap: 8px;
`;

const Button = styled.button``;

function Header({ active, routes }) {
return (
<>
<ButtonGroup>
{routes &&
(Object.keys(routes) || []).map((k) => {
return (
<Link key={k} to={`?page=${k}`}>
<Button key={k}>{k}</Button>
</Link>
);
})}
</ButtonGroup>
</>
);
}

function Footer() {
Expand All @@ -27,7 +49,7 @@ function AppLayout({ active, routes, children }) {
return (
<>
<Container>
<Header />
<Header active={active} routes={routes} />
<ContentContainer>{children}</ContentContainer>
<Footer />
</Container>
Expand Down
2 changes: 1 addition & 1 deletion apps/buildbox/widget/page/browse.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Feed
const app = props.app || "test";
const app = props.app || "buildbox";
const type = props.type || "project";

const keys = Social.keys(`*/${app}/${type}/*`, "final", {
Expand Down
4 changes: 2 additions & 2 deletions apps/buildbox/widget/page/feed.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ return (
<Feed
index={[
{
action: "post",
key: "test",
action: "hashtag",
key: "hack",
options: {
limit: 10,
order: "desc",
Expand Down
24 changes: 15 additions & 9 deletions apps/buildbox/widget/page/submit.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
// this is where you can create a hackathon

// then you have people submit projects to the hackathon, but they create the project locally

const { normalize } = VM.require("buildbox.near/widget/utils.stringUtils") || {
normalize: (s) => s,
};

const app = props.app || "buildbox";
const type = props.type || "project";
const app = props.app || "every";

const accountId = context.accountId;

Expand Down Expand Up @@ -199,18 +203,20 @@ const handleSubmit = () => {
{
post: {
main: JSON.stringify({
text: `I've just submitted a ${type} to Abstraction Hacks! #build #${app} #${type} #abstraction #hack \n\n[EMBED](buildbox.near/widget/post.embed?${type}=${path})\n\n`,
text: `I've just submitted a ${type} to Abstraction Hacks! #build #${type} #abstraction #hack \n\n[EMBED](${path})\n\n`,
image: "",
type: "md",
}),
},
index: {
post: JSON.stringify({ key: "test", value: { type: "md" } }),
post: JSON.stringify({ key: "main", value: { type: "md" } }),
},
[app]: {
[type]: {
[id]: {
"": JSON.stringify({
title,
description,
tracks,
teammates,
projectLink,
Expand All @@ -224,7 +230,7 @@ const handleSubmit = () => {
description,
image,
backgroundImage,
type: `every.near/type/${type}`, // for later
type: `buildbox.near/type/${type}`, // for later
tags,
},
},
Expand All @@ -248,21 +254,21 @@ const handleSubmit = () => {
);
};

const pageDescription = `Congratulations for making it here! Please be sure to fill out all of the following fields in the suggested format so we can efficiently review them in the most efficient way.
const pageDescription = `Congratulations for making it here! Please be sure to fill out all of the following fields in the suggested format so we can review them in the most efficient way.
To be eligible for the Abstraction Hacks prize, you must:
- Submit to only one team for General Prize. For Mintbase, Potluck you can submit multiple.
- Have a public GitHub repository with a readme.md file.
- Include a video to a demo in your readme.md file.
- Submit to only one team for General Prize. For Mintbase, Potlock you can submit multiple.
- Have a public GitHub repository with a README.md file.
- Include a video to a demo in your README.md file.
- If submitting a previous project, you must have made significant changes during the hackathon.
- Specify which bounties you are tackling
**Additional Details**
- Submit to only one team: You may not submit the same project to multiple teams.
- Public GitHub repository: Your GitHub repository must be public so that the judges can view your code.
- Readme.md file: Your readme.md file should include a description of your project, how to run it, and any other relevant information.
- README.md file: Your README.md file should include a description of your project, how to run it, and any other relevant information.
- Video to a demo: Your video demo should show your project in action.
- Significant changes: If submitting a previous project, you must have made significant changes during the hackathon and provide proof of what you changed during the hackathon. This could includes adding dates and timestamps of any code written before and after the hackathon (ie: adding new features, improving the performance of your code, or fixing bugs).`;

Expand Down

0 comments on commit 367c552

Please sign in to comment.