on master help sign in
Merge branch 'mp/footer-component' of https://github.com/urbit/urbit.org into mp/footer-component
b7f7f3dGordon
components/Header.js+16−10
@@ -89,41 +89,47 @@ export default function Header(props) {
89 }
89 }
90 <MenuTray isOpen={isOpen} setTray={setTray} search={props.search}>
90 <MenuTray isOpen={isOpen} setTray={setTray} search={props.search}>
91 <Link href="/" passHref>
91 <Link href="/" passHref>
92− <a className="type-ui mb-12">Urbit</a>
92+ <a className="font-semibold mb-4">Urbit</a>
93 </Link>
93 </Link>
94+ <Link href="https://urbit.org" passHref>
95+ <a className="font-semibold mt-2">Urbit.org</a>
96+ </Link>
97+ <Link href="https://operators.urbit.org" passHref>
98+ <a className="mt-2">Operators</a>
99+ </Link>
100+ <Link href="https://developers.urbit.org" passHref>
101+ <a className="mt-2 mb-4">Developers</a>
102+ </Link>
103+ <hr className="border-wall-200" />
94 <ActiveLink
104 <ActiveLink
95 currentPath={currentPath}
105 currentPath={currentPath}
96− className="mr-5 mb-4 type-h3"
106+ className="mt-4 mr-5 mb-4"
97 href="/manual"
107 href="/manual"
98 >
108 >
99 Manual
109 Manual
100 </ActiveLink>
110 </ActiveLink>
101 <ActiveLink
111 <ActiveLink
102 currentPath={currentPath}
112 currentPath={currentPath}
103− className="mr-5 mb-4 type-h3"
113+ className="mr-5 mb-4"
104 href="/blog"
114 href="/blog"
105 >
115 >
106 Blog
116 Blog
107 </ActiveLink>
117 </ActiveLink>
108 <ActiveLink
118 <ActiveLink
109 currentPath={currentPath}
119 currentPath={currentPath}
110− className="mr-5 mb-4 type-h3"
120+ className="mr-5 mb-4"
111 href="/events"
121 href="/events"
112 >
122 >
113 Events
123 Events
114 </ActiveLink>
124 </ActiveLink>
115 <ActiveLink
125 <ActiveLink
116 currentPath={currentPath}
126 currentPath={currentPath}
117− className="mr-5 mb-4 text-green-400 type-h3"
127+ className="mr-5 mb-4 text-green-400"
118 href="/getting-started"
128 href="/getting-started"
119 >
129 >
120 Get Started
130 Get Started
121 </ActiveLink>
131 </ActiveLink>
122− <ActiveLink
123− currentPath={currentPath}
132+ <ActiveLink currentPath={currentPath} className="mr-5 mb-4" href="/faq">
124− className="mr-5 mb-4 type-h3"
125− href="/faq"
126− >
127 FAQ
133 FAQ
128 </ActiveLink>
134 </ActiveLink>
129 </MenuTray>
135 </MenuTray>
components/Search.js+56
@@ -18,6 +18,7 @@ class Search extends Component {
18 this.glossarySearch = this.glossarySearch.bind(this);
18 this.glossarySearch = this.glossarySearch.bind(this);
19 this.patpSearch = this.patpSearch.bind(this);
19 this.patpSearch = this.patpSearch.bind(this);
20 this.devSearch = this.devSearch.bind(this);
20 this.devSearch = this.devSearch.bind(this);
21+ this.opsSearch = this.opsSearch.bind(this);
21 }
22 }
22
23
23 searchEndpoint(query) {
24 searchEndpoint(query) {
@@ -32,6 +33,10 @@ class Search extends Component {
32 return `/api/glossary?q=${encodeURIComponent(query)}`;
33 return `/api/glossary?q=${encodeURIComponent(query)}`;
33 }
34 }
34
35
36+ opsSearch(query) {
37+ return `/api/ops-search?q=${query}`;
38+ }
39+
35 patpSearch(query) {
40 patpSearch(query) {
36 return (
41 return (
37 (ob.isValidPatp(`~${deSig(query.toLowerCase())}`) &&
42 (ob.isValidPatp(`~${deSig(query.toLowerCase())}`) &&
@@ -100,11 +105,21 @@ class Search extends Component {
100 }));
105 }));
101 });
106 });
102
107
108+ const opsResults = await fetch(this.opsSearch(query))
109+ .then((res) => res.json())
110+ .then((res) => {
111+ return res.results.map((item) => ({
112+ type: "OPS_RESULT",
113+ content: item,
114+ }));
115+ });
116+
103 const list = [
117 const list = [
104 ...glossaryResults,
118 ...glossaryResults,
105 ...patpResult,
119 ...patpResult,
106 ...results,
120 ...results,
107 ...devResults,
121 ...devResults,
122+ ...opsResults,
108 ];
123 ];
109
124
110 this.setState({ results: list });
125 this.setState({ results: list });
@@ -311,6 +326,47 @@ class Search extends Component {
311 </li>
326 </li>
312 );
327 );
313 }
328 }
329+ if (item.type === "OPS_RESULT") {
330+ const opsItem = Object.assign({}, item.content);
331+ opsItem[
332+ "slug"
333+ ] = `https://operators.urbit.org${item.content.slug}`;
334+ return (
335+ <li
336+ className={`cursor-pointer flex text-left w-full ${
337+ selected ? "bg-green-400" : ""
338+ }`}
339+ {...getItemProps({
340+ key: item.content.link + "-" + index,
341+ index,
342+ item: opsItem,
343+ selected,
344+ })}
345+ >
346+ <div className="p-3">
347+ <p
348+ className={`font-medium text-base ${
349+ selected ? "text-white" : "text-wall-600"
350+ }`}
351+ >
352+ <span className="text-wall-400">
353+ {item.content.parent !== "Content"
354+ ? `operators.urbit.org / ${item.content.parent} /`
355+ : "operators.urbit.org /"}{" "}
356+ </span>
357+ {item.content.title}
358+ </p>
359+ <p
360+ className={`text-base font-regular text-small ${
361+ selected ? "text-midWhite" : "text-wall-500"
362+ }`}
363+ >
364+ {item.content.content}
365+ </p>
366+ </div>
367+ </li>
368+ );
369+ }
314 return null;
370 return null;
315 })
371 })
316 : null}
372 : null}
content/events/2022-07-22-urbit-outside-alta-plaza.mdnew file+22
@@ -0,0 +1,22 @@
1++++
2+title = "Urbit Outside: Alta Plaza Park"
3+starts = "2022-07-23T13:00:00"
4+ends = "2022-07-23T19:00:00"
5+timezone = "America/Los_Angeles"
6+location = "Alta Plaza Park, San Francisco, CA"
7+image = "https://media.urbit.org/meetups/FWW0KPAVsAAuhYs.jpg"
8+registration_url = "https://www.meetup.com/urbit-sf/events/286763342/"
9+description = "Urbit Outside in San Francisco"
10+dark = true
11+
12+
13++++
14+
15+![Urbit Outside](https://media.urbit.org/meetups/FWW0KPAVsAAuhYs.jpg)
16+
17+Please join us for a park meetup (picnic optional!) at Alta Plaza Park in Pacific Heights, SF, on Saturday, 7/23. We'll meet at 1:00PM and stay as long as people want to chat. Bring a jacket and your choice of food/drink.
18+Interested friends and the Urbit-curious are always welcome!
19+
20+**Time and date:** 13:00, 2022-07-2022
21+
22+**Place:** Alta Plaza Park, San Francisco, CA
lib/constants.js+28−48
@@ -67,76 +67,56 @@ export const updatesKeys = [
67export const footerData = [
67export const footerData = [
68 [
68 [
69 {
69 {
70− title: "Use Urbit",
70+ title: "~<br/>Urbit",
71 links: [
71 links: [
72 {
72 {
73− title: "Getting Started",
73+ title: "Home",
74− href: "/getting-started",
74+ href: "/",
75 },
75 },
76− { title: "User's Manual", href: "/using" },
76+ { title: "Get Started", href: "/getting-started" },
77 {
77 {
78− title: "Urbit Client",
78+ title: "Manual",
79− href: "https://github.com/urbit/port/releases",
79+ href: "/using",
80 },
80 },
81 {
81 {
82− title: "Urbit Binaries",
82+ title: "FAQ",
83− href: "https://github.com/urbit/urbit/releases",
83+ href: "/faq",
84 },
84 },
85 {
85 {
86− title: "Hosting Providers",
86+ title: "Events",
87− href: "http://localhost:3000/getting-started/planet#hosting-providers",
87+ href: "/events",
88+ },
89+ {
90+ title: "Blog",
91+ href: "/blog",
92+ },
93+ {
94+ title: "Grants",
95+ href: "/grants",
88 },
96 },
89 ],
97 ],
90 },
98 },
91 {
99 {
92− title: "About",
100+ title: " ",
93− links: [
94− { title: "What's Urbit?", href: "/understanding-urbit" },
95− { title: "Urbit ID", href: "/understanding-urbit/urbit-id" },
96− { title: "Urbit OS", href: "/understanding-urbit/urbit-os" },
97− { title: "Security Audits", href: "/audits" },
98− { title: "FAQ", href: "/faq" },
99− { title: "Whitepaper", href: "https://media.urbit.org/whitepaper.pdf" },
100− ],
101− },
102− {
103− title: "News",
104− links: [
105− { title: "Blog", href: "/blog" },
106− { title: "Events", href: "/events" },
107− { title: "Updates", href: "/updates" },
108− ],
109− },
110− {
111− title: "Develop",
112 links: [
101 links: [
113− { title: "Documentation", href: "https://developers.urbit.org" },
114 { title: "GitHub", href: "https://github.com/urbit" },
102 { title: "GitHub", href: "https://github.com/urbit" },
115 {
103 {
116 title: "Airlock APIs",
104 title: "Airlock APIs",
117 href: "https://github.com/urbit/awesome-urbit#http-apis-airlock",
105 href: "https://github.com/urbit/awesome-urbit#http-apis-airlock",
118 },
106 },
119− ],
120− },
121− {
122− title: "Contribute",
123− links: [
124 {
107 {
125− title: "Issue Tracker",
108+ title: "Urbit Binaries",
126− href: "https://github.com/urbit/urbit/issues",
109+ href: "https://github.com/urbit/urbit/releases",
110+ },
111+ {
112+ title: "Urbit Client",
113+ href: "https://github.com/urbit/port/releases",
127 },
114 },
128− { title: "Urbit Grants", href: "/grants" },
129− ],
130− },
131− {
132− title: "Community",
133− links: [
134 {
115 {
135− title: "Dev Mailing List",
116+ title: "Issue Tracker",
136− href: "https://groups.google.com/a/urbit.org/g/dev?pli=1",
117+ href: "https://github.com/urbit/urbit/issues",
137 },
118 },
138− { title: "Governance", href: "https://github.com/urbit/azimuth" },
119+ { title: "Whitepaper", href: "https://urbit.org/audits" },
139− { title: "Twitter", href: "https://twitter.com/urbit" },
140 ],
120 ],
141 },
121 },
142 ],
122 ],
pages/api/ops-search.jsnew file+8
@@ -0,0 +1,8 @@
1+export default async (req, res) => {
2+ const results = await fetch(
3+ `https://operators.urbit.org/api/search?q=${req.query.q}`
4+ ).then((res) => res.json());
5+ res.statusCode = 200;
6+ res.setHeader("Content-Type", "application/json");
7+ res.end(JSON.stringify(results));
8+};