diff --git a/assets/img/logos/level.svg b/assets/img/logos/level.svg new file mode 100644 index 0000000..8ac70b7 --- /dev/null +++ b/assets/img/logos/level.svg @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/js/utils/search-people.js b/assets/js/utils/search-people.js index 2e3ab1a..478ed7e 100644 --- a/assets/js/utils/search-people.js +++ b/assets/js/utils/search-people.js @@ -13,14 +13,12 @@ async function debouncedSearch( options = {}, debounceTimeoutMs = 300, ) { - if ( - options.filters.relevantCourses.length === 0 && - options.filters.researchAreas.length === 0 - ) { - const searchResult = await pf.search(term); - return searchResult; + if (!options.filters.level) { + delete options.filters.level; + } + if (options.filters && options.filters.type) { + delete options.filters.type; } - options.filters.relevantCourses = options.filters.relevantCourses.map( (course) => course.toLowerCase(), ); @@ -34,11 +32,6 @@ async function debouncedSearch( if (thisSearchID !== currentSearchID) { return null; } - - if (options.filters && options.filters.type) { - delete options.filters.type; - } - const searchResult = await pf.search(term, options); if (thisSearchID !== currentSearchID) { return null; @@ -52,6 +45,7 @@ export default function searchPeople() { filterType: "scientist", filterResearchAreas: [], filterRelevantCourses: [], + filterLevel: [], query: "", pagefind: null, error: null, @@ -76,6 +70,7 @@ export default function searchPeople() { "filterType", "filterResearchAreas", "filterRelevantCourses", + "filterLevel", ]) { this.$watch(param, () => this.search()); } @@ -87,18 +82,14 @@ export default function searchPeople() { let timeout = query ? 300 : 0; this.isLoading = true; this.resultCount = 0; - let options = {}; if (this.filterType) { options.filters = { type: this.filterType, + researchAreas: this.filterResearchAreas.map((f) => f.value), + relevantCourses: this.filterRelevantCourses.map((f) => f.value), + level: this.filterLevel, }; - options.filters.researchAreas = this.filterResearchAreas.map( - (f) => f.value, - ); - options.filters.relevantCourses = this.filterRelevantCourses.map( - (f) => f.value, - ); } if (this.hasFilters && !query) { @@ -151,6 +142,7 @@ export default function searchPeople() { role: data.meta.role || "", researchAreas: data.filters.researchAreas || [], relevantCourses: data.filters.relevantCourses || [], + level: data.filters.level || [], image: data.meta.image, alt: data.meta.image_alt, srcset: data.meta.image_srcset, @@ -163,7 +155,8 @@ export default function searchPeople() { get hasFilters() { return ( this.filterResearchAreas.length > 0 || - this.filterRelevantCourses.length > 0 + this.filterRelevantCourses.length > 0 || + this.filterLevel.length > 0 ); }, diff --git a/content/scientist/Al-Kindi.md b/content/scientist/Al-Kindi.md index 48d3f74..30baa25 100644 --- a/content/scientist/Al-Kindi.md +++ b/content/scientist/Al-Kindi.md @@ -18,5 +18,6 @@ } , "citations": ["https://doi.org/10.1017/CCOL0521817439.003"], -"layout": "person" +"layout": "person", +"level" : ["K12"] } diff --git a/content/scientist/Arthur Bertram Cuthbert Walker Jr.md b/content/scientist/Arthur Bertram Cuthbert Walker Jr.md index c4fff6d..a534730 100644 --- a/content/scientist/Arthur Bertram Cuthbert Walker Jr.md +++ b/content/scientist/Arthur Bertram Cuthbert Walker Jr.md @@ -1,5 +1,5 @@ { - "title": "name", + "title": "Arthur Bertram Cuthbert Walker Jr.", "name": "Arthur Bertram Cuthbert Walker Jr.", "linktitle": "Arthur Bertram Cuthbert Walker Jr.", "last": "Walker", @@ -27,5 +27,6 @@ "http://www.math.buffalo.edu/mad/physics/walker_arthurbc.html", "https://web.archive.org/web/20130826152433/https://aas.org/obituaries/arthur-b-c-walker-1936-2001" ], - "layout": "person" + "layout": "person", + "level" : ["UGLD"] } \ No newline at end of file diff --git a/content/scientist/Chien-Shiung Wu.md b/content/scientist/Chien-Shiung Wu.md index bda25d1..83c9cca 100644 --- a/content/scientist/Chien-Shiung Wu.md +++ b/content/scientist/Chien-Shiung Wu.md @@ -31,5 +31,6 @@ "citations": [ "https://doi.org/10.1007/978-3-319-19204-8_8" ], - "layout": "person" + "layout": "person", + "level" : ["K12", "UGUD"] } diff --git a/content/scientist/Donna Strickland.md b/content/scientist/Donna Strickland.md index 8385291..c152bc8 100644 --- a/content/scientist/Donna Strickland.md +++ b/content/scientist/Donna Strickland.md @@ -29,5 +29,6 @@ "https://www.nobelprize.org/prizes/physics/2018/strickland/biographical/", "https://www.optica.org/history/biographies/bios/donna-t-strickland/" ], - "layout": "person" + "layout": "person", + "level" : ["K12", "G"] } diff --git a/content/scientist/Henrietta Swan Leavitt.md b/content/scientist/Henrietta Swan Leavitt.md index 9950136..1cabd24 100644 --- a/content/scientist/Henrietta Swan Leavitt.md +++ b/content/scientist/Henrietta Swan Leavitt.md @@ -35,5 +35,6 @@ "https://www.nytimes.com/2024/03/27/obituaries/henrietta-leavitt-overlooked.html", "https://www.atnf.csiro.au/outreach/education/senior/astrophysics/variable_cepheids.html" ], - "layout": "person" + "layout": "person", + "level" : ["G"] } diff --git a/content/scientist/J Ernest Wilkins Jr.md b/content/scientist/J Ernest Wilkins Jr.md index be830ed..22efd2e 100644 --- a/content/scientist/J Ernest Wilkins Jr.md +++ b/content/scientist/J Ernest Wilkins Jr.md @@ -27,5 +27,6 @@ "Gamma Radiation Shielding": "Developed mathematical models to explain gamma radiation, which was critical to the development of shielding against gamma radiation emitted by nuclear sources and the sun and thus key to the design of safe nuclear reactors and space probes." }, "citations":["https://doi.org/10.1007/978-3-642-77425-6_33"], - "layout":"person" + "layout":"person", + "level" : ["UGLD", "UGUD"] } diff --git a/content/scientist/Jocelyn Bell Burnell.md b/content/scientist/Jocelyn Bell Burnell.md index fd4d574..0cc0009 100644 --- a/content/scientist/Jocelyn Bell Burnell.md +++ b/content/scientist/Jocelyn Bell Burnell.md @@ -29,5 +29,6 @@ "https://doi.org/10.1093/ww/9780199540884.013.U7157", "https://www.allesoversterrenkunde.nl/!/!/!/actueel/artikelen/_detail/gli/50-years-pulsars/" ], - "layout": "person" + "layout": "person", + "level" : ["K12", "UGLD"] } diff --git a/content/scientist/Katharine Burr Blodgett.md b/content/scientist/Katharine Burr Blodgett.md index 79bdd71..d3adcc2 100644 --- a/content/scientist/Katharine Burr Blodgett.md +++ b/content/scientist/Katharine Burr Blodgett.md @@ -29,5 +29,6 @@ "https://www.pbs.org/video/katharine-burr-blodgett-she-inspires-marl6o/", "https://www.sciencehistory.org/stories/magazine/the-invisible-woman/" ], - "layout": "person" + "layout": "person", + "level" : ["UGUD", "G"] } diff --git a/content/scientist/Katherine Johnson.md b/content/scientist/Katherine Johnson.md index a1f3fa6..80c6fd5 100644 --- a/content/scientist/Katherine Johnson.md +++ b/content/scientist/Katherine Johnson.md @@ -33,5 +33,6 @@ "citations": [ "https://doi.org/10.1093/anb/9780198606697.article.1302346" ], - "layout": "person" + "layout": "person", + "level" : ["K12", "UGLD"] } diff --git a/content/scientist/Lene Hau.md b/content/scientist/Lene Hau.md index de631bf..14cce10 100644 --- a/content/scientist/Lene Hau.md +++ b/content/scientist/Lene Hau.md @@ -31,5 +31,6 @@ "https://www.thecrimson.com/article/1999/10/13/hau-receives-tenure-physics-professor-slowed/", "https://doi.org/10.1103/PhysRevLett.104.133002" ], - "layout": "person" + "layout": "person", + "level" : ["UGUD"] } diff --git a/content/scientist/Mary Chilton Noyes.md b/content/scientist/Mary Chilton Noyes.md index 27da792..31e4e2a 100644 --- a/content/scientist/Mary Chilton Noyes.md +++ b/content/scientist/Mary Chilton Noyes.md @@ -22,5 +22,6 @@ "Elasticity of a Piano Wire": "Recorded the elasticity of a piano wire, expanding the temperature range to 200 degrees celsius. Prior work on the elasticity of piano wire only recorded work up to 100 degrees celsius. Noyes concluded that elasticity decreased linearly as temperature increased. Additionally, there was no maximum of elasticity at 100 degrees celsius." }, "citations": ["https://doi.org/10.1103/PhysRevSeriesI.2.277"], - "layout": "person" + "layout": "person", + "level" : ["K12", "UGUD"] } diff --git a/content/scientist/Robert A. Ellis Jr.md b/content/scientist/Robert A. Ellis Jr.md index 9af6990..bd11c7a 100644 --- a/content/scientist/Robert A. Ellis Jr.md +++ b/content/scientist/Robert A. Ellis Jr.md @@ -27,5 +27,6 @@ "https://www.economist.com/science-and-technology/2015/10/24/stellar-work", "https://www.energy.gov/science/doe-explainsfusion-energy-science" ], - "layout": "person" + "layout": "person", + "level" : ["K12"] } diff --git a/content/scientist/Ruby Payne-Scott.md b/content/scientist/Ruby Payne-Scott.md index eec9329..f19d0f4 100644 --- a/content/scientist/Ruby Payne-Scott.md +++ b/content/scientist/Ruby Payne-Scott.md @@ -29,5 +29,6 @@ "https://www.swpc.noaa.gov/phenomena/solar-flares-radio-blackouts", "https://www.nrao.edu/astrores/gbsrbs/Pubs/AJP_07.pdf" ], - "layout": "person" + "layout": "person", + "level" : ["UGUD", "G"] } diff --git a/layouts/_default/home.html b/layouts/_default/home.html index ce11c35..481eb0c 100644 --- a/layouts/_default/home.html +++ b/layouts/_default/home.html @@ -152,7 +152,7 @@

>− - Scientist by area + Scientist by research area

diff --git a/layouts/_default/person.html b/layouts/_default/person.html index 6133615..9e5ea29 100644 --- a/layouts/_default/person.html +++ b/layouts/_default/person.html @@ -94,6 +94,25 @@

>

+

+ + + level + + + + + {{ range $index, $level := .Params.level }} + {{- if ne $index 0 }},{{ end }} + + {{ $level }} + + {{- end }} + +

@@ -202,7 +221,7 @@

{{ range $index, $area := .Params.relevant_concepts }} {{- if ne $index 0 }},{{ end }} - {{ $area -}} + {{ $area -}} {{- end }} @@ -311,7 +330,7 @@

Citations

class="citation-item overflow-hidden break-words" > [{{ add $index 1 }}]{{ $citation }}[{{ add $index 1 }}] {{ $citation }} {{ end }} @@ -323,7 +342,7 @@

Citations

- + + + +