Skip to content

📚 The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

19.2 KB
Raw Blame
@use "../abstract/static.scss" as *;

.alexandrie-theme {
	max-width: 100%;
	font-family: Poppins, sans-serif;

	a {
		color: var(--primary);

		&:hover {
			text-decoration: underline;
		}
	}

	p {
		width: 100%;
	}
}


.modern-theme {
	max-width: 100%;
	padding: 0 0.5rem;
	font-family: $font-sans !important;
	font-size: 16px;
	color: var(--text-body);


	.header-anchor {
		display: none;
	}

	&.numbering {
		counter-reset: section;

		h2 {
			margin-top: 2rem;
			font-size: 1.5rem;
			counter-increment: section;
			counter-reset: subsection;

			&::before {
				content: counter(section, upper-roman) ". ";
			}
		}

		h3 {
			margin-top: 1rem;
			font-size: 1.25rem;
			counter-increment: subsection;

			&::before {
				content: counter(subsection, lower-alpha) ". ";
			}
		}
	}

	h1 {
		font-size: 2rem;
	}

	h2 {
		margin-top: 2rem;
		font-size: 1.5rem;
		counter-reset: subsection;
	}

	h3 {
		margin-top: 1rem;
		font-size: 1.25rem;
	}

	p {
		width: 100%;
		padding: 0.2em 0;
	}

	a {
		color: var(--primary);
		text-decoration: none;
		transition: color $transition-fast ease, opacity $transition-fast ease;

		&:hover {
			text-decoration: underline;
		}
	}

	code,
	pre {
		border-radius: var(--radius-sm);
		font-size: 0.95em;
		color: var(--text-body);
	}

	pre {
		overflow-x: auto;
	}

	blockquote {
		margin: 1.5rem 0;
		padding-left: 1rem;
		border-left: 4px solid var(--blue);
		color: var(--text-body);
		background-color: var(--surface-raised);
	}

	ul,
	ol {
		margin: 0.5em 0;
		padding-left: 1.5rem;

		li {
			margin: 0.3em 0;
		}
	}

	img {
		max-width: 100%;
		margin: 1rem 0;
		border-radius: var(--radius-md);
	}

	table {
		width: 100%;
		margin: 1.5em 0;
		border-radius: var(--radius-md);
		font-size: 0.95em;
		border-collapse: collapse;
		overflow: hidden;

		th,
		td {
			padding: 0.75em 1em;
			border-bottom: 1px solid var(--border);
		}

		th {
			font-weight: 600;
			text-align: left;
		}
	}

	.custom-block {
		border-radius: var(--radius-xs);
		font-size: 15px;
		color: var(--text-body);

		* {
			fill: var(--text-body) !important;

			path {
				fill: var(--text-body) !important;
			}
		}

		&.info,
		&.blue {
			border-left: 4px solid var(--blue);
			background-color: var(--blue-bg-light);
		}

		&.success,
		&.green {
			border-left: 4px solid var(--green);
			background-color: var(--green-bg-light);
		}

		&.warning,
		&.yellow {
			border-left: 4px solid var(--yellow);
			background-color: var(--yellow-bg-light);
		}

		&.danger,
		&.red {
			border-left: 4px solid var(--red);
			background-color: var(--red-bg-light);
		}

		&.teal {
			border-left: 4px solid var(--teal);
			background-color: var(--teal-bg-light);
		}

		&.purple {
			border-left: 4px solid var(--purple);
			background-color: var(--purple-bg-light);
		}

		&.grey {
			border-left: 4px solid var(--grey);
			background-color: var(--grey-bg);
		}

		.custom-block-title {
			margin-bottom: 0.5rem;
			font-weight: 600;
		}

		.custom-block-content {
			p {
				margin: 0.5em 0;
			}
		}
	}

	.katex {
		font-size: 18px;

		.text {
			font-family: 'Libertinus Math', serif !important;
			font-size: 14px;
		}
	}
}

