swap institution and degree in education list
This commit is contained in:
parent
f3f62cb4f7
commit
2cd36bc206
|
|
@ -94,20 +94,19 @@ function formatShortDate(input: Date | string) {
|
||||||
{formatShortDate(entry.data.dateEnd)}
|
{formatShortDate(entry.data.dateEnd)}
|
||||||
</div>
|
</div>
|
||||||
<div class="font-departure text-black dark:text-white font-semibold">
|
<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>
|
||||||
<div class="font-departure text-sm font-semibold">
|
<div class="font-departure text-sm font-semibold">
|
||||||
{entry.data.degree}
|
{entry.data.institution +
|
||||||
{entry.data.field && ` - ${entry.data.field}`}
|
(entry.data.location
|
||||||
|
? `, ${entry.data.location}`
|
||||||
|
: "")}
|
||||||
</div>
|
</div>
|
||||||
{(entry.data.finalGrade || entry.data.location) && (
|
{entry.data.finalGrade && (
|
||||||
<div class="text-sm">
|
<div class="text-sm">
|
||||||
{entry.data.finalGrade &&
|
{entry.data.finalGrade &&
|
||||||
`Grade: ${
|
`Grade: ${entry.data.finalGrade}`}
|
||||||
entry.data.finalGrade +
|
|
||||||
(entry.data.location ? ", " : "")
|
|
||||||
}`}
|
|
||||||
{entry.data.location}
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{entry.body && (
|
{entry.body && (
|
||||||
|
|
|
||||||
|
|
@ -7,23 +7,17 @@ type Context = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export async function GET(context: Context) {
|
export async function GET(context: Context) {
|
||||||
const posts = (await getCollection("blog")).map((item) => ({
|
const posts = await getCollection("blog");
|
||||||
item,
|
const projects = await getCollection("projects");
|
||||||
pre: "blog",
|
|
||||||
}));
|
|
||||||
const projects = (await getCollection("projects")).map((item) => ({
|
|
||||||
item,
|
|
||||||
pre: "projects",
|
|
||||||
}));
|
|
||||||
|
|
||||||
const items = [...posts, ...projects].filter(
|
const items = [...posts, ...projects].filter(
|
||||||
({ item }) => !item.data.draft,
|
(item) => !item.data.draft,
|
||||||
);
|
);
|
||||||
|
|
||||||
items.sort(
|
items.sort(
|
||||||
(a, b) =>
|
(a, b) =>
|
||||||
new Date(b.item.data.date).getTime() -
|
new Date(b.data.date).getTime() -
|
||||||
new Date(a.item.data.date).getTime(),
|
new Date(a.data.date).getTime(),
|
||||||
);
|
);
|
||||||
|
|
||||||
return rss({
|
return rss({
|
||||||
|
|
@ -31,7 +25,7 @@ export async function GET(context: Context) {
|
||||||
description: SITE.DESCRIPTION,
|
description: SITE.DESCRIPTION,
|
||||||
site: context.site,
|
site: context.site,
|
||||||
stylesheet: "/rss-style.xsl",
|
stylesheet: "/rss-style.xsl",
|
||||||
items: items.map(({ item, pre }) => ({
|
items: items.map((item) => ({
|
||||||
title: item.data.title,
|
title: item.data.title,
|
||||||
description: item.data.summary,
|
description: item.data.summary,
|
||||||
author: SITE.AUTHOR,
|
author: SITE.AUTHOR,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue