Add news page (#1085)

fixes #993 

Also added links to news and publications from respective section
headers on the home page. Changed the colors of the header links to make
it consistent with the previous look.
This commit is contained in:
Rohan Deb Sarkar 2023-01-08 22:46:31 +05:30 committed by GitHub
parent a9685570e5
commit f2be212967
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 15 deletions

View File

@ -1,6 +1,5 @@
<div class="news">
<h2>news</h2>
{% if site.news != blank -%}
{%- assign news_size = site.news | size -%}
<div class="table-responsive" {% if site.news_scrollable and news_size > 3 %}style="max-height: 10vw"{% endif %}>

View File

@ -1,5 +1,4 @@
<div class="publications">
<h2>selected publications</h2>
{% bibliography -f papers -q @*[selected=true]* %}
</div>

View File

@ -40,26 +40,30 @@ layout: default
{{ content }}
</div>
{% if page.news -%}
<!-- News -->
{%- include news.html %}
{% if page.news -%}
<h2><a href="{{ '/news/' | relative_url }}" style="color: inherit;">news</a></h2>
{%- include news.html %}
{%- endif %}
<!-- Selected papers -->
{% if page.selected_papers -%}
<!-- Selected papers -->
<h2><a href="{{ '/publications/' | relative_url }}" style="color: inherit;">selected publications</a></h2>
{%- include selected_papers.html %}
{%- endif %}
{%- if page.social %}
<!-- Social -->
<div class="social">
<div class="contact-icons">
{% include social.html %}
</div>
<div class="contact-note">
{{ site.contact_note }}
<!-- Social -->
{%- if page.social %}
<div class="social">
<div class="contact-icons">
{% include social.html %}
</div>
<div class="contact-note">
{{ site.contact_note }}
</div>
</div>
</div>
{%- endif %}
</article>

7
news.html Normal file
View File

@ -0,0 +1,7 @@
---
layout: page
title: news
permalink: /news/
---
{% include news.html %}