Skip to content

Latest commit

 

History

History
57 lines (53 loc) · 2.41 KB

news.md

File metadata and controls

57 lines (53 loc) · 2.41 KB
layout page
title News
eyebrow Lab news
lede Papers, awards and milestones from the lab, newest first.
permalink /news/

{%- assign news_items = site.data.news_all | default: site.data.news -%} {%- assign news_groups = news_items | group_by_exp: 'item', "item.date | date: '%Y'" -%} {%- assign type_order = 'award,paper,people,defense,talk,media' | split: ',' -%}

All {{ news_items | size }} {%- for t in type_order %} {%- assign n = news_items | where: 'type', t | size -%} {%- if n > 0 %} {{ t | capitalize }} {{ n }} {%- endif -%} {%- endfor %}

{%- for group in news_groups %}

{{ group.name }} {{ group.items | size }}

{% include news_list.html items=group.items %}
{%- endfor %}

No news of this type yet.

<script> (function () { var bar = document.getElementById('news-filter'); if (!bar) return; var chips = bar.querySelectorAll('.chip'); var items = document.querySelectorAll('.news-item'); var years = document.querySelectorAll('.news-year'); var empty = document.getElementById('news-empty'); bar.hidden = false; function apply(type) { chips.forEach(function (c) { c.setAttribute('aria-pressed', String(c.dataset.type === type)); }); items.forEach(function (li) { li.hidden = type !== 'all' && li.dataset.type !== type; }); var any = false; years.forEach(function (y) { var shown = y.querySelectorAll('.news-item:not([hidden])').length; y.hidden = shown === 0; y.querySelector('.news-year__count').textContent = shown; if (shown) any = true; }); empty.hidden = any; try { history.replaceState(null, '', type === 'all' ? location.pathname : '#' + type); } catch (e) {} } chips.forEach(function (c) { c.addEventListener('click', function () { apply(c.dataset.type); }); }); var h = location.hash.slice(1); if (h && bar.querySelector('[data-type="' + h + '"]')) apply(h); })(); </script>