// Academic — for research papers, theses and scientific writing. Serif body at
// a comfortable reading measure, numbered headings, tighter leading than Modern,
// and figure/table captions that read as part of the document rather than UI.
.academic-theme {
	margin: auto;
	padding: 0 3rem;
	font-family: "LMRoman10", "Libertinus Serif", Georgia, serif !important;
	font-size: 18px;
	line-height: 1.85;
	color: var(--text-body);
	text-align: justify;
	hyphens: auto;

	.header-anchor {
		display: none;
	}

	@media print {
		margin: 0;
		padding: 0;
	}

	&.numbering {
		counter-reset: section;

		h2 {
			counter-increment: section;
			counter-reset: subsection;

			&::before {
				font-size: 1.4rem;
				font-weight: 700;
				color: var(--text-primary);
				letter-spacing: normal;
				content: counter(section, decimal-leading-zero) " ";
			}
		}

		h3 {
			&::before {
				color: var(--text-muted);
				content: counter(section) "." counter(subsection) " ";
				counter-increment: subsection;
			}
		}
	}

	/* ---------- Title ---------- */

	h1 {
		padding-bottom: 1.5rem;
		border-bottom: 2px solid var(--border);
		font-size: 1.5rem;
		font-weight: 700;
		line-height: 1.15;
		text-align: center;
	}

	h2 {
		display: flex;
		align-items: center;
		gap: 1rem;
		font-size: 1.1rem;
		font-weight: 700;
		text-transform: uppercase;
	}

	h3 {
		margin: 2.5rem 0 1rem;
		font-size: 1.3rem;
		font-weight: 600;
	}

	h4 {
		margin: 1.5rem 0 .75rem;
		font-size: 1.05rem;
		font-weight: 600;
		font-style: italic;
	}

	/* ---------- Paragraphs ---------- */

	p {
		margin: 0;
		padding: 0;
	}

	p+p {
		margin-top: .25em;
		text-indent: 2em;
	}



	/* ---------- Links ---------- */

	a {
		color: inherit;
		text-decoration-color: var(--primary);
		text-decoration-thickness: 2px;
		text-underline-offset: .18em;
	}

	/* ---------- Lists ---------- */

	ul,
	ol {
		margin: 1.5rem 0;
		padding-left: 2rem;

		li {
			margin: .45rem 0;
		}
	}

	/* ---------- Quotes ---------- */

	blockquote {
		position: relative;
		margin: 3rem 2rem;
		padding: 1rem 2rem;
		border: none;
		font-size: 1.05rem;
		font-style: italic;

		&::before {
			position: absolute;
			top: -.15em;
			left: -.25em;
			font-size: 5rem;
			line-height: 1;
			opacity: .15;
			content: "“";
		}
	}

	/* ---------- Code ---------- */

	code {
		font-family: $font-mono;
		font-size: .9em;
	}

	pre {
		margin: 2rem 0;
		padding: 1.25rem;
		border-left: 3px solid var(--text-primary);
		font-size: .9rem;
		background: transparent;
		overflow-x: auto;
	}

	/* ---------- Images ---------- */

	img {
		display: block;
		max-width: 100%;
		margin: 3rem auto 1rem;
		border: 1px solid var(--border);
	}

	figure {
		margin: 3rem 0;
	}

	figcaption {
		margin-top: .75rem;
		font-size: .85rem;
		font-style: italic;
		color: var(--text-muted);
		text-align: center;

		&::before {
			font-weight: bold;
			content: "Figure — ";
		}
	}

	/* ---------- Tables ---------- */

	table {
		width: 100%;
		margin: 3rem 0;
		font-size: .95rem;
		border-collapse: collapse;
	}

	th,
	td {
		padding: .65rem .8rem;
		border: none;
	}

	thead tr {
		border-top: 2px solid currentcolor;
		border-bottom: 1px solid currentcolor;
	}

	tbody tr:last-child {
		border-bottom: 2px solid currentcolor;
	}

	tbody tr:nth-child(even) {
		background: rgb(127 127 127 / 4%);
	}

	/* ---------- Horizontal rule ---------- */

	hr {
		width: 30%;
		margin: 4rem auto;
		border: none;
		border-top: 1px solid var(--border);
	}

	/* ---------- Custom blocks ---------- */

	.markdown-container {
		display: flex;
		gap: 1rem;
		margin: 2em 0;
		padding: 0 !important;
		border: none !important;
		color: var(--text-body);
		background-color: transparent !important;

		* {
			fill: var(--text-body) !important;

			path {
				fill: var(--text-body) !important;
			}
		}

		.title {
			flex: 0 0 150px;
			box-sizing: border-box;
			padding: 5px 12px;
			border-right: 1px solid var(--text-body);
			font-size: 15px;
			color: var(--text-primary);

			svg {
				display: none;
			}
		}

		p {
			flex: 1;
			padding: 0 0.5em;
		}
	}

	.custom-block {
		display: flex;
		flex-wrap: nowrap;
		margin: 2em 0;
		padding: 0;
		border: none;
		font-size: 16px;
		color: var(--text-body);
		background-color: transparent;

		* {
			fill: var(--text-body) !important;

			path {
				fill: var(--text-body) !important;
			}
		}

		.custom-block-title {
			flex: 0 0 150px;
			box-sizing: border-box;
			padding: 5px 12px;
			border-right: 1px solid var(--text-body);
			font-weight: bold;
			color: var(--text-primary);
		}

		.custom-block-content {
			flex: 1;
			min-width: 0;
			padding: 0 0.5em;

			p {
				padding: 0 0.5em;
			}
		}
	}

	/* ---------- KaTeX ---------- */

	.katex {
		display: flex;
		justify-content: center;
		font-size: 1.15em;

		.text {
			font-family: "Libertinus Math", serif !important;
		}
	}
}


