swap institution and degree in education list

This commit is contained in:
Moritz Hölting 2026-03-18 18:42:28 +01:00
parent f3f62cb4f7
commit 2cd36bc206
2 changed files with 14 additions and 21 deletions

View File

@ -94,20 +94,19 @@ function formatShortDate(input: Date | string) {
{formatShortDate(entry.data.dateEnd)}
</div>
<div class="font-departure text-black dark:text-white font-semibold">
{entry.data.institution}
{entry.data.degree}
{entry.data.field && ` ${entry.data.field}`}
</div>
<div class="font-departure text-sm font-semibold">
{entry.data.degree}
{entry.data.field && ` - ${entry.data.field}`}
{entry.data.institution +
(entry.data.location
? `, ${entry.data.location}`
: "")}
</div>
{(entry.data.finalGrade || entry.data.location) && (
{entry.data.finalGrade && (
<div class="text-sm">
{entry.data.finalGrade &&
`Grade: ${
entry.data.finalGrade +
(entry.data.location ? ", " : "")
}`}
{entry.data.location}
`Grade: ${entry.data.finalGrade}`}
</div>
)}
{entry.body && (

View File

@ -7,23 +7,17 @@ type Context = {
};
export async function GET(context: Context) {
const posts = (await getCollection("blog")).map((item) => ({
item,
pre: "blog",
}));
const projects = (await getCollection("projects")).map((item) => ({
item,
pre: "projects",
}));
const posts = await getCollection("blog");
const projects = await getCollection("projects");
const items = [...posts, ...projects].filter(
({ item }) => !item.data.draft,
(item) => !item.data.draft,
);
items.sort(
(a, b) =>
new Date(b.item.data.date).getTime() -
new Date(a.item.data.date).getTime(),
new Date(b.data.date).getTime() -
new Date(a.data.date).getTime(),
);
return rss({
@ -31,7 +25,7 @@ export async function GET(context: Context) {
description: SITE.DESCRIPTION,
site: context.site,
stylesheet: "/rss-style.xsl",
items: items.map(({ item, pre }) => ({
items: items.map((item) => ({
title: item.data.title,
description: item.data.summary,
author: SITE.AUTHOR,