Skip to content

Commit

Permalink
generated specs starting to look nice
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin Berjon committed Dec 10, 2024
1 parent 20cfa41 commit 92f6292
Show file tree
Hide file tree
Showing 10 changed files with 268 additions and 113 deletions.
90 changes: 2 additions & 88 deletions brutal.css
Original file line number Diff line number Diff line change
@@ -1,71 +1,5 @@
@import "shared.css";

@font-face {
font-family: "Barlow";
src: url("fonts/Barlow-Regular.ttf");
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: "Barlow";
src: url("fonts/Barlow-Regular.ttf");
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: "Barlow";
src: url("fonts/Barlow-Italic.ttf");
font-weight: 400;
font-style: italic;
}
@font-face {
font-family: "Barlow";
src: url("fonts/Barlow-Bold.ttf");
font-weight: 700;
font-style: normal;
}
@font-face {
font-family: "Barlow";
src: url("fonts/Barlow-BoldItalic.ttf");
font-weight: 700;
font-style: italic;
}
@font-face {
font-family: "Barlow";
src: url("fonts/Barlow-Thin.ttf");
font-weight: 100;
font-style: normal;
}
@font-face {
font-family: "Barlow";
src: url("fonts/Barlow-ThinItalic.ttf");
font-weight: 100;
font-style: italic;
}

