Skip to content

Commit 2f1f254

Browse files
authored
Create main.liquid
1 parent f5c865b commit 2f1f254

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

_layouts/main.liquid

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
layout: default
3+
---
4+
<div class="post">
5+
<article>
6+
{% if page.profile %}
7+
<div class="profile float-{% if page.profile.align == 'left' %}left{% else %}right{% endif %}">
8+
{% if page.profile.image %}
9+
{% assign profile_image_path = page.profile.image | prepend: 'assets/img/' %}
10+
{% if page.profile.image_circular %}
11+
{% assign profile_image_class = 'img-fluid z-depth-1 rounded-circle' %}
12+
{% else %}
13+
{% assign profile_image_class = 'img-fluid z-depth-1
14+
rounded' %}
15+
{% endif %}
16+
{% capture sizes %}(min-width: {{site.max_width}}) {{ site.max_width | minus: 30 | times: 0.3}}px, (min-width: 576px)
17+
30vw, 95vw"{% endcapture %}
18+
{%
19+
include figure.liquid loading="eager" path=profile_image_path class=profile_image_class sizes=sizes alt=page.profile.image
20+
cache_bust=true
21+
%}
22+
{% endif %}
23+
{% if page.profile.more_info %}
24+
<div class="more-info">{{ page.profile.more_info }}</div>
25+
{% endif %}
26+
</div>
27+
{% endif %}
28+
29+
<div class="clearfix">{{ content }}</div>
30+
31+
<!-- News -->
32+
{% if page.news and site.announcements.enabled %}
33+
<h2>
34+
<a href="{{ '/news/' | relative_url }}" style="color: inherit">news</a>
35+
</h2>
36+
{% include news.liquid limit=true %}
37+
{% endif %}
38+
39+
<!-- Latest posts -->
40+
{% if site.latest_posts.enabled %}
41+
<h2>
42+
<a href="{{ '/blog/' | relative_url }}" style="color: inherit">latest posts</a>
43+
</h2>
44+
{% include latest_posts.liquid %}
45+
{% endif %}
46+
47+
<!-- Selected papers -->
48+
{% if page.selected_papers %}
49+
<h2>
50+
<a href="{{ '/publications/' | relative_url }}" style="color: inherit">selected publications</a>
51+
</h2>
52+
{% include selected_papers.liquid %}
53+
{% endif %}
54+
55+
<!-- Social -->
56+
{% if page.social %}
57+
<div class="social">
58+
<div class="contact-icons">{% include social.liquid %}</div>
59+
60+
<div class="contact-note">{{ site.contact_note }}</div>
61+
</div>
62+
{% endif %}
63+
</article>
64+
</div>

0 commit comments

Comments
 (0)