.material-theme {
	max-width: 100%;
	padding: 0 0.5rem;
	font-family: Roboto, $font-sans !important;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--text-body);
	letter-spacing: 0.0313em;

	.header-anchor {
		display: none;
	}

	counter-reset: section subsection;

	&.numbering {
		counter-reset: section;

		h2 {
			counter-increment: section;
			counter-reset: subsection;

			&::before {
				color: var(--text-primary);
				content: counter(section, upper-roman) ". ";
			}
		}

		h3 {
			counter-increment: subsection;

			&::before {
				color: var(--text-muted);
				content: counter(subsection, lower-alpha) ". ";
			}
		}
	}

	h1 {
		margin: 0 0 1.5rem;
		font-size: 2em;
		font-weight: 400;
		line-height: 1.2;
		letter-spacing: 0;
	}

	h2 {
		margin: 2rem 0 0.75rem;
		font-size: 1.5em;
		font-weight: 400;
		line-height: 1.3;
		letter-spacing: 0;
		counter-reset: subsection;
	}

	h3 {
		margin: 1.5rem 0 0.5rem;
		font-size: 1.25em;
		font-weight: 500;
		line-height: 1.4;
		letter-spacing: 0.0094em;
	}

	h4 {
		margin: 1.25rem 0 0.5rem;
		font-size: 1em;
		font-weight: 500;
		letter-spacing: 0.0063em;
	}

	p {
		width: 100%;
		margin: 0 0 1rem;
	}

	a {
		color: var(--primary);
		text-decoration: none;

		&:hover {
			text-decoration: underline;
		}
	}

	code {
		padding: 0.15em 0.4em;
		border-radius: var(--radius-sm);
		font-family: $font-mono;
		font-size: 0.875em;
		letter-spacing: 0;
		background-color: var(--surface-raised);
	}

	// Surfaces are elevated and rounded rather than outlined — the core of the
	// Material surface model.
	pre {
		margin: 1.25rem 0;
		padding: 1rem;
		border-radius: var(--radius-md);
		line-height: 1.5;
		background-color: var(--surface-raised);
		box-shadow: var(--shadow-sm, 0 1px 3px rgb(0 0 0 / 12%));
		overflow-x: auto;

		code {
			padding: 0;
			background-color: transparent;
		}
	}

	blockquote {
		margin: 1.25rem 0;
		padding: 0.75rem 1rem;
		border-left: 4px solid var(--primary);
		border-radius: var(--radius-sm);
		color: var(--text-muted);
		background-color: var(--surface-raised);
	}

	ul,
	ol {
		margin: 0 0 1rem;
		padding-left: 1.75rem;

		li {
			margin: 0.35em 0;
		}
	}

	img {
		max-width: 100%;
		margin: 1.25rem 0;
		border-radius: var(--radius-md);
	}

	hr {
		margin: 2rem 0;
		border: none;
		border-top: 1px solid var(--border);
	}

	// Data table: no vertical rules, a divider under the header, 500-weight
	// column labels.
	table {
		width: 100%;
		margin: 1.5rem 0;
		border-radius: var(--radius-md);
		font-size: 0.95em;
		background-color: var(--surface-raised);
		border-collapse: collapse;
		overflow: hidden;

		th,
		td {
			padding: 0.75rem 1rem;
			border: none;
			border-bottom: 1px solid var(--border);
			text-align: left;
		}

		thead th {
			font-weight: 500;
			letter-spacing: 0.0063em;
		}

		tbody tr:last-child td {
			border-bottom: none;
		}
	}

	// A tinted state layer plus a leading rule, the way an M3 banner reads.
	.custom-block {
		margin: 1.25rem 0;
		padding: 0.75rem 1rem;
		border-left: 4px solid var(--grey);
		border-radius: var(--radius-md);
		background-color: var(--grey-bg);

		&.info,
		&.blue {
			border-left-color: var(--blue);
			background-color: var(--blue-bg-light);
		}

		&.success,
		&.green {
			border-left-color: var(--green);
			background-color: var(--green-bg-light);
		}

		&.warning,
		&.yellow {
			border-left-color: var(--yellow);
			background-color: var(--yellow-bg-light);
		}

		&.danger,
		&.red {
			border-left-color: var(--red);
			background-color: var(--red-bg-light);
		}

		&.teal {
			border-left-color: var(--teal);
			background-color: var(--teal-bg-light);
		}

		&.purple {
			border-left-color: var(--purple);
			background-color: var(--purple-bg-light);
		}

		.custom-block-title {
			margin-bottom: 0.25rem;
			font-weight: 500;
			letter-spacing: 0.0063em;
		}

		.custom-block-content p {
			margin: 0.25em 0;
		}
	}

	.katex {
		font-size: 1.05em;
	}
}