/* https://colorkit.co/palette/fff500-00ff75-cd76ea-ffb443-ff5e5e-39dbff/ */
:root {
--yellow: #fff500;
--green: #00ff75;
--purple: #cd76ea;
--orange: #ffb443;
--red: #ff5e5e;
--blue: #39dbff;
--contrasted: #00819e;
--content-width: 80rem;
--header-font-size: 1.6rem;
--brutal-border: 5px solid #000;
}
html, body {
margin: 0;
padding: 0;
font-family: Barlow;
}
main {
max-width: var(--content-width);
margin: auto;
min-height: 100vh;
padding: 1rem;
}
header {
display: flex;
border: var(--brutal-border);
Expand Down Expand Up @@ -121,9 +55,8 @@ h3 {
margin: 1rem;
font-weight: 400;
font-size: var(--header-font-size);

}
p, section > ul, section > ol {
p, section > ul, section > ol, section > dl {
margin: 0 1rem 1rem 1rem;
max-width: 70ch;
line-height: 1.4;
Expand All @@ -136,25 +69,6 @@ section > ul, section > ol {
section ul > li {
list-style-type: square;
}
a {
color: var(--contrasted);
text-decoration-thickness: 3px;
text-decoration-color: var(--blue);
}
a:hover {
text-decoration-color: var(--red);
}
dfn {
font-style: normal;
font-weight: 700;
}
var {
text-decoration: underline;
text-decoration-color: #ccc;
}
code {
font-size: 1rem;
}
#what > h2 { text-decoration-color: var(--orange); }
#code > h2 { text-decoration-color: var(--blue); }
#spec > h2 { text-decoration-color: var(--red); }
Expand Down
16 changes: 9 additions & 7 deletions cid.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Content IDs (CIDs)</title>
</head>
<body>
<p>
DASL CIDs are a strict subset of <a href="https://docs.ipfs.tech/concepts/content-addressing/">IPFS CIDs</a>
(but you don't need to understanding anything about IPFS to either use or implement them) with the following properties:
</p>
<link rel="stylesheet" href="spec.css"><link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><rect x=%220%22 y=%220%22 width=%22100%22 height=%22100%22 fill=%22%2300ff75%22></rect></svg>"><meta name="twitter:card" content="summary_large_image"><meta name="twitter:title" property="og:title" content="DASL: Content IDs (CIDs)"><meta name="twitter:description" property="og:description" content="DASL CIDs are a strict subset of IPFS CIDs (but you don't need to understanding anything about IPFS to either use or implement them) with the following properties:"><meta name="twitter:image" property="og:image" content="https://dasl.ing/banner.png"><meta name="twitter:image:alt" content="Very colourful stripes, so colourful it hurts"><meta name="twitter:url" property="og:url" content="https://dasl.ing/"><meta property="og:site_name" content="DASL"><meta property="og:locale" content="en"><meta name="theme-color" content="#00ff75"></head>
<body><div class="nav-back">A specification of the <a href="/">DASL Project</a>.</div><main><header><h1>Content IDs (CIDs)</h1><table><tr><th>date</th><td>2024-12-10</td></tr><tr><th>editors</th><td><a href="https://berjon.com/">Robin Berjon</a> &lt;<a href="mailto:[email protected]">[email protected]</a>&gt; &amp; <a href="https://bumblefudge.com/">Juan Caballero</a> &lt;<a href="mailto:[email protected]">[email protected]</a>&gt;</td></tr><tr><th>abstract</th><td><div id="abstract">
<p>
DASL CIDs are a strict subset of <a href="https://docs.ipfs.tech/concepts/content-addressing/">IPFS CIDs</a>
(but you don't need to understanding anything about IPFS to either use or implement them) with the following properties:
</p>
</div></td></tr></table></header>

<ul>
<li>Only modern CIDv1 CIDs are used, not legacy CIDv0.</li>
<li>
Expand Down Expand Up @@ -84,4 +86,4 @@
</ol>


</body></html>
</main></body></html>
10 changes: 6 additions & 4 deletions cid.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
<title>Content IDs (CIDs)</title>
</head>
<body>
<p>
DASL CIDs are a strict subset of <a href="https://docs.ipfs.tech/concepts/content-addressing/">IPFS CIDs</a>
(but you don't need to understanding anything about IPFS to either use or implement them) with the following properties:
</p>
<div id="abstract">
<p>
DASL CIDs are a strict subset of <a href="https://docs.ipfs.tech/concepts/content-addressing/">IPFS CIDs</a>
(but you don't need to understanding anything about IPFS to either use or implement them) with the following properties:
</p>
</div>
<ul>
<li>Only modern CIDv1 CIDs are used, not legacy CIDv0.</li>
<li>
Expand Down
14 changes: 9 additions & 5 deletions dcbor42.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Deterministic CBOR with tag 42 (dCBOR42)</title>
</head>
<body>
<link rel="stylesheet" href="spec.css"><link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><rect x=%220%22 y=%220%22 width=%22100%22 height=%22100%22 fill=%22%2300ff75%22></rect></svg>"><meta name="twitter:card" content="summary_large_image"><meta name="twitter:title" property="og:title" content="DASL: Deterministic CBOR with tag 42 (dCBOR42)"><meta name="twitter:description" property="og:description" content="dCBOR42 is a form of IPLD that serializes only to deterministic CBOR, by normalizing and reducing some type flexibility. Notably, we support no ADLs."><meta name="twitter:image" property="og:image" content="https://dasl.ing/banner.png"><meta name="twitter:image:alt" content="Very colourful stripes, so colourful it hurts"><meta name="twitter:url" property="og:url" content="https://dasl.ing/"><meta property="og:site_name" content="DASL"><meta property="og:locale" content="en"><meta name="theme-color" content="#00ff75"></head>
<body><div class="nav-back">A specification of the <a href="/">DASL Project</a>.</div><main><header><h1>Deterministic CBOR with tag 42 (dCBOR42)</h1><table><tr><th>date</th><td>2024-12-10</td></tr><tr><th>editors</th><td><a href="https://berjon.com/">Robin Berjon</a> &lt;<a href="mailto:[email protected]">[email protected]</a>&gt; &amp; <a href="https://bumblefudge.com/">Juan Caballero</a> &lt;<a href="mailto:[email protected]">[email protected]</a>&gt;</td></tr><tr><th>abstract</th><td><div id="abstract">
<p>
dCBOR42 is a form of IPLD that serializes only to deterministic CBOR, by normalizing and reducing some type
flexibility. Notably, we support no ADLs.
</p>
</div></td></tr></table></header>

<p>
dCBOR42 is a form of IPLD that serializes only to deterministic CBOR, by normalizing and reducing some type
flexibility. Notably, we support no ADLs.
(See the <a href="https://datatracker.ietf.org/doc/draft-mcnally-deterministic-cbor/">current draft specification for dCBOR</a>,
and <a href="https://ftp.linux.cz/pub/internet-drafts/draft-bormann-cbor-det-01.html">Carsten Bormann's BCP document
on the underspecified determinism of Section 4.2 of the CBOR specification</a>). For debugging purposes, either
Expand All @@ -19,4 +23,4 @@
</p>


</body></html>
</main></body></html>
8 changes: 6 additions & 2 deletions dcbor42.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@
<title>Deterministic CBOR with tag 42 (dCBOR42)</title>
</head>
<body>
<div id="abstract">
<p>
dCBOR42 is a form of IPLD that serializes only to deterministic CBOR, by normalizing and reducing some type
flexibility. Notably, we support no ADLs.
</p>
</div>
<p>
dCBOR42 is a form of IPLD that serializes only to deterministic CBOR, by normalizing and reducing some type
flexibility. Notably, we support no ADLs.
(See the <a href="https://datatracker.ietf.org/doc/draft-mcnally-deterministic-cbor/">current draft specification for dCBOR</a>,
and <a href="https://ftp.linux.cz/pub/internet-drafts/draft-bormann-cbor-det-01.html">Carsten Bormann's BCP document
on the underspecified determinism of Section 4.2 of the CBOR specification</a>). For debugging purposes, either
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
"version": "0.0.1",
"author": "Robin Berjon <[email protected]>",
"license": "Apache-2.0",
"scripts": {},
"scripts": {
"watch": "node --watch ./sisl.js --watch",
"build": "./sisl.js"
},
"bin": {},
"repository": {
"type": "git",
Expand Down
91 changes: 91 additions & 0 deletions shared.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@

@font-face {
font-family: "Barlow";
src: url("fonts/Barlow-Regular.ttf");
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: "Barlow";
src: url("fonts/Barlow-Regular.ttf");
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: "Barlow";
src: url("fonts/Barlow-Italic.ttf");
font-weight: 400;
font-style: italic;
}
@font-face {
font-family: "Barlow";
src: url("fonts/Barlow-Bold.ttf");
font-weight: 700;
font-style: normal;
}
@font-face {
font-family: "Barlow";
src: url("fonts/Barlow-BoldItalic.ttf");
font-weight: 700;
font-style: italic;
}
@font-face {
font-family: "Barlow";
src: url("fonts/Barlow-Thin.ttf");
font-weight: 100;
font-style: normal;
}
@font-face {
font-family: "Barlow";
src: url("fonts/Barlow-ThinItalic.ttf");
font-weight: 100;
font-style: italic;
}

/* https://colorkit.co/palette/fff500-00ff75-cd76ea-ffb443-ff5e5e-39dbff/ */
:root {
--yellow: #fff500;
--green: #00ff75;
--purple: #cd76ea;
--orange: #ffb443;
--red: #ff5e5e;
--blue: #39dbff;
--contrasted: #00819e;
--content-width: 80rem;
--spec-width: 800px;
--header-font-size: 1.6rem;
--brutal-border: 5px solid #000;
}
html, body {
margin: 0;
padding: 0;
font-family: Barlow;
}
main {
max-width: var(--content-width);
margin: auto;
min-height: 100vh;
padding: 1rem;
}
dd {
margin-bottom: 1rem;
}
a {
color: var(--contrasted);
text-decoration-thickness: 3px;
text-decoration-color: var(--blue);
}
a:hover {
text-decoration-color: var(--red);
}
dfn {
font-style: normal;
font-weight: 700;
}
var {
text-decoration: underline;
text-decoration-color: #ccc;
}
code {
font-size: 1rem;
}
Loading

0 comments on commit 92f6292

Please sign in to comment.