From 5519b7ed14408205f0bd1492c9ac3e875d747176 Mon Sep 17 00:00:00 2001 From: Janosh Riebesell Date: Wed, 7 Feb 2024 15:39:43 +0100 Subject: [PATCH] add SortButtons component used in /cv to sort repos/papers by date/title/commits/stars/author update deps + commit hooks fix chgnet logo in landing page recent section --- .pre-commit-config.yaml | 2 +- package.json | 22 ++-- src/app.d.ts | 2 +- src/lib/Footer.svelte | 5 + src/lib/SortButtons.svelte | 50 ++++++++ src/lib/index.ts | 1 + src/lib/oss.yml | 44 +++---- src/lib/papers.yaml | 2 +- src/lib/types.ts | 1 + src/routes/+layout.svelte | 15 ++- src/routes/+page.svelte | 12 +- src/routes/cv/+page.svelte | 185 ++++++++++++++++------------ src/routes/cv/Papers.svelte | 36 ++++-- src/routes/cv/cv.yml | 23 +++- src/routes/open-source/+page.svelte | 6 +- 15 files changed, 261 insertions(+), 145 deletions(-) create mode 100644 src/lib/SortButtons.svelte diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 69675a08..6ab06c9a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -37,7 +37,7 @@ repos: args: [--ignore-words-list, 'ist,yau,te,manuel', --check-filenames] - repo: https://github.com/pre-commit/mirrors-eslint - rev: v9.0.0-alpha.0 + rev: v9.0.0-beta.1 hooks: - id: eslint types: [file] diff --git a/package.json b/package.json index 43e4a215..9a60d901 100644 --- a/package.json +++ b/package.json @@ -29,13 +29,13 @@ "@iconify/svelte": "^3.1.6", "@rollup/plugin-yaml": "^4.1.2", "@sveltejs/adapter-static": "^3.0.1", - "@sveltejs/kit": "^2.5.0", - "@sveltejs/vite-plugin-svelte": "^3.0.1", - "@typescript-eslint/eslint-plugin": "^6.19.1", - "@typescript-eslint/parser": "^6.19.1", + "@sveltejs/kit": "^2.5.1", + "@sveltejs/vite-plugin-svelte": "^3.0.2", + "@typescript-eslint/eslint-plugin": "^7.0.2", + "@typescript-eslint/parser": "^7.0.2", "devalue": "^4.3.2", "elementari": "^0.2.3", - "eslint": "^8.56.0", + "eslint": "^8.57.0", "eslint-plugin-svelte": "^2.35.1", "hast-util-from-string": "^3.0.0", "hast-util-select": "^6.0.2", @@ -43,20 +43,20 @@ "js-yaml": "^4.1.0", "katex": "^0.16.9", "mdsvex": "^0.11.0", - "prettier": "^3.2.4", - "prettier-plugin-svelte": "^3.1.2", + "prettier": "^3.2.5", + "prettier-plugin-svelte": "^3.2.1", "rehype-autolink-headings": "^7.1.0", "rehype-katex-svelte": "^1.2.0", "rehype-slug": "^6.0.0", "remark-math": "3.0.0", - "svelte": "^4.2.9", - "svelte-check": "^3.6.3", + "svelte": "^4.2.12", + "svelte-check": "^3.6.4", "svelte-multiselect": "^10.2.0", "svelte-preprocess": "^5.1.3", "svelte-preprocess-import-assets": "^1.1.0", "svelte-zoo": "^0.4.10", - "svelte2tsx": "^0.7.0", + "svelte2tsx": "^0.7.1", "typescript": "^5.3.3", - "vite": "^5.0.12" + "vite": "^5.1.4" } } diff --git a/src/app.d.ts b/src/app.d.ts index a824a927..668435b7 100644 --- a/src/app.d.ts +++ b/src/app.d.ts @@ -10,7 +10,7 @@ declare module '*cv.yml' { education: types.Education[] skills: types.Skill[] hobbies: types.Hobby[] - nationality: string[] + nationality: { title: string; icon: string }[] languages: types.Language[] volunteer: types.Volunteer[] awards: types.Award[] 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..01f21a6c --- /dev/null +++ b/src/lib/SortButtons.svelte @@ -0,0 +1,50 @@ + + + + {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..d678c9d9 100644 --- a/src/lib/oss.yml +++ b/src/lib/oss.yml @@ -9,10 +9,11 @@ projects: - Python - Cython - Jupyter Notebook - stars: 1257 - commits: 931 + stars: 1266 + commits: 948 - name: Matbench Discovery url: https://matbench-discovery.materialsproject.org + logo: https://janosh.github.io/matbench-discovery/favicon.svg img_style: 'filter: invert(1);' repo: https://github.com/janosh/matbench-discovery paper: riebesell_matbench_2023 @@ -24,11 +25,12 @@ projects: - TypeScript - JavaScript - HTML - stars: 52 - commits: 308 + stars: 57 + commits: 315 - name: CHGNet url: https://chgnet.lbl.gov repo: https://github.com/CederGroupHub/chgnet + logo: https://chgnet.lbl.gov/favicon.svg role: Maintainer paper: deng_chgnet_2023 description: Pretrained universal neural network potential for charge-informed atomistic modeling published on the Sep 2023 cover of NMI. @@ -41,8 +43,8 @@ projects: - HTML - JavaScript - TypeScript - stars: 164 - commits: 167 + stars: 174 + commits: 169 - name: MACE url: https://mace-docs.readthedocs.io repo: https://github.com/ACEsuit/mace @@ -50,7 +52,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: 313 commits: 21 languages: - Python @@ -66,7 +68,7 @@ projects: - Python - JavaScript - HTML - stars: 109 + stars: 113 commits: 174 - name: pymatviz url: https://pymatviz.janosh.dev @@ -80,8 +82,8 @@ projects: - TypeScript - HTML - JavaScript - stars: 101 - commits: 235 + stars: 104 + commits: 237 - name: Tensorboard Reducer repo: https://github.com/janosh/tensorboard-reducer logo: https://raw.githubusercontent.com/janosh/tensorboard-reducer/main/assets/tensorboard-reducer-square.svg @@ -98,7 +100,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: 1265 commits: 72 - name: atomate2 repo: https://github.com/materialsproject/atomate2 @@ -110,8 +112,8 @@ projects: potential-powered structure relaxation workflows. languages: - Python - stars: 113 - commits: 349 + stars: 116 + commits: 353 - name: jobflow repo: https://github.com/materialsproject/jobflow role: Maintainer @@ -122,7 +124,7 @@ projects: languages: - Python - TeX - stars: 77 + stars: 81 commits: 100 - name: Aviary repo: https://github.com/CompRhys/aviary @@ -132,8 +134,8 @@ projects: pypi: https://pypi.org/project/tensorboard-reducer languages: - Python - stars: 36 - commits: 233 + stars: 38 + commits: 234 - name: MatCalc url: https://materialsvirtuallab.github.io/matcalc logo: https://github.com/materialsvirtuallab/matcalc/assets/30958850/89486f2f-73fb-40fb-803a-dfafe510eb6d @@ -142,8 +144,8 @@ projects: description: A Python library for calculating materials properties from ML force field potential energy surfaces. languages: - Python - stars: 37 - commits: 66 + stars: 40 + commits: 68 - name: TikZ url: https://tikz.janosh.dev repo: https://github.com/janosh/tikz @@ -165,7 +167,7 @@ projects: description: Pushing the Pareto front of band gap and permittivity with ML-guided dielectrics discovery incl. experimental synthesis. logo: https://github.com/janosh/tikz/raw/main/assets/plate-capacitor/plate-capacitor.svg paper: riebesell_pushing_2024 - stars: 6 + stars: 7 commits: 12 languages: - Python @@ -181,5 +183,5 @@ projects: - CSS - HTML - JavaScript - stars: 247 - commits: 269 + stars: 253 + commits: 270 diff --git a/src/lib/papers.yaml b/src/lib/papers.yaml index 0716e1da..275af948 100644 --- a/src/lib/papers.yaml +++ b/src/lib/papers.yaml @@ -459,7 +459,7 @@ references: publisher: arXiv source: arXiv.org title: >- - Matbench Discovery -- An evaluation framework for machine learning crystal + Matbench Discovery - An evaluation framework for machine learning crystal stability prediction URL: http://arxiv.org/abs/2308.14920 diff --git a/src/lib/types.ts b/src/lib/types.ts index cb27d602..4b81efe5 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -94,4 +94,5 @@ export type Membership = { export type Language = { name: string level: string + icon: string } diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 5a67e690..09301759 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,16 +34,18 @@ {#if $page.url.pathname !== `/`} - « home + ← home {/if} -