.minimal-theme {
	max-width: 100%;
	padding: 0 0.5rem;
	font-family: $font-sans !important;
	font-size: 1.0625rem;
	line-height: 1.75;
	color: var(--text-body);

	.header-anchor {
		display: none;
	}

	// Reductive scale: weight and generous space carry the hierarchy, not size jumps or rules.
	h1,
	h2,
	h3,
	h4 {
		font-weight: 600;
		line-height: 1.3;
	}

	h1 {
		margin: 0 0 1.5rem;
		font-size: 1.75em;
	}

	h2 {
		margin: 2.5rem 0 0.75rem;
		font-size: 1.35em;
	}

	h3 {
		margin: 1.75rem 0 0.5rem;
		font-size: 1.1em;
	}

	h4 {
		margin: 1.25rem 0 0.5rem;
		font-size: 1em;
	}

	p {
		width: 100%;
		margin: 0;
		padding: 0.45em 0;
	}

	// Monochrome by default and underlined, so a link never depends on colour perception; colour is a hover cue only.
	a {
		color: var(--text-body);
		text-decoration: underline;
		text-underline-offset: 0.15em;

		&:hover,
		&:focus-visible {
			color: var(--primary);
		}
	}

	// No panel, no fill: code is set apart by the mono face and a hairline rule alone.
	code,
	pre {
		font-family: $font-mono;
		font-size: 0.9em;
		color: var(--text-body);
	}

	pre {
		margin: 1.5rem 0;
		padding: 0 0 0 1rem;
		border-left: 1px solid var(--border);
		background-color: transparent;
		overflow-x: auto;
	}

	// A hanging indent instead of a rule or tint — the quote steps out of the measure, nothing more.
	blockquote {
		margin: 1.75rem 0;
		padding: 0;
		border: 0;
		font-style: italic;
		color: var(--text-muted);
	}

	ul,
	ol {
		margin: 1rem 0;
		padding-left: 1.5rem;

		li {
			margin: 0.35em 0;
		}
	}

	// Images sit flat in the flow: no frame, no rounding.
	img {
		max-width: 100%;
		margin: 1.5rem 0;
	}

	// A single hairline instead of a heavy bar.
	hr {
		height: 0;
		margin: 2.5rem 0;
		border: 0;
		border-top: 1px solid var(--border);
	}

	// Rule-only tables: horizontal hairlines, no cell borders, no zebra fill.
	table {
		display: block;
		width: 100%;
		margin: 1.5rem 0;
		border-collapse: collapse;
		overflow-x: auto;

		th,
		td {
			padding: 0.5em 0.75em 0.5em 0;
			border-bottom: 1px solid var(--border);
			text-align: left;
		}

		th {
			font-weight: 600;
		}
	}

	// Admonitions reduced to a plain note: a thin left rule and a small, muted, upper-case label — no box or colour.
	.custom-block {
		margin: 1.75rem 0;
		padding: 0 0 0 1rem;
		border: 0;
		border-left: 1px solid var(--border);
		color: var(--text-body);
		background-color: transparent;

		.custom-block-title {
			margin: 0 0 0.35em;
			font-size: 0.8em;
			font-weight: 600;
			color: var(--text-muted);
			text-transform: uppercase;
			letter-spacing: 0.06em;
		}

		.custom-block-content> :last-child {
			margin-bottom: 0;
		}
	}
}

