Update Docs

This commit is contained in:
Simeon Wallrath 2025-08-23 14:12:06 +02:00
parent ec72f2b7ec
commit 2d1dade171
4 changed files with 201 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

View file

@ -1,7 +1,13 @@
#import "@preview/mantys:1.0.2": *
#import "@preview/subpar:0.2.2"
#import "Theme/modernCustom.typ": modernCustom
#show: mantys(
name: "mantys",
version: "1.0.0",
authors: (
@ -19,7 +25,7 @@
title: "The Shorktagram Badge",
// subtitle: "Tagline",
date: datetime.today(),
cover: figure(image("/images/Front.png", width: 78%)),
abstract: [
The Shorktagram-Bade features a beautiful PCB Frontplate backed with 15 individually controllable LEDs, Temperature and Humidity Sensor as well as a Motion Sensor. This setup makes it prone to be used as an air sensor by day and a nightlight by... night.
@ -30,15 +36,17 @@
// imports: (:)
// )
theme: themes.modern
theme: modernCustom
)
#set par(
spacing: 2em,
leading: 0.85em,
)
= Flashing the Firmware
Prerequisites: A computer running VSCode with the Platform.io extension installed.

View file

@ -0,0 +1,191 @@
#let primary = rgb("#ed592f")
#let secondary = rgb("#05b5da")
#let fonts = (
serif: ("Linux Libertine", "Liberation Serif"),
sans: ("Source Sans Pro", "Roboto"),
mono: ("Fira Code", "Liberation Mono"),
)
#let muted = (
fill: luma(80%),
bg: luma(95%),
)
#let text = (
size: 12pt,
font: fonts.sans,
fill: rgb("#333333"),
)
#let header = (
size: 10pt,
fill: text.fill,
)
#let footer = (
size: 9pt,
fill: muted.fill,
)
#let heading = (
size: 15pt,
font: fonts.sans,
fill: primary,
)
#import "@preview/gentle-clues:1.2.0"
#let _alert-funcs = (
"info": gentle-clues.info,
"warning": gentle-clues.warning,
"error": gentle-clues.error,
"success": gentle-clues.success,
"default": gentle-clues.memo,
)
#let alert(alert-type, body) = {
let alert-func = _alert-funcs.at(alert-type, default: _alert-funcs.default)
alert-func(title: none, body)
}
#let tag(color, body) = box(
stroke: none,
fill: color,
// radius: 50%,
radius: 3pt,
inset: (x: .5em, y: .25em),
baseline: 1%,
std.text(body),
)
#let code = (
size: 12pt,
font: fonts.mono,
fill: rgb("#999999"),
)
#let emph = (
link: secondary,
package: primary,
module: rgb("#8c3fb2"),
since: rgb("#a6fbca"),
until: rgb("#ffa49d"),
changed: rgb("#fff37c"),
deprecated: rgb("#ffa49d"),
compiler: teal,
"context": rgb("#fff37c"),
)
#let commands = (
argument: rgb("#3c5c99"),
option: rgb(214, 182, 93),
command: blue, // rgb(75, 105, 197),
builtin: eastern,
comment: gray, // rgb(128, 128, 128),
symbol: text.fill,
)
#let values = (
default: rgb(181, 2, 86),
)
#let page-init(doc, theme) = (
body => {
show std.heading.where(level: 1): it => {
pagebreak(weak: true)
set std.text(fill: theme.primary)
block(
width: 100%,
breakable: false,
inset: (bottom: .33em),
stroke: (bottom: .6pt + theme.secondary),
[#if it.numbering != none {
(
std.text(
weight: "semibold",
theme.secondary,
[Part ] + counter(std.heading.where(level: it.level)).display(it.numbering),
)
+ h(1.28em)
)
} #it.body],
)
}
body
}
)
#let title-page(doc, theme) = {
set align(center)
v(1fr)
block(
width: 100%,
inset: (y: 1.28em),
stroke: (bottom: 2pt + theme.secondary),
[
#set std.text(40pt)
#doc.title
],
)
if doc.subtitle != none {
std.text(18pt, doc.subtitle)
v(1em)
}
std.text(14pt)[Version #doc.package.version]
if doc.date != none {
h(3em)
std.text(14pt, doc.date.display())
}
h(3em)
std.text(14pt, doc.package.license)
if doc.at("cover", default: none) != none {
doc.cover
}
v(2fr)
pad(
x: 10%,
{
set align(left)
doc.abstract
},
)
v(2fr)
if doc.show-outline {
std.heading(level: 2, outlined: false, numbering: none, "Table of Contents")
columns(
2,
outline(title: none),
)
}
v(2fr)
pagebreak()
}
#let last-page(doc, theme) = { }
#let modernCustom = (
primary: primary,
secondary: secondary,
fonts: fonts,
muted: muted,
text: text,
header: header,
footer: footer,
heading: heading,
code: code,
emph: emph, // ← add this
commands: commands,
values: values,
page-init: page-init,
title-page: title-page,
last-page: last-page,
)