on master help sign in
using, getting-started: add toc
commit6b14d8c8fdea7ea73d168abc2c5db7d4919623ec authorMatilde Park <matilde@tlon.io> dateTue 27 Jul 2021, 18:02 (5 years ago) parentbfdbfc0
4 files changed+12−18
content/getting-started/_index.md+3−8 content/getting-started/cli.md+5−9 pages/getting-started/[[...slug]].js+2 pages/using/[[...slug]].js+2−1
content/getting-started/_index.md+3−8
@@ -19,9 +19,8 @@ If you run Windows, or just want to give it a shot without worrying about the gr
1919 <label for="port-macos">MacOS</label>
2020 <div class="tab">
2121 <p>To install <strong>Port</strong> on MacOS simply download and open the <code>.dmg</code> file.</p>
22− <a href="https://github.com/urbit/port/releases/latest/download/Port.dmg" class="dib ph3 ba b--gray3 br2">
22+ <a href="https://github.com/urbit/port/releases/latest/download/Port.dmg" class="badge-sm bg-green text-white w-48">
2323 Download Port
24− <svg class="dib ml1" viewBox="0 0 842 1000" width="13.5" height="14" xmlns="http://www.w3.org/2000/svg"><path fill="#000000" d="M702 960c-54.2 52.6-114 44.4-171 19.6-60.6-25.3-116-26.9-180 0-79.7 34.4-122 24.4-170-19.6-271-279-231-704 77-720 74.7 4 127 41.3 171 44.4 65.4-13.3 128-51.4 198-46.4 84.1 6.8 147 40 189 99.7-173 104-132 332 26.9 396-31.8 83.5-72.6 166-141 227zM423 237C414.9 113 515.4 11 631 1c15.9 143-130 250-208 236z"/></svg>
2524 </a>
2625 </div>
2726
@@ -50,19 +49,13 @@ Or to install `snap` for your distribution, snapcraft provides [installation ins
5049 padding: .5rem;
5150 min-width: 70px;
5251 text-align: center;
53− border-width: 1px 0px 0px 1px;
54− border-style: solid;
5552 cursor: pointer;
5653 }
57− .os label:last-of-type {
58− border-right-width: 1px;
59− }
6054 .os input[type="radio"] {
6155 display: none;
6256 }
6357 .os .tab {
6458 display: none;
65− border: 1px solid;
6659 padding: 1rem;
6760 width: 100%;
6861 max-width: 100%;
@@ -75,6 +68,8 @@ Or to install `snap` for your distribution, snapcraft provides [installation ins
7568 }
7669 .os input[type='radio']:checked + label {
7770 font-weight: bold;
71+ background-color: rgba(244,243,241,1);
72+ border-radius: 0.5em;
7873 }
7974 .os input[type='radio']:checked + label + .tab {
8075 display: block;
content/getting-started/cli.md+5−9
@@ -11,7 +11,7 @@ If you're a power user, you can run the Urbit virtual machine directly using the
1111 <label for="macos">MacOS</label>
1212 <div class="tab">
1313
14−```sh
14+```bash
1515mkdir ~/urbit
1616cd ~/urbit
1717curl -JLO https://urbit.org/install/mac/latest
@@ -25,7 +25,7 @@ tar zxvf ./darwin.tgz --strip=1
2525 <label for="linux">Linux</label>
2626 <div class="tab">
2727
28−```sh
28+```shell
2929mkdir ~/urbit
3030cd ~/urbit
3131wget --content-disposition https://urbit.org/install/linux64/latest
@@ -35,7 +35,7 @@ tar zxvf ./linux64.tgz --strip=1
3535
3636Linux users may need to run this command in another terminal window to access your Urbit on port 80:
3737
38−```sh
38+```shell
3939sudo apt-get install libcap2-bin
4040sudo setcap 'cap_net_bind_service=+ep' ~/urbit/urbit
4141```
@@ -177,19 +177,13 @@ A comet also comes with a long and fairly unmemorable name whereas a planet has
177177 padding: .5rem;
178178 min-width: 70px;
179179 text-align: center;
180− border-width: 1px 0px 0px 1px;
181− border-style: solid;
182180 cursor: pointer;
183181 }
184− .os label:last-of-type {
185− border-right-width: 1px;
186− }
187182 .os input[type="radio"] {
188183 display: none;
189184 }
190185 .os .tab {
191186 display: none;
192− border: 1px solid;
193187 padding: 1rem;
194188 width: 100%;
195189 max-width: 100%;
@@ -202,6 +196,8 @@ A comet also comes with a long and fairly unmemorable name whereas a planet has
202196 }
203197 .os input[type='radio']:checked + label {
204198 font-weight: bold;
199+ background-color: rgba(244,243,241,1);
200+ border-radius: 0.5em;
205201 }
206202 .os input[type='radio']:checked + label + .tab {
207203 display: block;
pages/getting-started/[[...slug]].js+2
@@ -7,6 +7,7 @@ import { join } from "path";
77import { buildPageTree, getPage } from "../../lib/lib";
88import Markdown from "../../components/Markdown";
99import ContentArea from "../../components/ContentArea";
10+import { TableOfContents } from "../../components/TableOfContents";
1011import Sidebar from "../../components/Sidebar";
1112import markdownStyles from "../../styles/markdown.module.css";
1213import { decode } from "html-entities";
@@ -100,6 +101,7 @@ export default function UsingLayout({ posts, data, params, search, markdown }) {
100101 ></article>
101102 </div>
102103 </ContentArea>
104+ <TableOfContents key={params.slug?.join("/") || "getting-started"} />
103105 </div>
104106 </>
105107 );
pages/using/[[...slug]].js+2−1
@@ -8,6 +8,7 @@ import { join } from "path";
88import { getDocs, formatDate, buildPageTree, getPage } from "../../lib/lib";
99import Markdown from "../../components/Markdown";
1010import ContentArea from "../../components/ContentArea";
11+import { TableOfContents } from "../../components/TableOfContents";
1112import Sidebar from "../../components/Sidebar";
1213import markdownStyles from "../../styles/markdown.module.css";
1314import { decode } from "html-entities";
@@ -113,7 +114,6 @@ export default function UsingLayout({ posts, data, params, search, markdown }) {
113114 title={data.title}
114115 search={search}
115116 section={"Operator's Manual"}
116− narrow
117117 >
118118 <div className={markdownStyles["markdown"]}>
119119 <article
@@ -121,6 +121,7 @@ export default function UsingLayout({ posts, data, params, search, markdown }) {
121121 ></article>
122122 </div>
123123 </ContentArea>
124+ <TableOfContents key={params.slug?.join("/") || "using"} />
124125 </div>
125126 </>
126127 );