Skip to content

Commit

Permalink
updates members to list papers, some re-org
Browse files Browse the repository at this point in the history
  • Loading branch information
lacava committed Jul 3, 2024
1 parent 270b56b commit 0d13a36
Show file tree
Hide file tree
Showing 15 changed files with 235 additions and 29 deletions.
26 changes: 25 additions & 1 deletion .github/workflows/make_member_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,31 @@

shutil.rmtree('_members')
os.makedirs('_members',exist_ok=True)
page_content = (
"""
{{ site.data.authors[page.author].about }}
{% include pubs_by_author.html given=page.given_name family=page.family_name %}
{% unless pubs_by_author == empty %}
<h2 class="archive__subtitle">Recent Papers </h2>
<div class="entries-list">
{% for paper in pubs_by_author limit: 2 %}
{% include pub-single.html pubid=paper%}
{% endfor %}
</div>
{% endunless %}
{% assign posts = site.posts | where: "author", page.author %}
{% unless posts == empty %}
<h2 class="archive__subtitle">Recent Posts</h2>
<div class="entries-list">
{% for post in posts limit: 2 %}
{% include archive-single.html type="list" %}
{% endfor %}
</div>
{% endunless %}
"""
)
for author, v in authors.items():
name = v['name'].split(',')[0]
given_name = name.split(' ')[0]
Expand All @@ -23,7 +47,7 @@
f"family_name: {family_name}",
"author_profile: true",
"---\n",
"{{ site.data.authors[page.author].about }}"
page_content
])
if author == 'bill':
page_file = f'_members/01_{family_name.replace(" ","")}-{given_name}.md'
Expand Down
1 change: 0 additions & 1 deletion _includes/member-single.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<div class="{{ include.type | default: 'list' }}__item">
<article class="archive__item" itemscope itemtype="https://schema.org/CreativeWork">
{% if include.type == "grid" and teaser %}
<!-- <div class="archive__item-teaser"> -->
<div class="author__avatar">
<img src="{{ teaser | relative_url }}" alt="">
</div>
Expand Down
17 changes: 17 additions & 0 deletions _includes/pubs_by_author.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{% include pubs_by_date.html %}

{% assign pubs_by_author = '' %}

{% for paper in pubs_by_date %}
{% assign include_paper = false %}
{% for author in paper.author %}
{% assign given = author.given | split: ' ' | first %}
{% if given == include.given and author.family == include.family %}
{% assign include_paper = true %}
{% endif %}
{% endfor %}
{% if include_paper %}
{% assign pubs_by_author = pubs_by_author | append: paper.id | append: "," %}
{% endif %}
{% endfor %}
{% assign pubs_by_author = pubs_by_author | split: "," %}
1 change: 0 additions & 1 deletion _includes/pubs_by_date.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

