feat: link the personal page from the people page

- add a personal page link to each person that has one
- show it first in the links of squid, in English and Italian
This commit is contained in:
squid 2026-11-13 09:23:42 +01:00
commit 51888cf13f
4 changed files with 9 additions and 4 deletions

View file

@ -360,7 +360,9 @@ def build():
cards = []
for person in site["people"]:
handle, nm = person["handle"], person.get("name", "")
links = "\n".join(f'<li><a href="{x["url"]}">{esc(x["label"])}</a></li>' for x in person["links"])
entries = ([("home", person["home"], data["personal_page"])] if person.get("home") else [])
entries += [("link", x["url"], x["label"]) for x in person["links"]]
links = "\n".join(f'<li><a href="{u}">{esc(label)}</a></li>' for _, u, label in entries)
cards.append(render(tpl["parts/person-card"], dict(
ctx, handle=esc(handle), title=(esc(nm) + " (" + esc(handle) + ")") if nm else esc(handle),
bio=esc(data["bios"][handle]), links=links), "templates/parts/person-card.html"))

View file

@ -52,7 +52,8 @@
"intro": "Who is behind kmalloc.org.",
"bios": {
"squid": "I'm squid. I run kmalloc.org, write code and maintain the services on this site. I have been into computers since I was ten, when I got an IBM PS/2 with a 486DX and played Gorilla, a QBasic game: ever since, I have been taking things apart to understand how they work. Outside of work: retro computing, science fiction and extreme metal."
}
},
"personal_page": "Personal page"
},
"services": {
"path": "/services.html",

View file

@ -55,7 +55,8 @@
"intro": "Chi c'è dietro kmalloc.org.",
"bios": {
"squid": "Sono squid. Gestisco kmalloc.org, scrivo codice e mantengo i servizi di questo sito. Mi appassionano i computer da quando, a dieci anni, ebbi un IBM PS/2 con un 486DX e giocai a Gorilla, un gioco in QBasic: da allora smonto le cose per capire come funzionano. Fuori dal lavoro: retrocomputing, fantascienza ed extreme metal."
}
},
"personal_page": "Pagina personale"
},
"services": {
"path": "/it/servizi.html",

View file

@ -70,7 +70,8 @@
"label": "git",
"url": "https://git.kmalloc.org/squid"
}
]
],
"home": "/~squid/"
}
]
}