@@ -0,0 +1,157 @@
1+import Link from "next/link";
2+import { useState } from "react";
3+import { encode } from "html-entities";
4+import Container from "../../components/Container";
5+import Section from "../../components/Section";
6+import SingleColumn from "../../components/SingleColumn";
7+import { useInputChange } from "../../lib/hooks";
9+const SubmissionPage = () => {
10+ const [form, handleFormChange] = useInputChange();
11+ const [publicGroup, setPublicGroup] = useState(true);
13+ const href = `https://github.com/urbit/urbit.org/new/master?filename=/content/group/${
15+ }.md&value=${encodeURIComponent(
17+title = "${form?.groupName}"
18+shortcode = "${form?.shortcode}"
19+type = "${publicGroup ? "Public" : "Private"}"
20+image = "${form?.imageUrl || ""}"
21+participant_range = "${form?.members || ""}"
22+channels = "${form?.channels || ""}"
25+${form?.description || ""}`
31+ <Section narrow className="space-y-12">
32+ <div className="flex flex-col space-y-4">
33+ <h2>Submit your group</h2>
35+ Groups submissions are accomplished through a GitHub pull request.
38+ You’ll need <a href="https://github.com">a GitHub account</a>{" "}
39+ before you get started to submit your group.
42+ First, enter your information and then click “Submit with GitHub.”
43+ You’ll be directed to a GitHub pull request page with a
44+ pre-populated markdown file. Click “Propose new file,” and then
45+ “Create pull request” on the following page.
48+ Then, to validate that you operate this group, send a DM to{" "}
49+ <Link href="/id/~haddef-sigwen">
50+ <a>~haddef-sigwen</a>
52+ from your group host <code>@p</code> with a link to the pull
53+ request on GitHub. We’ll approve the pull request and your page
54+ will be online shortly.
57+ <div className="flex flex-col space-y-4">
58+ <h3>Enter your group information</h3>
59+ <div className="flex flex-col">
60+ <p>Group name (required)</p>
62+ className="bg-wall-100 p-2"
64+ onChange={handleFormChange}
67+ <div className="flex flex-col">
69+ <div className="flex space-x-4">
71+ className="flex items-center space-x-2 cursor-pointer"
72+ onClick={() => setPublicGroup(true)}
76+ onChange={() => null}
77+ checked={publicGroup}
82+ className="flex items-center space-x-2 cursor-pointer"
83+ onClick={() => setPublicGroup(false)}
87+ onChange={() => null}
88+ checked={!publicGroup}
94+ <div className="flex flex-col">
96+ Shortcode (e.g. <code>~bitbet-bolbel/urbit-community</code>)
100+ className="bg-wall-100 p-2"
102+ onChange={handleFormChange}
105+ <div className="flex flex-col">
106+ <p>Group image URL</p>
108+ className="bg-wall-100 p-2"
110+ onChange={handleFormChange}
113+ <div className="flex flex-col">
115+ Members (e.g. <code>1000+</code>)
118+ className="bg-wall-100 p-2"
120+ onChange={handleFormChange}
123+ <div className="flex flex-col">
125+ Channels (e.g. <code>7</code>)
128+ className="bg-wall-100 p-2"
130+ onChange={handleFormChange}
133+ <div className="flex flex-col">
136+ className="resize-none bg-wall-100 p-2 h-60"
138+ onChange={handleFormChange}
143+ className="button-lg bg-wall-600 text-wall-100"
144+ onClick={() => window.open(href)}
149+ <a className="text-xl pt-8 block font-semibold">Urbit.org</a>
157+export default SubmissionPage;