Initial commit

main
Shadowfacts 4 months ago
commit 358791d1a7

@ -0,0 +1,2 @@
[env]
DATABASE_URL="sqlite://db.sqlite"

2
.gitattributes vendored

@ -0,0 +1,2 @@
*.mp4 filter=lfs diff=lfs merge=lfs -text
*.webm filter=lfs diff=lfs merge=lfs -text

5
.gitignore vendored

@ -0,0 +1,5 @@
*.pem
/out
/target
.DS_Store
db.sqlite*

2798
Cargo.lock generated

File diff suppressed because it is too large Load Diff

@ -0,0 +1,75 @@
[package]
name = "v6"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
activitystreams = "0.7.0-alpha.22"
activitystreams-ext = "0.1.0-alpha.3"
ammonia = "3.2"
anyhow = "1.0"
askama = "0.11.1"
axum = "0.5.6"
base64 = "0.13"
chrono = { version = "0.4", features = ["serde"] }
clap = { version = "3.1", features = ["cargo"] }
env_logger = "0.9"
futures = "0.3"
html5ever = "0.26"
http-signature-normalization = "0.6"
hyper = "0.14"
log = "0.4"
markup5ever_rcdom = "0.2"
mime = "0.3"
notify = "5.0.0-pre.16"
notify-debouncer-mini = { version = "*", default-features = false }
once_cell = "1.13"
# NOTE: openssl version also needs to be updated in ios target config below
openssl = "0.10"
pulldown-cmark = "0.9"
regex = "1.5"
reqwest = { version = "0.11", features = ["json"] }
rsass = "0.25"
rss = { version = "2.0", features = ["atom"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
splash-rs = { version = "0.2.0", git = "https://git.shadowfacts.net/shadowfacts/splash-rs.git" }
sqlx = { version = "0.5", features = ["runtime-tokio-native-tls", "sqlite"] }
thiserror = "1.0"
tokio = { version = "1.18", features = ["full"] }
tokio-cron-scheduler = "0.8"
tokio-stream = { version = "0.1.8", features = ["fs"] }
toml = "0.5"
tower = "0.4"
tower-http = { version = "0.3", features = ["fs"] }
tree-sitter-bash = "0.20"
tree-sitter-c = "0.20"
tree-sitter-css = { version = "0.20", git = "https://github.com/tree-sitter/tree-sitter-css.git" }
tree-sitter-elixir = { version = "0.19", git = "https://github.com/elixir-lang/tree-sitter-elixir.git" }
tree-sitter-highlight = "0.20"
tree-sitter-html = "0.20"
tree-sitter-java = "0.20"
tree-sitter-javascript = "0.20"
tree-sitter-json = { version = "0.20", git = "https://github.com/tree-sitter/tree-sitter-json.git" }
tree-sitter-objc = { version = "1.0.0", git = "https://github.com/jiyee/tree-sitter-objc.git" }
tree-sitter-rust = "0.20"
unicode-normalization = "0.1.19"
url = "2.2"
uuid = { version = "1.1", features = ["v4" ] }
[patch.crates-io]
tree-sitter-bash = { git = "https://git.shadowfacts.net/shadowfacts/tree-sitter-bash.git" }
tree-sitter-java = { git = "https://github.com/tree-sitter/tree-sitter-java.git" }
tree-sitter-html = { git = "https://git.shadowfacts.net/shadowfacts/tree-sitter-html.git" }
# openssl-src = { path = "../openssl-src-rs" }
[patch."https://github.com/tree-sitter/tree-sitter-css.git"]
tree-sitter-css = { git = "https://git.shadowfacts.net/shadowfacts/tree-sitter-css.git" }
[patch."https://github.com/jiyee/tree-sitter-objc.git"]
tree-sitter-objc = { git = "https://git.shadowfacts.net/shadowfacts/tree-sitter-objc.git" }
[target.'cfg(target_os = "ios")'.dependencies]
openssl = { version = "0.10", features = ["vendored"] }

@ -0,0 +1,3 @@
# highlight-swift
A description of this package.

@ -0,0 +1,2 @@
[general]
dirs = ["site"]

@ -0,0 +1,5 @@
// generated by `sqlx migrate build-script`
fn main() {
// trigger recompilation when a new migration is added
println!("cargo:rerun-if-changed=migrations");
}

@ -0,0 +1,28 @@
create table if not exists articles (
id text primary key not null,
conversation text not null,
has_federated boolean not null,
article_object text not null
);
create table if not exists actors (
id text primary key not null,
actor_object text not null,
is_follower boolean not null default 0,
display_name text,
inbox text not null,
shared_inbox text,
icon_url text,
public_key_pem text
);
create table if not exists notes (
id text primary key not null,
content text not null,
in_reply_to text not null,
conversation text not null,
published text not null, -- RFC 3339 formatted date (e.g., 1985-04-12T23:20:50.52Z)
actor_id text not null,
digested boolean not null default 0,
foreign key (actor_id) references actors (id) on delete cascade
);

@ -0,0 +1,20 @@
{% extends "layout/default.html" %}
{% block title %}Archive{% endblock %}
{% block content %}
{% for (year, posts) in years %}
<h2>{{ year }}</h2>
<ul>
{% for post in posts %}
<li>
<a href="{{ post.permalink() }}">
{{ post.metadata.title }}
</a>
</li>
{% endfor %}
</ul>
{% endfor %}
{% endblock %}

@ -0,0 +1,5 @@
@import "light.scss";
@media (prefers-color-scheme: dark) {
@import "dark.scss";
}

@ -0,0 +1,59 @@
:root {
--accent-color: var(--dark-accent-color);
--content-background-color: var(--dark-content-background-color);
--shadow-color: var(--dark-shadow-color);
--ui-background-color: var(--dark-ui-background-color);
--ui-text-color: var(--dark-ui-text-color);
--secondary-ui-text-color: var(--dark-secondary-ui-text-color);
--content-text-color: var(--dark-content-text-color);
--aside-background: var(--dark-aside-background);
--aside-border: var(--dark-aside-border);
--aside-warning-background: var(--dark-aside-warning-background);
--aside-warning-border: var(--dark-aside-warning-border);
--webring-background: var(--dark-webring-background);
// Syntax highdarking
--atom-base: var(--dark-atom-base);
--atom-mono-1: var(--dark-atom-mono-1);
--atom-mono-2: var(--dark-atom-mono-2);
--atom-mono-3: var(--dark-atom-mono-3);
--atom-hue-1: var(--dark-atom-hue-1);
--atom-hue-2: var(--dark-atom-hue-2);
--atom-hue-3: var(--dark-atom-hue-3);
--atom-hue-4: var(--dark-atom-hue-4);
--atom-hue-5: var(--dark-atom-hue-5);
--atom-hue-5-2: var(--dark-atom-hue-5-2);
--atom-hue-6: var(--dark-atom-hue-6);
--atom-hue-6-2: var(--dark-atom-hue-6-2);
}
.theme-inverted {
--accent-color: var(--light-accent-color);
--content-background-color: var(--light-content-background-color);
--shadow-color: var(--light-shadow-color);
--ui-background-color: var(--light-ui-background-color);
--ui-text-color: var(--light-ui-text-color);
--secondary-ui-text-color: var(--light-secondary-ui-text-color);
--content-text-color: var(--light-content-text-color);
--aside-background: var(--light-aside-background);
--aside-border: var(--light-aside-border);
--aside-warning-background: var(--light-aside-warning-background);
--aside-warning-border: var(--light-aside-warning-border);
// Syntax highlighting
--atom-base: var(--light-atom-base);
--atom-mono-1: var(--light-atom-mono-1);
--atom-mono-2: var(--light-atom-mono-2);
--atom-mono-3: var(--light-atom-mono-3);
--atom-hue-1: var(--light-atom-hue-1);
--atom-hue-2: var(--light-atom-hue-2);
--atom-hue-3: var(--light-atom-hue-3);
--atom-hue-4: var(--light-atom-hue-4);
--atom-hue-5: var(--light-atom-hue-5);
--atom-hue-5-2: var(--light-atom-hue-5-2);
--atom-hue-6: var(--light-atom-hue-6);
--atom-hue-6-2: var(--light-atom-hue-6-2);
}

@ -0,0 +1,59 @@
:root {
--accent-color: var(--light-accent-color);
--content-background-color: var(--light-content-background-color);
--shadow-color: var(--light-shadow-color);
--ui-background-color: var(--light-ui-background-color);
--ui-text-color: var(--light-ui-text-color);
--secondary-ui-text-color: var(--light-secondary-ui-text-color);
--content-text-color: var(--light-content-text-color);
--aside-background: var(--light-aside-background);
--aside-border: var(--light-aside-border);
--aside-warning-background: var(--light-aside-warning-background);
--aside-warning-border: var(--light-aside-warning-border);
--webring-background: var(--light-webring-background);
// Syntax highlighting
--atom-base: var(--light-atom-base);
--atom-mono-1: var(--light-atom-mono-1);
--atom-mono-2: var(--light-atom-mono-2);
--atom-mono-3: var(--light-atom-mono-3);
--atom-hue-1: var(--light-atom-hue-1);
--atom-hue-2: var(--light-atom-hue-2);
--atom-hue-3: var(--light-atom-hue-3);
--atom-hue-4: var(--light-atom-hue-4);
--atom-hue-5: var(--light-atom-hue-5);
--atom-hue-5-2: var(--light-atom-hue-5-2);
--atom-hue-6: var(--light-atom-hue-6);
--atom-hue-6-2: var(--light-atom-hue-6-2);
}
.theme-inverted {
--accent-color: var(--dark-accent-color);
--content-background-color: var(--dark-content-background-color);
--shadow-color: var(--dark-shadow-color);
--ui-background-color: var(--dark-ui-background-color);
--ui-text-color: var(--dark-ui-text-color);
--secondary-ui-text-color: var(--dark-secondary-ui-text-color);
--content-text-color: var(--dark-content-text-color);
--aside-background: var(--dark-aside-background);
--aside-border: var(--dark-aside-border);
--aside-warning-background: var(--dark-aside-warning-background);
--aside-warning-border: var(--dark-aside-warning-border);
// Syntax highdarking
--atom-base: var(--dark-atom-base);
--atom-mono-1: var(--dark-atom-mono-1);
--atom-mono-2: var(--dark-atom-mono-2);
--atom-mono-3: var(--dark-atom-mono-3);
--atom-hue-1: var(--dark-atom-hue-1);
--atom-hue-2: var(--dark-atom-hue-2);
--atom-hue-3: var(--dark-atom-hue-3);
--atom-hue-4: var(--dark-atom-hue-4);
--atom-hue-5: var(--dark-atom-hue-5);
--atom-hue-5-2: var(--dark-atom-hue-5-2);
--atom-hue-6: var(--dark-atom-hue-6);
--atom-hue-6-2: var(--dark-atom-hue-6-2);
}

@ -0,0 +1,931 @@
@import "normalize.scss";
@import "syntax-highlighting.scss";
$light-accent-color: #0638d0;
$dark-accent-color: #f9c72f;
:root {
// Theme colors
--light-accent-color: #{$light-accent-color};
--dark-accent-color: #{$dark-accent-color};
--light-content-background-color: white;
--dark-content-background-color: #111;
--light-shadow-color: #f7f7f7;
--dark-shadow-color: #151515;
--light-ui-background-color: white;
--dark-ui-background-color: #111;
--light-ui-text-color: black;
--dark-ui-text-color: white;
--light-secondary-ui-text-color: #666;
--dark-secondary-ui-text-color: #999;
--light-content-text-color: #222;
--dark-content-text-color: #ddd;
--light-aside-background: #{lighten($light-accent-color, 50%)};
--dark-aside-background: #{darken($dark-accent-color, 50%)};
--light-aside-border: #{darken($light-accent-color, 10%)};
--dark-aside-border: #{darken($dark-accent-color, 10%)};
--light-aside-warning-background: #{lighten(#c6322f, 40%)};
--dark-aside-warning-background: #{darken(#c6322f, 40%)};
--light-aside-warning-border: #c6322f;
--dark-aside-warning-border: #c6322f;
--light-webring-background: linear-gradient(135deg, #855988, #6b4984, #483475, #2b2f77, #141852);
--dark-webring-background: linear-gradient(135deg, rgba(128, 224, 105, 1), rgba(128, 224, 105, 0.7));
// Syntax highlighting
--light-atom-base: #fafafa;
--dark-atom-base: #282c34;
--light-atom-mono-1: #383a42;
--dark-atom-mono-1: #abb2bf;
--light-atom-mono-2: #686b77;
--dark-atom-mono-2: #818896;
--light-atom-mono-3: #a0a1a7;
--dark-atom-mono-3: #5c6370;
--light-atom-hue-1: #0184bb;
--dark-atom-hue-1: #56b6c2;
--light-atom-hue-2: #4078f2;
--dark-atom-hue-2: #61aeee;
--light-atom-hue-3: #a626a4;
--dark-atom-hue-3: #c678dd;
--light-atom-hue-4: #50a14f;
--dark-atom-hue-4: #98c379;
--light-atom-hue-5: #e45649;
--dark-atom-hue-5: #e06c75;
--light-atom-hue-5-2: #c91243;
--dark-atom-hue-5-2: #be5046;
--light-atom-hue-6: #986801;
--dark-atom-hue-6: #d19a66;
--light-atom-hue-6-2: #c18401;
--dark-atom-hue-6-2: #e6c07b;
// Fonts
--ui-font: Avenir, Lucida Grande, Arial, sans-serif;
--content-font: Charter, Georgia, serif;
--monospace-font: SF Mono, monospace;
}
.theme-light {
--accent-color: var(--light-accent-color);
--content-background-color: var(--light-content-background-color);
--shadow-color: var(--light-shadow-color);
--ui-background-color: var(--light-ui-background-color);
--ui-text-color: var(--light-ui-text-color);
--secondary-ui-text-color: var(--light-secondary-ui-text-color);
--content-text-color: var(--light-content-text-color);
--aside-background: var(--light-aside-background);
--aside-border: var(--light-aside-border);
--aside-warning-background: var(--light-aside-warning-background);
--aside-warning-border: var(--light-aside-warning-border);
// Syntax highlighting
--atom-base: var(--light-atom-base);
--atom-mono-1: var(--light-atom-mono-1);
--atom-mono-2: var(--light-atom-mono-2);
--atom-mono-3: var(--light-atom-mono-3);
--atom-hue-1: var(--light-atom-hue-1);
--atom-hue-2: var(--light-atom-hue-2);
--atom-hue-3: var(--light-atom-hue-3);
--atom-hue-4: var(--light-atom-hue-4);
--atom-hue-5: var(--light-atom-hue-5);
--atom-hue-5-2: var(--light-atom-hue-5-2);
--atom-hue-6: var(--light-atom-hue-6);
--atom-hue-6-2: var(--light-atom-hue-6-2);
}
.theme-dark {
--accent-color: var(--dark-accent-color);
--content-background-color: var(--dark-content-background-color);
--shadow-color: var(--dark-shadow-color);
--ui-background-color: var(--dark-ui-background-color);
--ui-text-color: var(--dark-ui-text-color);
--secondary-ui-text-color: var(--dark-secondary-ui-text-color);
--content-text-color: var(--dark-content-text-color);
--aside-background: var(--dark-aside-background);
--aside-border: var(--dark-aside-border);
--aside-warning-background: var(--dark-aside-warning-background);
--aside-warning-border: var(--dark-aside-warning-border);
// Syntax highdarking
--atom-base: var(--dark-atom-base);
--atom-mono-1: var(--dark-atom-mono-1);
--atom-mono-2: var(--dark-atom-mono-2);
--atom-mono-3: var(--dark-atom-mono-3);
--atom-hue-1: var(--dark-atom-hue-1);
--atom-hue-2: var(--dark-atom-hue-2);
--atom-hue-3: var(--dark-atom-hue-3);
--atom-hue-4: var(--dark-atom-hue-4);
--atom-hue-5: var(--dark-atom-hue-5);
--atom-hue-5-2: var(--dark-atom-hue-5-2);
--atom-hue-6: var(--dark-atom-hue-6);
--atom-hue-6-2: var(--dark-atom-hue-6-2);
}
// General
html {
background-color: var(--content-background-color);
font-family: var(--ui-font);
font-size: 16px;
line-height: 1.6;
color: var(--ui-text-color);
}
body {
// prevent .article-content-wide from showing scroll bar
overflow-x: hidden;
}
.container {
margin: 0 auto;
padding: 0 15px;
}
.main {
max-width: 720px;
margin: 0 auto;
.page-heading {
max-width: 720px;
margin: 20px auto;
margin-bottom: 0;
color: var(--content-text-color);
}
.rss {
margin-top: 0;
font-size: 0.75rem;
font-weight: 300;
color: var(--secondary-ui-text-color);
}
}
article {
margin-bottom: 75px;
color: var(--content-text-color);
border-bottom: 1px solid var(--accent-color);
}
.article-title {
margin-top: 0.7em;
margin-bottom: 0;
font-size: 1.7rem;
&::before {
content: "#";
font-family: var(--monospace-font);
color: var(--accent-color);
user-select: none;
}
> a {
color: var(--content-text-color);
text-decoration: none;
transition: 0.3s ease all;
&:hover {
color: var(--accent-color);
}
&::before, &::after {
content: "";
}
}
}
.article-meta {
margin-top: 0;
font-size: 0.9rem;
font-weight: 300;
color: var(--secondary-ui-text-color);
a { text-decoration: underline; }
a::before, a::after { content: ""; }
}
.article-content {
position: relative;
font-family: var(--content-font);
font-size: 1.25rem;
word-wrap: break-word;
h1, h2, h3, h4, h5, h6 {
font-family: var(--ui-font);
.header-anchor {
font-family: var(--monospace-font);
color: var(--accent-color);
user-select: none;
text-decoration: none;
// hide link destination for header anchor links
&::before, &::after { content: ""; }
}
}
h1 { font-size: 1.6rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.4rem; }
hr {
border: none;
height: 1px;
background: var(--accent-color);
}
blockquote {
font-style: italic;
border-left: 3px solid var(--accent-color);
// use margin for vertical spacing so space is shared with elements that come before/after
// and padding for horizontal so that the space is between the border and the text
margin: 20px 0;
padding: 0 40px;
}
p code {
word-break: break-all;
}
aside {
background-color: var(--aside-background);
border: 1px solid var(--aside-border);
padding: 15px;
font-size: 1rem;
box-sizing: border-box;
&.warning {
background-color: var(--aside-warning-background);
border: 1px solid var(--aside-warning-border);
}
p:first-child { margin-top: 0; }
p:last-child { margin-bottom: 0; }
}
.footnotes {
.footnote-item {
display: flex;
flex-direction: row;
align-items: first baseline;
&:not(:last-child) > p:last-child {
margin-bottom: 0;
}
}
.footnote-marker {
margin-right: 6px;
width: 34px;
flex-shrink: 0;
text-align: right;
}
}
// Markdown decorations
@media screen and (min-width: 768px) {
a {
text-decoration: none;
&::before { content: "["; }
&::after { content: "](" attr(data-link) ")"; word-wrap: break-word; }
&::before, &::after {
color: var(--secondary-ui-text-color);
font-family: var(--monospace-font);
font-size: 0.75em;
word-break: break-all;
}
}
a[data-no-link-decoration] {
text-decoration: underline;
&::before { content: ""; }
&::after { content: ""; }
}
sup.footnote-reference > a::before,
sup.footnote-reference > a::after,
a.footnote-backref::before, a.footnote-backref::after {
content: "";
}
}
code::before, code::after {
content: "`";
font-family: var(--monospace-font);
color: var(--secondary-ui-text-color);
}
pre code::before,
pre code::after {
// we don't show the decorations for pre blocks, because it can interfere with scrolling horizontally
content: "";
display: none;
}
strong::before, strong::after {
content: "**";
font-family: var(--monospace-font);
color: var(--secondary-ui-text-color);
}
em::before, em::after {
content: "_";
font-family: var(--monospace-font);
color: var(--secondary-ui-text-color);
}
s::before, s::after {
content: "~~";
font-family: var(--monospace-font);
color: var(--secondary-ui-text-color);
}
code {
strong::before, strong::after,
em::before, em::after,
s::before, s::after {
content: "";
}
}
}
.article-content-wide {
width: 100vw;
position: relative;
left: 50%;
margin-left: -50vw;
padding: 10px 0;
margin-top: -10px;
margin-bottom: -10px;
p:first-child {
margin-top: 0;
}
p:last-child {
margin-bottom: 0;
}
}
.theme-dark, .theme-light, .theme-inverted {
color: var(--content-text-color);
background-color: var(--content-background-color);
}
#comments-container {
border-top: 1px solid var(--accent-color);
padding: 1rem 0;
#comments-container-title {
display: inline-block;
margin: 0;
cursor: pointer;
vertical-align: middle;
}
#comments-info {
margin: 0;
}
#remote-interact {
display: flex;
flex-direction: row;
align-items: baseline;
input {
margin-left: 4px;
}
input[type=text] {
flex-grow: 1;
padding: 0 4px;
background-color: var(--content-background-color);
border: 1px solid var(--accent-color);
font-size: 1rem;
line-height: 2rem;
color: var(--content-text-color);
}
input[type=submit] {
background-color: var(--ui-background-color);
border: 1px solid var(--accent-color);
color: var(--accent-color);
line-height: 2rem;
padding: 0 1rem;
text-decoration: none;
font-weight: bold;
text-transform: uppercase;
-webkit-transition: 0.3s ease-out;
transition: 0.3s ease-out;
&:hover {
background-color: var(--accent-color);
color: var(--ui-background-color);
cursor: pointer;
}
}
}
#comments-js-warning {
background-color: var(--atom-hue-5-2);
padding: 10px;
margin-top: 0;
border: 1px solid var(--atom-hue-5);
border-radius: 5px;
}
> .comments-list {
margin-bottom: 0;
}
.comment:not(:last-child) {
margin-bottom: 16px;
}
.comment-user-avatar {
width: 50px;
border-radius: 5px;
float: left;
margin-right: 10px;
}
@media (min-width: 768px) {
.comments-list {
padding-left: 0px;
}
.comment > .comments-list {
margin-top: 0px;
}
.comment-info {
margin-top: 0px;
margin-bottom: 5px;
}
.comment-children {
margin-left: 60px;
margin-top: 16px;
}
}
}
.tv-show {
details {
margin-bottom: 2em;
> p:first-of-type {
margin-top: 0;
}
p {
margin: 10px;
}
> :not(summary) {
font-family: var(--content-font);
font-size: 1.25rem;
word-wrap: break-word;
}
}
summary {
display: flex;
align-items: baseline;
&:hover {
cursor: pointer;
}
// needed for safari
&::-webkit-details-marker {
display: none;
}
&::before {
content: "";
align-self: baseline;
margin-right: 8px;
}
h2 {
margin: 0;
flex-grow: 1;
}
.episode-watched {
color: var(--secondary-ui-text-color);
font-size: 1rem;
}
}
details[open] summary::before {
transform: rotate(90deg);
}
}
.error-page {
margin: 0 auto;
text-align: center;
h3 {
position: relative;
color: var(--content-text-color);
line-height: 1.3;
text-align: center;
margin: 0;
}
input#q {
display: block;
width: 75%;
margin: 10px auto;
padding: 4px;
background-color: var(--content-background-color);
border: 1px solid var(--accent-color);
font-size: 1rem;
color: var(--content-text-color);
}
input[type=submit] {
display: block;
margin: 10px auto;
background-color: var(--ui-background-color);
border: 1px solid var(--accent-color);
color: var(--accent-color);
line-height: 2rem;
padding: 0 1rem;
text-decoration: none;
font-weight: bold;
text-transform: uppercase;
-webkit-transition: 0.3s ease-out;
transition: 0.3s ease-out;
&:hover {
background-color: var(--accent-color);
color: var(--ui-background-color);
cursor: pointer;
}
}
}
.icon > svg {
display: inline-block;
width: 16px;
height: 16px;
vertical-align: middle;
color: grey;
}
a {
color: var(--accent-color);
text-decoration: underline;
&.fancy-link {
position: relative;
color: var(--ui-text-color);
text-decoration: none;
transition: 0.3s ease all;
> span {
position: absolute;
top: -0.15em;
transition: 0.3s ease all;
font-family: var(--monospace-font);
color: transparent;
&:first-child {
left: 0.5em;
}
&:last-child {
right: 0.5em;
}
}
&:hover {
color: var(--accent-color);
> span {
color: var(--accent-color);
&:first-child {
left: -0.75em;
}
&:last-child {
right: -0.75em;
}
}
}
}
}
pre {
overflow-x: scroll;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
word-wrap: normal;
font-family: var(--monospace-font);
}
code {
font-family: var(--monospace-font);
font-size: 0.8em;
}
img {
display: block;
margin: 0 auto;
max-width: 100%;
}
figure {
margin: 0;
figcaption {
font-family: var(--ui-font);
font-size: 1rem;
font-style: italic;
color: var(--secondary-ui-text-color);
text-align: center;
}
}
table {
width: 100%;
border-collapse: collapse;
border: 1px solid #bbb;
tr, td, th {
border: 1px solid #bbb;
}
td, th {
padding: 0 0.5em;
text-align: left;
}
thead > tr, tbody > tr:nth-child(even) {
background-color: #eee;
}
}
// Header
.site-header {
padding-top: 20px;
padding-bottom: 20px;
background-color: var(--ui-background-color);
font-size: 1rem;
> div {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: flex-end;
flex-wrap: wrap;
padding-bottom: 10px;
border-bottom: 3px solid var(--accent-color);
}
.site-title {
margin: 0;
font-size: 2em;
font-variant: small-caps;
}
.site-description {
color: var(--secondary-ui-text-color);
font-variant: small-caps;
margin: 0;
}
.site-nav ul {
padding: 0;
margin: 0;
display: inline-block;
position: relative;
li {
list-style: none;
display: inline;
font-variant: small-caps;
font-weight: bold;
&:not(:last-child) {
margin-right: 1em;
}
a.dropdown-link {
color: var(--ui-text-color);
text-decoration: none;
.arrow-down {
display: inline-block;
width: 0.5em;
height: 0.5em;
margin-bottom: 2px;
margin-left: 2px;
border-bottom: 2px solid var(--ui-text-color);
border-right: 2px solid var(--ui-text-color);
transform: rotate(45deg);
}
}
ul {
visibility: hidden;
opacity: 0;
min-width: 5rem;
position: absolute;
transition: 0.3s ease all;
right: -1em;
display: block;
padding: 1em;
background-color: var(--ui-background-color);
border: 1px solid var(--accent-color);
z-index: 10;
li {
width: 100%;
display: block;
margin-right: 0px;
text-align: right;
&:not(:last-child) {
margin-bottom: 1em;
}
}
}
&:hover > ul,
&:focus-within > ul,
ul:hover,
ul:focus {
visibility: visible;
opacity: 1;
display: block;
}
}
}
}
// Footer
.site-footer {
margin-top: 75px;
margin-bottom: 20px;
background-color: var(--ui-background-color);
font-size: 16px;
display: flex;
flex-direction: row;
justify-content: space-between;
flex-wrap: wrap;
align-items: baseline;
> * {
width: 50%;
}
.site-title {
margin: 0;
font-variant: small-caps;
font-size: 1.5em;
}
.ui-controls {
order: 1;
input {
display: none;
}
label {
color: var(--accent-color);
text-decoration: underline;
&:hover {
cursor: pointer;
}
}
input:checked + label {
color: var(--ui-text-color);
text-decoration: none;
font-weight: bold;
&:hover {
cursor: default;
}
}
}
.social-links ul {
padding: 0;
margin: 0;
text-align: right;
li {
list-style: none;
display: inline;
font-variant: small-caps;
font-weight: bold;
&:not(:last-child) {
margin-right: 1em;
}
}
}
.webring {
order: 2;
background: var(--webring-background);
background-clip: text;
font-size: 1.2em;
font-variant: small-caps;
font-weight: 900;
text-align: right;
a {
text-decoration: none;
color: transparent;
}
}
}
// Pagination
.pagination {
text-align: center;
p {
margin: 0;
}
.pagination-link {
color: var(--accent-color);
a {
text-decoration: none;
span:not(.arrow) {
text-decoration: underline;
}
}
.arrow-left {
display: inline-block;
width: 0.5em;
height: 0.5em;
margin-right: -5px;
border-left: 2px solid var(--accent-color);
border-bottom: 2px solid var(--accent-color);
transform: rotate(45deg);
}
.arrow-right {
display: inline-block;
width: 0.5em;
height: 0.5em;
margin-left: -5px;
border-right: 2px solid var(--accent-color);
border-bottom: 2px solid var(--accent-color);
transform: rotate(-45deg);
}
}
}
// Media Queries
@media (min-width: 540px) {
.container {
max-width: 540px;
}
article::after {
max-width: 540px;
}
}
@media (min-width: 768px) {
.container {
max-width: 720px;
}
article::after {
max-width: 720px;
}
}
@media (max-width: 768px) {
.site-footer {
display: block;
> * {
width: 100%;
}
.social-links ul, .webring {
text-align: unset;
}
}
}
// 720 + 30 + 720 + 15
// main content, l/r container padding, aside width (50% on each side), outer edge margin
// inner edge margin overlaps with container padding
@media (min-width: 1485px) {
article .article-content aside:not(.inline) {
width: 50%;
position: absolute;
left: 100%;
margin-left: 15px;
margin-right: 15px;
transform: translateY(-50%);
}
}

@ -0,0 +1,349 @@
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
html {
line-height: 1.15; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers.
*/
body {
margin: 0;
}
/**
* Render the `main` element consistently in IE.
*/
main {
display: block;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/* Grouping content
========================================================================== */
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/* Text-level semantics
========================================================================== */
/**
* Remove the gray background on active links in IE 10.
*/
a {
background-color: transparent;
}
/**
* 1. Remove the bottom border in Chrome 57-
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Remove the border on images inside links in IE 10.
*/
img {
border-style: none;
}
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers.
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: inherit; /* 1 */
font-size: 100%; /* 1 */
line-height: 1.15; /* 1 */
margin: 0; /* 2 */
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input { /* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select { /* 1 */
text-transform: none;
}
/**
* Correct the inability to style clickable types in iOS and Safari.
*/
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Correct the padding in Firefox.
*/
fieldset {
padding: 0.35em 0.75em 0.625em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
vertical-align: baseline;
}
/**
* Remove the default vertical scrollbar in IE 10+.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10.
* 2. Remove the padding in IE 10.
*/