.terminal-theme {
	max-width: 100%;
	padding: 0 0.75rem;
	font-family: $font-mono !important;
	font-size: 15px;
	line-height: 1.7;
	color: var(--text-body);
	letter-spacing: -0.01em;

	.header-anchor {
		display: none;
	}

	h1,
	h2,
	h3,
	h4,
	h5,
	h6 {
		font-family: $font-mono !important;
		font-weight: 700;
		line-height: 1.3;
	}

	// Terminal command line prompt headers
	h1 {
		margin: 2rem 0 1.25rem;
		padding-bottom: 0.5rem;
		border-bottom: 1px dashed var(--border);
		font-size: 1.75em;
		color: var(--text-primary);

		&::before {
			font-weight: 400;
			color: var(--primary);
			content: "$ ";
		}
	}

	h2 {
		margin: 1.75rem 0 1rem;
		padding-bottom: 0.25rem;
		border-bottom: 1px solid var(--border);
		font-size: 1.35em;
		color: var(--text-primary);

		&::before {
			font-weight: 400;
			color: var(--primary);
			opacity: 0.85;
			content: "## ";
		}
	}

	h3 {
		margin: 1.5rem 0 0.75rem;
		font-size: 1.15em;
		color: var(--text-primary);

		&::before {
			font-weight: 400;
			color: var(--text-muted);
			content: "### ";
		}
	}

	h4 {
		margin: 1.25rem 0 0.5rem;
		font-size: 1em;
		color: var(--text-primary);

		&::before {
			font-weight: 400;
			color: var(--text-muted);
			content: "#### ";
		}
	}

	h5,
	h6 {
		margin: 1rem 0 0.5rem;
		font-size: 0.9em;
		color: var(--text-muted);

		&::before {
			font-weight: 400;
			content: "// ";
		}
	}

	p {
		width: 100%;
		margin: 0.75em 0;
	}

	a {
		color: var(--primary);
		text-decoration: underline;
		text-underline-offset: 0.2em;

		&:hover {
			color: var(--text-primary);
			background-color: var(--surface-raised);
		}
	}

	// Monospace inline code badge
	code {
		padding: 0.15em 0.45em;
		border: 1px solid var(--border);
		border-radius: var(--radius-xs);
		font-family: $font-mono !important;
		font-size: 0.9em;
		color: var(--primary);
		background-color: var(--surface-raised);
	}

	// Terminal code console block
	pre {
		margin: 1.25rem 0;
		padding: 1rem 1.25rem;
		border: 1px solid var(--border);
		border-radius: var(--radius-sm);
		font-size: 0.9em;
		line-height: 1.5;
		background-color: var(--surface-raised);
		overflow-x: auto;

		code {
			padding: 0;
			border: 0;
			font-size: 100%;
			color: inherit;
			background-color: transparent;
		}
	}

	// Command output blockquote with pipe-line aesthetic
	blockquote {
		margin: 1.25rem 0;
		padding: 0.6rem 1rem;
		border-left: 3px solid var(--primary);
		border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
		color: var(--text-muted);
		background-color: var(--surface-raised);

		&::before {
			display: block;
			margin-bottom: 0.25rem;
			font-size: 0.8em;
			font-weight: 600;
			color: var(--primary);
			opacity: 0.75;
			content: "[output]";
		}

		p {
			margin: 0.25em 0;
		}
	}

	// Command list with prompt bullets
	ul {
		margin: 1rem 0;
		padding-left: 1.5rem;
		list-style: none;

		li {
			position: relative;
			margin: 0.35em 0;

			&::before {
				position: absolute;
				left: -1.25rem;
				font-weight: bold;
				color: var(--primary);
				content: "›";
			}
		}
	}

	ol {
		margin: 1rem 0;
		padding-left: 2rem;

		li {
			margin: 0.35em 0;
		}
	}

	img {
		max-width: 100%;
		margin: 1rem 0;
		border: 1px solid var(--border);
		border-radius: var(--radius-xs);
	}

	hr {
		height: 0;
		margin: 2rem 0;
		border: 0;
		border-top: 1px dashed var(--border);
	}

	// ASCII terminal grid table
	table {
		display: block;
		width: max-content;
		max-width: 100%;
		margin: 1.25rem 0;
		border: 1px solid var(--border);
		border-collapse: collapse;
		overflow-x: auto;

		th,
		td {
			padding: 0.45rem 0.85rem;
			border: 1px solid var(--border);
		}

		th {
			font-size: 0.85em;
			font-weight: 700;
			color: var(--text-primary);
			text-transform: uppercase;
			letter-spacing: 0.05em;
			background-color: var(--surface-raised);
		}

		tr:nth-child(2n) {
			background-color: var(--surface-raised);
		}
	}

	// CLI status log blocks
	.custom-block {
		margin: 1.25rem 0;
		padding: 0.75rem 1rem;
		border: 1px solid var(--border);
		border-left-width: 4px;
		border-radius: var(--radius-xs);
		color: var(--text-body);
		background-color: var(--surface-raised);

		.custom-block-title {
			margin: 0 0 0.4em;
			font-size: 0.85em;
			font-weight: 700;
			color: var(--text-primary);
			text-transform: uppercase;
			letter-spacing: 0.05em;
		}

		.custom-block-content> :last-child {
			margin-bottom: 0;
		}

		&.blue,
		&.grey,
		&.teal {
			border-left-color: var(--blue);

			.custom-block-title {
				color: var(--blue);

				&::before {
					content: "[INFO] ";
				}
			}
		}

		&.green {
			border-left-color: var(--green);

			.custom-block-title {
				color: var(--green);

				&::before {
					content: "[OK] ";
				}
			}
		}

		&.yellow {
			border-left-color: var(--yellow);

			.custom-block-title {
				color: var(--yellow);

				&::before {
					content: "[WARN] ";
				}
			}
		}

		&.red {
			border-left-color: var(--red);

			.custom-block-title {
				color: var(--red);

				&::before {
					content: "[ERROR] ";
				}
			}
		}
	}
}