From 7fbe5edc50ef1749c0542b02b05ba9bd6bcd56ad Mon Sep 17 00:00:00 2001 From: Rohan Deb Sarkar Date: Sat, 7 Jan 2023 22:04:54 +0530 Subject: [PATCH 1/4] Add nesw page --- _includes/news.html | 2 +- _layouts/news.html | 35 +++++++++++++++++++++++++++++++++++ _pages/news.md | 5 +++++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 _layouts/news.html create mode 100644 _pages/news.md diff --git a/_includes/news.html b/_includes/news.html index 307e532dc9af..071806f787be 100644 --- a/_includes/news.html +++ b/_includes/news.html @@ -1,6 +1,6 @@
-

news

+

news

{% if site.news != blank -%} {%- assign news_size = site.news | size -%}
3 %}style="max-height: 10vw"{% endif %}> diff --git a/_layouts/news.html b/_layouts/news.html new file mode 100644 index 000000000000..55a80c4e5a4b --- /dev/null +++ b/_layouts/news.html @@ -0,0 +1,35 @@ +--- +layout: page +--- + + +
+ {% if site.news != blank -%} + {%- assign news_size = site.news | size -%} +
3 %}style="max-height: 10vw"{% endif %}> + + {%- assign news = site.news | reverse -%} + {% if site.news_limit %} + {% assign news_limit = site.news_limit %} + {% else %} + {% assign news_limit = news_size %} + {% endif %} + {% for item in news limit: news_limit %} + + + + + {%- endfor %} +
{{ item.date | date: "%b %-d, %Y" }} + {% if item.inline -%} + {{ item.content | remove: '

' | remove: '

' | emojify }} + {%- else -%} + {{ item.title }} + {%- endif %} +
+
+ {%- else -%} +

No news so far...

+ {%- endif %} +
+ diff --git a/_pages/news.md b/_pages/news.md new file mode 100644 index 000000000000..0f197a9c74b1 --- /dev/null +++ b/_pages/news.md @@ -0,0 +1,5 @@ +--- +layout: news +title: news +permalink: /news/ +--- From dcafa5a3e03c1f72a002df7a8e0124b1b9d5297f Mon Sep 17 00:00:00 2001 From: Rohan Deb Sarkar Date: Sat, 7 Jan 2023 22:06:48 +0530 Subject: [PATCH 2/4] add url to all publications --- _includes/selected_papers.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/selected_papers.html b/_includes/selected_papers.html index 61457dbcf198..ff7df3b6b113 100644 --- a/_includes/selected_papers.html +++ b/_includes/selected_papers.html @@ -1,5 +1,5 @@
-

selected publications

+

selected publications

{% bibliography -f papers -q @*[selected=true]* %}
From d46ea326b03edc4c9ec3cde87848eea7e2610d71 Mon Sep 17 00:00:00 2001 From: Rohan Deb Sarkar Date: Sun, 8 Jan 2023 22:33:09 +0530 Subject: [PATCH 3/4] Reused `_includes/news.html` code --- _includes/news.html | 1 - _includes/selected_papers.html | 1 - _layouts/about.html | 28 ++++++++++++++++------------ _pages/news.md => news.html | 4 +++- 4 files changed, 19 insertions(+), 15 deletions(-) rename _pages/news.md => news.html (50%) diff --git a/_includes/news.html b/_includes/news.html index 071806f787be..14d286daa7f2 100644 --- a/_includes/news.html +++ b/_includes/news.html @@ -1,6 +1,5 @@
-

news

{% if site.news != blank -%} {%- assign news_size = site.news | size -%}
3 %}style="max-height: 10vw"{% endif %}> diff --git a/_includes/selected_papers.html b/_includes/selected_papers.html index ff7df3b6b113..cfaeb80386e3 100644 --- a/_includes/selected_papers.html +++ b/_includes/selected_papers.html @@ -1,5 +1,4 @@
-

selected publications

{% bibliography -f papers -q @*[selected=true]* %}
diff --git a/_layouts/about.html b/_layouts/about.html index b33c498ba7f1..ab6674a90083 100644 --- a/_layouts/about.html +++ b/_layouts/about.html @@ -40,26 +40,30 @@

{{ content }}

- {% if page.news -%} - {%- include news.html %} + {% if page.news -%} +

news

+ {%- include news.html %} {%- endif %} + + {% if page.selected_papers -%} - +

selected publications

{%- include selected_papers.html %} {%- endif %} - {%- if page.social %} + -