Skip to content

Commit

Permalink
people
Browse files Browse the repository at this point in the history
  • Loading branch information
wulfdewolf committed Feb 13, 2024
1 parent 9c61f4f commit 876fc0c
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 8 deletions.
40 changes: 37 additions & 3 deletions _layouts/profiles.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,43 @@ layout: page
---
<div class="post">
<article>
{% if page.profiles %}
{% for profile in page.profiles %}
<hr>
{% if page.profiles_pi %}
{% for profile in page.profiles_pi %}
<a>
<h2 class="category">PI</h2>
</a>
<div class="profile float-{% if profile.align == 'left' %}left{% else %}right{% endif %}">
{% if profile.image %}
{% assign profile_image_path = profile.image | prepend: 'assets/img/' %}
{% if profile.image_circular %}
{% assign profile_image_class = 'img-fluid z-depth-1 rounded-circle' %}
{% else %}
{% assign profile_image_class = 'img-fluid z-depth-1 rounded' %}
{% endif %}
{% capture sizes %}(min-width: {{site.max_width}}) {{ site.max_width | minus: 30 | times: 0.3}}px, (min-width: 576px) 30vw, 95vw"{% endcapture %}
{% include figure.liquid path = profile_image_path class = profile_image_class sizes = sizes alt = profile.image %}
{% endif %}
{% if profile.more_info %}
<div class="more-info">{{ profile.more_info }}</div>
{% endif %}
</div>

<div class="clearfix">
{% if profile.content %}
{% capture profile_content %}{% include_relative {{ profile.content }} %}{% endcapture %}
{{ profile_content | markdownify }}
{% else %}
{{ content }}
{% endif %}
</div>
{% endfor %}
{% endif %}

{% if page.profiles_postdoc %}
{% for profile in page.profiles_postdoc %}
<a>
<h2 class="category">Postdoc</h2>
</a>
<div class="profile float-{% if profile.align == 'left' %}left{% else %}right{% endif %}">
{% if profile.image %}
{% assign profile_image_path = profile.image | prepend: 'assets/img/' %}
Expand Down
17 changes: 12 additions & 5 deletions _pages/profiles.md → _pages/people.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,27 @@ description: members of the lab or group
nav: true
nav_order: 7

profiles:
profiles_pi:
# if you want to include more than one profile, just replicate the following block
# and create one content file for each profile inside _pages/
- align: left
image: prof_pic.jpg
content: about_einstein.md
content: people/template.md
image_circular: false # crops the image to make it circular
more_info: >
<p>Albert Einstein, The man</p>
<p>Matt Nolan, PI</p>
- align: left
image: prof_pic.jpg
content: about_harry.md
content: people/template.md
image_circular: false # crops the image to make it circular
more_info: >
<p>Dr Harry Clark, Postdoc</p>
<p>Gulsen Surmeli, PI</p>
profiles_postdoc:
- align: left
image: prof_pic.jpg
content: people/harry.md
image_circular: false # crops the image to make it circular
more_info: >
<p>Harry Clark, Postdoc</p>
---
File renamed without changes.
File renamed without changes.

0 comments on commit 876fc0c

Please sign in to comment.