From f5b8eec01b11db59254f93a84f9a4e8228f29f53 Mon Sep 17 00:00:00 2001 From: Suleyman Poyraz <22801690+Zaryob@users.noreply.github.com> Date: Mon, 25 Sep 2023 15:14:38 +0300 Subject: [PATCH] =?UTF-8?q?ula=20bu=20niye=20olmuy=C3=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _pages/arsiv.md | 74 ++++++++++++++++++++----------------------------- 1 file changed, 30 insertions(+), 44 deletions(-) diff --git a/_pages/arsiv.md b/_pages/arsiv.md index 6607555..95b2570 100644 --- a/_pages/arsiv.md +++ b/_pages/arsiv.md @@ -6,52 +6,38 @@ image: "archive-bg.jpg" image_hash: "cc30914dbb849385dc6c0bf877626671" --- -
-
-

Archives

- -
-
-
- {% assign pg_year = page.date | date: '%Y' %} - {% assign pg_month = page.date | date: '%m' %} - - {% assign postsByYear = site.posts | group_by_exp:"post", "post.date | date: '%Y'" %} - {% for year in postsByYear %} - +
+
+ +
    +{% assign cur_year = site.date | date: '%Y' %} +{% assign last_p_year = site.date | date: '%Y' %} +{% for post in site.posts %} + {% unless post.next %} - {% if pg_year == year.name %} -
      - {% assign postsByMonth = year.items | group_by_exp:"post", "post.date | date: '%m'" %} - {% assign postsByMonthSorted = postsByMonth | sort: 'name' | reverse %} - {% for month in postsByMonthSorted %} -
    • - {% for post in month.items limit:1 %} - - - {{ post.date | date: '%B %Y' }} - - {% endfor %} + {% assign post_year = post.date | date: '%Y' %} + {% if post_year == cur_year %} +

       Bu yılın arşivi

      + {% else %} + {% if post_year != last_p_year %} +
    +
      +

      {{ post.date | date: '%Y' }}

      + {% assign last_p_year = post.date | date: '%Y' %} - {% if pg_month == month.name %} - - {% endif %} - - {% endfor %} -
    - {% endif %} - {% endfor %} -
-
+ {% endif %} + {% endif %} + {% endunless %} + {% assign months = "Ocak|Şubat|Mart|Nisan|Mayıs|Haziran|Temmuz|Ağustos|Eylül|Ekim|Kasım|Aralık" | split: "|" %} + {% assign m = post.date | date: "%-m" | minus: 1 %} + {% assign dd = post.date | date: "%d" %} + {% assign mm = months[m] %} + {% assign yy = post.date | date: "%Y" %} +
  • {{ dd }} {{ mm }} {{ yy }} » {{ post.title }}
  • +{% endfor %} + + +
    \ No newline at end of file