diff --git a/src/lib/Footer.svelte b/src/lib/Footer.svelte index 31b69220..959dc3c8 100644 --- a/src/lib/Footer.svelte +++ b/src/lib/Footer.svelte @@ -30,4 +30,9 @@ border-radius: 50%; transform: scale(1.4); } + @media print { + :is(button, footer) { + display: none; + } + } diff --git a/src/lib/SortButtons.svelte b/src/lib/SortButtons.svelte new file mode 100644 index 00000000..9f7a37c5 --- /dev/null +++ b/src/lib/SortButtons.svelte @@ -0,0 +1,47 @@ + + + + {label} + {#each sort_keys as key} + + {/each} + + + + diff --git a/src/lib/index.ts b/src/lib/index.ts index 1dc080c7..264115b1 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -1,5 +1,6 @@ export { default as DocsGrid } from './DocsGrid.svelte' export { default as Footer } from './Footer.svelte' export { default as Nav } from './Nav.svelte' +export { default as SortButtons } from './SortButtons.svelte' export type * from './types' diff --git a/src/lib/oss.yml b/src/lib/oss.yml index 3763813d..a6732fcd 100644 --- a/src/lib/oss.yml +++ b/src/lib/oss.yml @@ -9,8 +9,8 @@ projects: - Python - Cython - Jupyter Notebook - stars: 1257 - commits: 931 + stars: 1258 + commits: 932 - name: Matbench Discovery url: https://matbench-discovery.materialsproject.org img_style: 'filter: invert(1);' @@ -24,8 +24,8 @@ projects: - TypeScript - JavaScript - HTML - stars: 52 - commits: 308 + stars: 54 + commits: 310 - name: CHGNet url: https://chgnet.lbl.gov repo: https://github.com/CederGroupHub/chgnet @@ -50,7 +50,7 @@ projects: paper: riebesell_foundation_2023 description: Fast and accurate machine learning interatomic potentials with higher order equivariant message passing. logo: https://avatars.githubusercontent.com/u/68508620 - stars: 296 + stars: 300 commits: 21 languages: - Python @@ -98,7 +98,7 @@ projects: description: Curated list of resources for learning and using normalizing flows, a powerful tool in ML for modeling probability distributions. languages: - Python - stars: 1252 + stars: 1253 commits: 72 - name: atomate2 repo: https://github.com/materialsproject/atomate2 @@ -110,7 +110,7 @@ projects: potential-powered structure relaxation workflows. languages: - Python - stars: 113 + stars: 114 commits: 349 - name: jobflow repo: https://github.com/materialsproject/jobflow @@ -133,7 +133,7 @@ projects: languages: - Python stars: 36 - commits: 233 + commits: 234 - name: MatCalc url: https://materialsvirtuallab.github.io/matcalc logo: https://github.com/materialsvirtuallab/matcalc/assets/30958850/89486f2f-73fb-40fb-803a-dfafe510eb6d diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 5a67e690..de9864c3 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -11,7 +11,7 @@ const parts = filename.split(`/`).filter((part) => !part.startsWith(`(`)) // remove hidden route segments const route = `/${parts.slice(1, -1).join(`/`)}` return { label: route, action: () => goto(route) } - } + }, ) afterNavigate(() => { @@ -34,7 +34,7 @@ {#if $page.url.pathname !== `/`} - « home + ← home {/if} @@ -43,7 +43,7 @@ diff --git a/src/routes/cv/+page.svelte b/src/routes/cv/+page.svelte index e9713779..79fa16e6 100644 --- a/src/routes/cv/+page.svelte +++ b/src/routes/cv/+page.svelte @@ -1,14 +1,23 @@
    - {#each references.sort(({ author }) => { - return -(author[0].family == target_author.split(` `)[1]) + {#each references.sort((ref1, ref2) => { + const dir = sort_order === `asc` ? 1 : -1 + if (sort_by === `title`) { + return ref1.title.localeCompare(ref2.title) * dir + } else if (sort_by === `date`) { + const { year: y1, month: m1 } = ref1.issued[0] + const { year: y2, month: m2 } = ref2.issued[0] + return dir * (100 * (y1 - y2) + (m1 - m2)) + } else if (sort_by === `author`) { + // papers with target_author first/last + const idx1 = ref1.author.findIndex((auth) => auth.family === target_author.split(` `)[1]) + const idx2 = ref2.author.findIndex((auth) => auth.family === target_author.split(` `)[1]) + return (idx1 - idx2) * dir + } else throw `Unknown sort_by: ${sort_by}` }) as { title, id, author, DOI, URL: href, issued } (id)} {@const author_str = author .map(({ given, family }) => { @@ -27,11 +42,9 @@ return `${first_name ?? ``}${family}` }) .join(`, `)} -
  1. +
  2. {title}

    - - {@html truncate_authors(author_str, target_author)} - + {truncate_authors(author_str, target_author)} — {#if DOI} diff --git a/src/routes/cv/cv.yml b/src/routes/cv/cv.yml index 71804702..852a08fa 100644 --- a/src/routes/cv/cv.yml +++ b/src/routes/cv/cv.yml @@ -122,9 +122,11 @@ hobbies: - name: drones icon: carbon:drone href: https://youtube.com/@jrib + nationality: - ๐Ÿ‡จ๐Ÿ‡ฆ Canadian - ๐Ÿ‡ฉ๐Ÿ‡ช German + languages: - name: ๐Ÿ‡บ๐Ÿ‡ธ English level: advanced @@ -134,6 +136,7 @@ languages: level: intermediate - name: ๐Ÿ‡ช๐Ÿ‡ธ Spanish level: basic + volunteer: - name: Studenten bilden Schรผler description: Non-profit student initiative that connects University student volunteers with children from underprivileged families for free tutoring. @@ -147,11 +150,13 @@ volunteer: href: https://afara.foundation logo: https://afara.foundation/favicon.svg role: Board member and head of IT + awards: - name: Studienstiftung des deutschen Volkes description: Full scholarship for outstanding students (German Academic Scholarship Foundation) date: 2015 - 2023 href: https://studienstiftung.de + memberships: - name: Cambridge Physical Society date: 2019 - present diff --git a/src/routes/open-source/+page.svelte b/src/routes/open-source/+page.svelte index d767e55b..6a0a2ce2 100644 --- a/src/routes/open-source/+page.svelte +++ b/src/routes/open-source/+page.svelte @@ -4,8 +4,8 @@ import { highlight_matches } from 'svelte-zoo' import { flip } from 'svelte/animate' - let sort_by: 'commits' | 'stars' | 'alphabetical' = `commits` - const sort_by_options = [`commits`, `stars`, `alphabetical`] as const + let sort_by: 'commits' | 'stars' | 'title' = `commits` + const sort_by_options = [`commits`, `stars`, `title`] as const $: projects = oss.projects .filter((proj) => { @@ -13,7 +13,7 @@ return JSON.stringify(proj).toLowerCase().includes(query.toLowerCase()) }) .sort((p1, p2) => { - if (sort_by === `alphabetical`) { + if (sort_by === `title`) { return p1.name.localeCompare(p2.name) } else if ([`commits`, `stars`].includes(sort_by)) { return p2[sort_by] - p1[sort_by]