This commit is contained in:
2025-07-22 21:31:00 +02:00
parent 590f92f97e
commit 8053caf1db
8 changed files with 53 additions and 3 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
build build
*.html *.html
*.pdf *.pdf
res/badges

View File

@@ -24,4 +24,15 @@ page "index.typ"
page "compiler-pattern-matching.typ" page "compiler-pattern-matching.typ"
page "article-favicon.typ" page "article-favicon.typ"
rm -rf res/badges && mkdir res/badges && typst query common.typ "<meta-people>" --root . --input query=true --field value --one | jq -r . | jq -r 'to_entries[] | [.key,.value.badge] | @tsv' | awk '{ if ($1 == "alex") { system("cp res/badge.png res/badges/alex") } else { system("curl "$2" > res/badges/"$1) } }'
for b in res/badges/*; do
bn=$(basename $b)
if [ -f res/badge_sum_$bn ]; then
cat res/badge_sum_$bn | sha256sum -c
else
echo WRITING CHECK SUM OF $bn
sha256sum $b > res/badge_sum_$bn
fi
done
cp build/index.typ.desktop.html build/index.html cp build/index.typ.desktop.html build/index.html

View File

@@ -9,7 +9,11 @@
} }
#let is-web = to-bool(sys.inputs.at("web", default: "true")) #let is-web = to-bool(sys.inputs.at("web", default: "true"))
#let is-html() = { return target() == "html" } #let is-html() = { if sys.inputs.at("query", default:"false") == "true" {
return false
} else {
return target() == "html"
} }
#let git_rev = sys.inputs.at("git_rev", default: "") #let git_rev = sys.inputs.at("git_rev", default: "")
#let git_commit_date = sys.inputs.at("git_commit_date", default: "") #let git_commit_date = sys.inputs.at("git_commit_date", default: "")
@@ -281,14 +285,23 @@ document.addEventListener('scroll', (event) => {
#let people = ( #let people = (
alex: ( alex: (
nick: "alex_s168", nick: "alex_s168",
url: "https://alex.vxcc.dev" url: "https://alex.vxcc.dev",
badge: "https://alex.vxcc.dev/res/badge.png",
), ),
ote: ( ote: (
nick: "otesunki", nick: "otesunki",
url: "https://512b.dev/ote/" url: "https://512b.dev/ote/",
badge: "https://512b.dev/assets/lagtrain.gif"
),
syn: (
nick: "syn",
url: "https://512b.dev/syn/",
badge: "https://512b.dev/syn/badge.png",
), ),
) )
#metadata(json.encode(people)) <meta-people>
#let person(p) = { #let person(p) = {
flink(p.url, p.nick) flink(p.url, p.nick)
} }

View File

@@ -52,6 +52,7 @@
(level:2, body: [ #link("https://github.com/vxcc-backend/vxcc-new")[ vxcc ]: Advanced multi-level compiler ]), (level:2, body: [ #link("https://github.com/vxcc-backend/vxcc-new")[ vxcc ]: Advanced multi-level compiler ]),
(level:2, body: [ #link("https://github.com/alex-s168/uiuac")[ uiuac ]: (discontinued) Optimizing compiler for the #link("https://uiua.org")[Uiua programming language] ]), (level:2, body: [ #link("https://github.com/alex-s168/uiuac")[ uiuac ]: (discontinued) Optimizing compiler for the #link("https://uiua.org")[Uiua programming language] ]),
(level:2, body: [ #link("https://github.com/Lambda-Mountain-Compiler-Backend/lambda-mountain")[ LSTS's standard library ] ]), (level:2, body: [ #link("https://github.com/Lambda-Mountain-Compiler-Backend/lambda-mountain")[ LSTS's standard library ] ]),
(level:2, body: [ FP programming language compiler mostly using #link("https://en.wikipedia.org/wiki/Interaction_nets")[interaction nets] ]),
(level:2, body: [ #link("https://github.com/h6-lang/h6")[ h6 ]: Minimal stack-based programming language ]), (level:2, body: [ #link("https://github.com/h6-lang/h6")[ h6 ]: Minimal stack-based programming language ]),
(level:2, body: [ #link("https://github.com/alex-s168/lil-rs")[ lil-rs ]: Rust implementation of #link("http://beyondloom.com/decker/lil.html")[lil] ]), (level:2, body: [ #link("https://github.com/alex-s168/lil-rs")[ lil-rs ]: Rust implementation of #link("http://beyondloom.com/decker/lil.html")[lil] ]),
@@ -71,4 +72,25 @@
#link("https://github.com/alex-s168/website")[Website source code] #link("https://github.com/alex-s168/website")[Website source code]
#br()#br()
The latest version of my badge will always be at:\
#raw(people.alex.badge)
#context if is-web and is-html() { // excludes min.html builds too
let scale = 1.3
for id in people.keys() {
let person = people.at(id)
html.elem("a", attrs:(href:person.url, target:"_blank"))[
#html.elem("img", attrs:(
src: res-path()+"badges/"+id,
alt: "link to " + person.nick,
attributionsrc: person.badge,
fetchpriority: "low",
style: "padding-left:10px; padding-right:14px",
width: str(88*scale),
height: str(31*scale),
))
]
}
}
] ]

BIN
res/badge.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 B

1
res/badge_sum_alex Normal file
View File

@@ -0,0 +1 @@
f256bdf8d1d8100be843a5f76ccfb5f0cb7315f98d075ae583b29916740e58ab res/badges/alex

1
res/badge_sum_ote Normal file
View File

@@ -0,0 +1 @@
9aecefadc2369798121567c27b4599cb92dd8bd56d926f1544c3ddd860762605 res/badges/ote

1
res/badge_sum_syn Normal file
View File

@@ -0,0 +1 @@
90a0093089d2ae940639aca8ca4dd86f0b7a20fd5b12adb313480b8b1868bc2b res/badges/syn