From 3b102ee4c6d3bfb4071b2d21a6ea56474fdca702 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Fri, 25 Oct 2019 02:40:42 +0800 Subject: [PATCH] Improved the Recent-Update list. --- _includes/panel.html | 27 ++++++++++++++------------- assets/css/_src/main.scss | 12 ------------ 2 files changed, 14 insertions(+), 25 deletions(-) diff --git a/_includes/panel.html b/_includes/panel.html index 2550816..6d6ccf1 100644 --- a/_includes/panel.html +++ b/_includes/panel.html @@ -7,15 +7,16 @@
{% assign lastmod_list = "" | split: "" %} + {% assign index = 0 %} {% for post in site.posts %} - {% if post.date >= post.seo.date_modified or post.seo.date_modified == nil %} - {% continue %} - {% endif%} - {% capture item %} - {{ post.seo.date_modified }}::{{ post.title }}::{{ post.url }} - {% endcapture %} - {% assign lastmod_list = lastmod_list | push: item %} + {% if post.seo.date_modified > post.date and post.seo.date_modified != nil %} + {% capture item %} + {{ post.seo.date_modified }}::{{ index }} + {% endcapture %} + {% assign lastmod_list = lastmod_list | push: item %} + {% endif %} + {% assign index = index | plus: 1 %} {% endfor %} {% if lastmod_list.size > 0 %} @@ -23,13 +24,14 @@

{{ site.data.label.panel.lastmod }}

-