Implement basic site

This commit is contained in:
Shav Kinderlehrer 2023-11-08 00:40:24 -05:00
parent dd7bdee2a7
commit a0810fc71e
8 changed files with 1554 additions and 3 deletions

File diff suppressed because one or more lines are too long

395
src/app.css Normal file
View File

@ -0,0 +1,395 @@
html {
font-family: "Lato", sans-serif;
color: #1a1a1a;
background-color: #fdfdfd;
}
body {
margin: 0 auto;
max-width: 36em;
padding-left: 50px;
padding-right: 50px;
padding-top: 50px;
padding-bottom: 50px;
hyphens: auto;
overflow-wrap: break-word;
text-rendering: optimizeLegibility;
font-kerning: normal;
}
@media (max-width: 600px) {
body {
font-size: 0.9em;
padding: 12px;
}
h1 {
font-size: 1.8em;
}
}
@media print {
html {
background-color: white;
}
body {
background-color: transparent;
color: black;
font-size: 12pt;
}
p, h2, h3 {
orphans: 3;
widows: 3;
}
h2, h3, h4 {
page-break-after: avoid;
}
}
p {
margin: 1em 0;
}
a {
color: #1a1a1a;
}
a:visited {
color: #1a1a1a;
}
img {
max-width: 100%;
}
svg {
height: auto;
max-width: 100%;
}
h1, h2, h3, h4, h5, h6 {
margin-top: 1.4em;
}
h5, h6 {
font-size: 1em;
font-style: italic;
}
h6 {
font-weight: normal;
}
ol, ul {
padding-left: 1.7em;
margin-top: 1em;
}
li > ol, li > ul {
margin-top: 0;
}
blockquote {
margin: 1em 0 1em 1.7em;
padding-left: 1em;
border-left: 2px solid #e6e6e6;
color: #606060;
}
code {
font-family: "JetBrainsMono Nerd Font Mono", monospace;
font-size: 85%;
margin: 0;
hyphens: manual;
}
pre {
margin: 1em 0;
overflow: auto;
}
pre code {
padding: 0;
overflow: visible;
overlow-wrap: normal;
}
.sourceCode {
background-color: transparent;
overflow: visible;
}
hr {
background-color: #1a1a1a;
border: none;
height: 1px;
margin: 1em 0;
}
table {
margin: 1em 0;
border-collapse: collapse;
width: 100%;
overflow-x: auto;
display: block;
font-variant-numeric: lining-nums tabular-nums;
}
table caption {
margin-bottom: 0.75em;
}
tbody {
margin-top: 0.5em;
border-top: 1px solid #1a1a1a;
border-bottom: 1px solid #1a1a1a;
}
th {
border-top: 1px solid #1a1a1a;
padding: 0.25em 0.5em 0.25em 0.5em;
}
td {
padding: 0.125em 0.5em 0.25em 0.5em;
}
header {
margin-bottom: 4em;
text-align: center;
}
#TOC li {
list-style: none;
}
#TOC ul {
padding-left: 1.3em;
}
#TOC > ul {
padding-left: 0;
}
#TOC a:not(:hover) {
text-decoration: none;
}
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
/* The extra [class] is a hack that increases specificity enough to
override a similar rule in reveal.js */
ul.task-list[class]{list-style: none;}
ul.task-list li input[type="checkbox"] {
font-size: inherit;
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
/* CSS for syntax highlighting */
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
pre.numberSource code > span
{ position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
{ content: counter(source-line);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
background-color: #ffffff;
color: #a0a0a0;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #a0a0a0; padding-left: 4px; }
div.sourceCode
{ color: #1f1c1b; background-color: #ffffff; }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span { color: #1f1c1b; } /* Normal */
code span.al { color: #bf0303; background-color: #f7e6e6; font-weight: bold; } /* Alert */
code span.an { color: #ca60ca; } /* Annotation */
code span.at { color: #0057ae; } /* Attribute */
code span.bn { color: #b08000; } /* BaseN */
code span.bu { color: #644a9b; font-weight: bold; } /* BuiltIn */
code span.cf { color: #1f1c1b; font-weight: bold; } /* ControlFlow */
code span.ch { color: #924c9d; } /* Char */
code span.cn { color: #aa5500; } /* Constant */
code span.co { color: #898887; } /* Comment */
code span.cv { color: #0095ff; } /* CommentVar */
code span.do { color: #607880; } /* Documentation */
code span.dt { color: #0057ae; } /* DataType */
code span.dv { color: #b08000; } /* DecVal */
code span.er { color: #bf0303; text-decoration: underline; } /* Error */
code span.ex { color: #0095ff; font-weight: bold; } /* Extension */
code span.fl { color: #b08000; } /* Float */
code span.fu { color: #644a9b; } /* Function */
code span.im { color: #ff5500; } /* Import */
code span.in { color: #b08000; } /* Information */
code span.kw { color: #1f1c1b; font-weight: bold; } /* Keyword */
code span.op { color: #1f1c1b; } /* Operator */
code span.ot { color: #006e28; } /* Other */
code span.pp { color: #006e28; } /* Preprocessor */
code span.re { color: #0057ae; background-color: #e0e9f8; } /* RegionMarker */
code span.sc { color: #3daee9; } /* SpecialChar */
code span.ss { color: #ff5500; } /* SpecialString */
code span.st { color: #bf0303; } /* String */
code span.va { color: #0057ae; } /* Variable */
code span.vs { color: #bf0303; } /* VerbatimString */
code span.wa { color: #bf0303; } /* Warning */
/* figures */
figure {
text-align: center;
}
figcaption {
color: #aaa;
}
img.nofig + figcaption {
display: none;
}
/* chapter numbers */
.toc-section-number,
.header-section-number {
color: #aaa;
}
:is(h4, h5, h6) > .header-section-number,
h4 > .header-section-number,
h5 > .header-section-number,
h6 > .header-section-number {
display: none;
}
.header-section-number {
font-size: 0.7em;
}
.header-section-number::before {
content: "Section ";
}
.header-section-number::after {
content: ":\a";
white-space: pre;
}
/* sourcecode and sidenotes frame */
pre:not(.sourceCode),
div.sourceCode,
.sidenote {
padding: 5px;
border-radius: 3px;
border: 1px solid #e3e3e3;
background-color: #f5f5f5;
}
.sidenote br:last-child {
display: none;
}
/* Sidenotes */
main {
counter-reset: sidenote-counter;
}
.sidenote-number {
counter-increment: sidenote-counter;
}
.sidenote-number::before,
.sidenote::before
/*.sidenote-number::after*/ {
color: #666;
content: "⊕";
position: relative;
}
nav#TOC label,
label.margin-toggle:not(.sidenote-number),
.sidenote::before,
.sidenote-number::before {
vertical-align: baseline;
position: relative;
top: -0.4rem;
font-size: 0.9rem;
}
.sidenote-number::before {
top: 0 !important;
}
.sidenote::before {
left: -6px;
}
.sidenote {
text-indent: 9px;
font-size: 0.8rem;
}
input.margin-toggle {
display: none;
}
label.margin-toggle:not(.sidenote-number) {
display: none;
}
label.sidenote-number {
display: inline;
}
@media (max-width: 750px) {
.margin-toggle:checked + .sidenote,
.margin-toggle:checked + .marginnote {
vertical-align: baseline;
}
.sidenote-number::before,
.sidenote::before
/*.sidenote-number::after*/ {
content: "⦾";
}
label.margin-toggle {
/*color: ;*/
}
label.margin-toggle:not(.sidenote-number) {
display: inline;
}
label {
cursor: pointer;
}
.sidenote-number::after,
.sidenote,
.marginnote {
display: none;
}
.margin-toggle:checked + .sidenote,
.margin-toggle:checked + .marginnote {
display: block;
float: left;
clear: both;
width: 100%;
max-width: 100%;
}
.margin-toggle:checked + .sidenote::before {
content: "⦿";
}
}
.sidenote-number::after,
.sidenote,
.marginnote {
--max-width: min(calc((100vw - 36em) / 2 - 1em), 18em);
--width: calc(var(--max-width) - 0.5em);
}
.sidenote,
.marginnote {
float: right;
position: relative;
width: var(--width);
max-width: var(--max-width);
margin-right: calc(-1 * ((100vw - 36em) / 2 - 5rem));
}

43
src/routes/+layout.svelte Normal file
View File

@ -0,0 +1,43 @@
<script lang="ts">
import "../app.css";
</script>
<main>
<div id="header">
<div class="section" data-title="versions">
<br />
<a href="/v0-1-0-alpha">v0.1.0-alpha</a>
</div>
<div class="spacer" />
<div class="section" data-title="software">
<br />
<a href="/software">implementations</a>
</div>
</div>
<slot />
</main>
<style>
a {
margin: 3px;
}
#header {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: center;
align-items: baseline;
}
.spacer {
width: 2em;
}
.section::before {
content: attr(data-title) ":";
color: #aaa;
}
</style>

View File

@ -1,2 +1,7 @@
<h1>Welcome to SvelteKit</h1> <script lang="ts">
<p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p> import spec from "spec/molerat-v0.1.0-alpha.html?raw";
</script>
<main>
{@html spec}
</main>

View File

@ -0,0 +1,19 @@
<main>
<h1>Molerat Implementations</h1>
<div class="section">
<h2>Servers</h2>
<ul>
<li>
<a href="https://github.com/secondary-smiles/moleserv">Moleserv</a> - Python library
for creating Molerat servers.
</li>
</ul>
</div>
<div class="section">
<h2>Clients</h2>
<ul>
</ul>
</div>
</main>

View File

@ -0,0 +1,7 @@
<script lang="ts">
import spec from "spec/molerat-v0.1.0-alpha.html?raw";
</script>
<main>
{@html spec}
</main>

395
style.css Normal file
View File

@ -0,0 +1,395 @@
html {
font-family: "Lato", sans-serif;
color: #1a1a1a;
background-color: #fdfdfd;
}
body {
margin: 0 auto;
max-width: 36em;
padding-left: 50px;
padding-right: 50px;
padding-top: 50px;
padding-bottom: 50px;
hyphens: auto;
overflow-wrap: break-word;
text-rendering: optimizeLegibility;
font-kerning: normal;
}
@media (max-width: 600px) {
body {
font-size: 0.9em;
padding: 12px;
}
h1 {
font-size: 1.8em;
}
}
@media print {
html {
background-color: white;
}
body {
background-color: transparent;
color: black;
font-size: 12pt;
}
p, h2, h3 {
orphans: 3;
widows: 3;
}
h2, h3, h4 {
page-break-after: avoid;
}
}
p {
margin: 1em 0;
}
a {
color: #1a1a1a;
}
a:visited {
color: #1a1a1a;
}
img {
max-width: 100%;
}
svg {
height: auto;
max-width: 100%;
}
h1, h2, h3, h4, h5, h6 {
margin-top: 1.4em;
}
h5, h6 {
font-size: 1em;
font-style: italic;
}
h6 {
font-weight: normal;
}
ol, ul {
padding-left: 1.7em;
margin-top: 1em;
}
li > ol, li > ul {
margin-top: 0;
}
blockquote {
margin: 1em 0 1em 1.7em;
padding-left: 1em;
border-left: 2px solid #e6e6e6;
color: #606060;
}
code {
font-family: "JetBrainsMono Nerd Font Mono", monospace;
font-size: 85%;
margin: 0;
hyphens: manual;
}
pre {
margin: 1em 0;
overflow: auto;
}
pre code {
padding: 0;
overflow: visible;
overlow-wrap: normal;
}
.sourceCode {
background-color: transparent;
overflow: visible;
}
hr {
background-color: #1a1a1a;
border: none;
height: 1px;
margin: 1em 0;
}
table {
margin: 1em 0;
border-collapse: collapse;
width: 100%;
overflow-x: auto;
display: block;
font-variant-numeric: lining-nums tabular-nums;
}
table caption {
margin-bottom: 0.75em;
}
tbody {
margin-top: 0.5em;
border-top: 1px solid #1a1a1a;
border-bottom: 1px solid #1a1a1a;
}
th {
border-top: 1px solid #1a1a1a;
padding: 0.25em 0.5em 0.25em 0.5em;
}
td {
padding: 0.125em 0.5em 0.25em 0.5em;
}
header {
margin-bottom: 4em;
text-align: center;
}
#TOC li {
list-style: none;
}
#TOC ul {
padding-left: 1.3em;
}
#TOC > ul {
padding-left: 0;
}
#TOC a:not(:hover) {
text-decoration: none;
}
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
/* The extra [class] is a hack that increases specificity enough to
override a similar rule in reveal.js */
ul.task-list[class]{list-style: none;}
ul.task-list li input[type="checkbox"] {
font-size: inherit;
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
/* CSS for syntax highlighting */
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
pre.numberSource code > span
{ position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
{ content: counter(source-line);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
background-color: #ffffff;
color: #a0a0a0;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #a0a0a0; padding-left: 4px; }
div.sourceCode
{ color: #1f1c1b; background-color: #ffffff; }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span { color: #1f1c1b; } /* Normal */
code span.al { color: #bf0303; background-color: #f7e6e6; font-weight: bold; } /* Alert */
code span.an { color: #ca60ca; } /* Annotation */
code span.at { color: #0057ae; } /* Attribute */
code span.bn { color: #b08000; } /* BaseN */
code span.bu { color: #644a9b; font-weight: bold; } /* BuiltIn */
code span.cf { color: #1f1c1b; font-weight: bold; } /* ControlFlow */
code span.ch { color: #924c9d; } /* Char */
code span.cn { color: #aa5500; } /* Constant */
code span.co { color: #898887; } /* Comment */
code span.cv { color: #0095ff; } /* CommentVar */
code span.do { color: #607880; } /* Documentation */
code span.dt { color: #0057ae; } /* DataType */
code span.dv { color: #b08000; } /* DecVal */
code span.er { color: #bf0303; text-decoration: underline; } /* Error */
code span.ex { color: #0095ff; font-weight: bold; } /* Extension */
code span.fl { color: #b08000; } /* Float */
code span.fu { color: #644a9b; } /* Function */
code span.im { color: #ff5500; } /* Import */
code span.in { color: #b08000; } /* Information */
code span.kw { color: #1f1c1b; font-weight: bold; } /* Keyword */
code span.op { color: #1f1c1b; } /* Operator */
code span.ot { color: #006e28; } /* Other */
code span.pp { color: #006e28; } /* Preprocessor */
code span.re { color: #0057ae; background-color: #e0e9f8; } /* RegionMarker */
code span.sc { color: #3daee9; } /* SpecialChar */
code span.ss { color: #ff5500; } /* SpecialString */
code span.st { color: #bf0303; } /* String */
code span.va { color: #0057ae; } /* Variable */
code span.vs { color: #bf0303; } /* VerbatimString */
code span.wa { color: #bf0303; } /* Warning */
/* figures */
figure {
text-align: center;
}
figcaption {
color: #aaa;
}
img.nofig + figcaption {
display: none;
}
/* chapter numbers */
.toc-section-number,
.header-section-number {
color: #aaa;
}
:is(h4, h5, h6) > .header-section-number,
h4 > .header-section-number,
h5 > .header-section-number,
h6 > .header-section-number {
display: none;
}
.header-section-number {
font-size: 0.7em;
}
.header-section-number::before {
content: "Section ";
}
.header-section-number::after {
content: ":\a";
white-space: pre;
}
/* sourcecode and sidenotes frame */
pre:not(.sourceCode),
div.sourceCode,
.sidenote {
padding: 5px;
border-radius: 3px;
border: 1px solid #e3e3e3;
background-color: #f5f5f5;
}
.sidenote br:last-child {
display: none;
}
/* Sidenotes */
main {
counter-reset: sidenote-counter;
}
.sidenote-number {
counter-increment: sidenote-counter;
}
.sidenote-number::before,
.sidenote::before
/*.sidenote-number::after*/ {
color: #666;
content: "⊕";
position: relative;
}
nav#TOC label,
label.margin-toggle:not(.sidenote-number),
.sidenote::before,
.sidenote-number::before {
vertical-align: baseline;
position: relative;
top: -0.4rem;
font-size: 0.9rem;
}
.sidenote-number::before {
top: 0 !important;
}
.sidenote::before {
left: -6px;
}
.sidenote {
text-indent: 9px;
font-size: 0.8rem;
}
input.margin-toggle {
display: none;
}
label.margin-toggle:not(.sidenote-number) {
display: none;
}
label.sidenote-number {
display: inline;
}
@media (max-width: 750px) {
.margin-toggle:checked + .sidenote,
.margin-toggle:checked + .marginnote {
vertical-align: baseline;
}
.sidenote-number::before,
.sidenote::before
/*.sidenote-number::after*/ {
content: "⦾";
}
label.margin-toggle {
/*color: ;*/
}
label.margin-toggle:not(.sidenote-number) {
display: inline;
}
label {
cursor: pointer;
}
.sidenote-number::after,
.sidenote,
.marginnote {
display: none;
}
.margin-toggle:checked + .sidenote,
.margin-toggle:checked + .marginnote {
display: block;
float: left;
clear: both;
width: 100%;
max-width: 100%;
}
.margin-toggle:checked + .sidenote::before {
content: "⦿";
}
}
.sidenote-number::after,
.sidenote,
.marginnote {
--max-width: min(calc((100vw - 36em) / 2 - 1em), 18em);
--width: calc(var(--max-width) - 0.5em);
}
.sidenote,
.marginnote {
float: right;
position: relative;
width: var(--width);
max-width: var(--max-width);
margin-right: calc(-1 * ((100vw - 36em) / 2 - 5rem));
}

View File

@ -11,7 +11,11 @@ const config = {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
// If your environment is not supported or you settled on a specific environment, switch out the adapter. // If your environment is not supported or you settled on a specific environment, switch out the adapter.
// See https://kit.svelte.dev/docs/adapters for more information about adapters. // See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: adapter() adapter: adapter(),
alias: {
"spec/*": "spec/*"
}
} }
}; };