{% assign pubgroups = site.data.publications.references
| group_by_exp: "item", "item.issued.first.year | append: '/' | append: item.issued.first.month | append: '/' | append: item.issued.first.day | date: '%Y-%m-%d'"
| sort: "name"
Expand Down
26 changes: 10 additions & 16 deletions _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@

{{ content }}


<h2 class="archive__subtitle">Recent Papers</h2>

<div class="entries-{{ entries_layout }}">
{% include pubs_by_date.html %}
{% for pub in pubs_by_date limit: 3 %}
{% include pub-single.html %}
{% endfor %}
</div>

<h2 class="archive__subtitle">{{ site.data.ui-text[site.locale].recent_posts | default: "Recent Posts" }}</h2>

{% if paginator %}
Expand All @@ -18,21 +28,5 @@ <h2 class="archive__subtitle">{{ site.data.ui-text[site.locale].recent_posts | d
{% include archive-single.html type=entries_layout %}
{% endfor %}
</div>
<div style="text-align: right;">
<a href="/posts/" >See All Posts</a>
</div>

<h2 class="archive__subtitle">Recent Papers</h2>

<div class="entries-{{ entries_layout }}">
{% include pubs_by_date.html %}
{% for pub in pubs_by_date limit: 3 %}
{% include pub-single.html %}
{% endfor %}
</div>

<div style="text-align: right;">
<a href="/papers/" >See All Papers</a>
</div>

{% include paginator.html %}
23 changes: 22 additions & 1 deletion _members/01_LaCava-William.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,25 @@ family_name: La Cava
author_profile: true
---

{{ site.data.authors[page.author].about }}

{{ site.data.authors[page.author].about }}

{% include pubs_by_author.html given=page.given_name family=page.family_name %}
{% unless pubs_by_author == empty %}
<h2 class="archive__subtitle">Recent Papers </h2>
<div class="entries-list">
{% for paper in pubs_by_author limit: 2 %}
{% include pub-single.html pubid=paper%}
{% endfor %}
</div>
{% endunless %}

{% assign posts = site.posts | where: "author", page.author %}
{% unless posts == empty %}
<h2 class="archive__subtitle">Recent Posts</h2>
<div class="entries-list">
{% for post in posts limit: 2 %}
{% include archive-single.html type="list" %}
{% endfor %}
</div>
{% endunless %}
23 changes: 22 additions & 1 deletion _members/Aldeia-Guilherme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,25 @@ family_name: Aldeia
author_profile: true
---

{{ site.data.authors[page.author].about }}

{{ site.data.authors[page.author].about }}

{% include pubs_by_author.html given=page.given_name family=page.family_name %}
{% unless pubs_by_author == empty %}
<h2 class="archive__subtitle">Recent Papers </h2>
<div class="entries-list">
{% for paper in pubs_by_author limit: 2 %}
{% include pub-single.html pubid=paper%}
{% endfor %}
</div>
{% endunless %}

{% assign posts = site.posts | where: "author", page.author %}
{% unless posts == empty %}
<h2 class="archive__subtitle">Recent Posts</h2>
<div class="entries-list">
{% for post in posts limit: 2 %}
{% include archive-single.html type="list" %}
{% endfor %}
</div>
{% endunless %}
23 changes: 22 additions & 1 deletion _members/Lett-Elle.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,25 @@ family_name: Lett
author_profile: true
---

{{ site.data.authors[page.author].about }}

{{ site.data.authors[page.author].about }}

{% include pubs_by_author.html given=page.given_name family=page.family_name %}
{% unless pubs_by_author == empty %}
<h2 class="archive__subtitle">Recent Papers </h2>
<div class="entries-list">
{% for paper in pubs_by_author limit: 2 %}
{% include pub-single.html pubid=paper%}
{% endfor %}
</div>
{% endunless %}

{% assign posts = site.posts | where: "author", page.author %}
{% unless posts == empty %}
<h2 class="archive__subtitle">Recent Posts</h2>
<div class="entries-list">
{% for post in posts limit: 2 %}
{% include archive-single.html type="list" %}
{% endfor %}
</div>
{% endunless %}
23 changes: 22 additions & 1 deletion _members/Liu-Mingxuan.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,25 @@ family_name: Liu
author_profile: true
---

{{ site.data.authors[page.author].about }}

{{ site.data.authors[page.author].about }}

{% include pubs_by_author.html given=page.given_name family=page.family_name %}
{% unless pubs_by_author == empty %}
<h2 class="archive__subtitle">Recent Papers </h2>
<div class="entries-list">
{% for paper in pubs_by_author limit: 2 %}
{% include pub-single.html pubid=paper%}
{% endfor %}
</div>
{% endunless %}

{% assign posts = site.posts | where: "author", page.author %}
{% unless posts == empty %}
<h2 class="archive__subtitle">Recent Posts</h2>
<div class="entries-list">
{% for post in posts limit: 2 %}
{% include archive-single.html type="list" %}
{% endfor %}
</div>
{% endunless %}
23 changes: 22 additions & 1 deletion _members/Lukyanenko-Platon.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,25 @@ family_name: Lukyanenko
author_profile: true
---

{{ site.data.authors[page.author].about }}

{{ site.data.authors[page.author].about }}

{% include pubs_by_author.html given=page.given_name family=page.family_name %}
{% unless pubs_by_author == empty %}
<h2 class="archive__subtitle">Recent Papers </h2>
<div class="entries-list">
{% for paper in pubs_by_author limit: 2 %}
{% include pub-single.html pubid=paper%}
{% endfor %}
</div>
{% endunless %}

{% assign posts = site.posts | where: "author", page.author %}
{% unless posts == empty %}
<h2 class="archive__subtitle">Recent Posts</h2>
<div class="entries-list">
{% for post in posts limit: 2 %}
{% include archive-single.html type="list" %}
{% endfor %}
</div>
{% endunless %}
23 changes: 22 additions & 1 deletion _members/Raza-Marium.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,25 @@ family_name: Raza
author_profile: true
---

{{ site.data.authors[page.author].about }}

{{ site.data.authors[page.author].about }}

{% include pubs_by_author.html given=page.given_name family=page.family_name %}
{% unless pubs_by_author == empty %}
<h2 class="archive__subtitle">Recent Papers </h2>
<div class="entries-list">
{% for paper in pubs_by_author limit: 2 %}
{% include pub-single.html pubid=paper%}
{% endfor %}
</div>
{% endunless %}

{% assign posts = site.posts | where: "author", page.author %}
{% unless posts == empty %}
<h2 class="archive__subtitle">Recent Posts</h2>
<div class="entries-list">
{% for post in posts limit: 2 %}
{% include archive-single.html type="list" %}
{% endfor %}
</div>
{% endunless %}
23 changes: 22 additions & 1 deletion _members/Shahbandegan-Shakiba.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,25 @@ family_name: Shahbandegan
author_profile: true
---

{{ site.data.authors[page.author].about }}

{{ site.data.authors[page.author].about }}

{% include pubs_by_author.html given=page.given_name family=page.family_name %}
{% unless pubs_by_author == empty %}
<h2 class="archive__subtitle">Recent Papers </h2>
<div class="entries-list">
{% for paper in pubs_by_author limit: 2 %}
{% include pub-single.html pubid=paper%}
{% endfor %}
</div>
{% endunless %}

{% assign posts = site.posts | where: "author", page.author %}
{% unless posts == empty %}
<h2 class="archive__subtitle">Recent Posts</h2>
<div class="entries-list">
{% for post in posts limit: 2 %}
{% include archive-single.html type="list" %}
{% endfor %}
</div>
{% endunless %}
23 changes: 22 additions & 1 deletion _members/Zhao-Zhanzhan.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,25 @@ family_name: Zhao
author_profile: true
---

{{ site.data.authors[page.author].about }}

{{ site.data.authors[page.author].about }}

{% include pubs_by_author.html given=page.given_name family=page.family_name %}
{% unless pubs_by_author == empty %}
<h2 class="archive__subtitle">Recent Papers </h2>
<div class="entries-list">
{% for paper in pubs_by_author limit: 2 %}
{% include pub-single.html pubid=paper%}
{% endfor %}
</div>
{% endunless %}

{% assign posts = site.posts | where: "author", page.author %}
{% unless posts == empty %}
<h2 class="archive__subtitle">Recent Posts</h2>
<div class="entries-list">
{% for post in posts limit: 2 %}
{% include archive-single.html type="list" %}
{% endfor %}
</div>
{% endunless %}
7 changes: 6 additions & 1 deletion _pages/members.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ entries_layout: grid

{% assign entries_layout = page.entries_layout | default: 'list' %}
<div class="entries-{{ entries_layout }}">
{% include members-collection.html collection=page.collection sort_by=page.sort_by sort_order=page.sort_order type=entries_layout %}
{% include members-collection.html
collection=page.collection
sort_by=page.sort_by
sort_order=page.sort_order
type=entries_layout
%}
</div>

<div class="back-to-top"></div>
Expand Down
2 changes: 1 addition & 1 deletion assets/css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ https://github.com/mmistakes/minimal-mistakes/blob/8a67ce8e41ec850f2d7c373aa4773
/* Publication formatting */

.pubitem {
margin: 2em 0;
margin-bottom: 2em;
line-height: 1em;
}

Expand Down

0 comments on commit 0d13a36

Please sign in to comment.