Skip to content

Commit

Permalink
ula bu niye olmuyü
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaryob authored Sep 25, 2023
1 parent 239a546 commit f5b8eec
Showing 1 changed file with 30 additions and 44 deletions.
74 changes: 30 additions & 44 deletions _pages/arsiv.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,52 +6,38 @@ image: "archive-bg.jpg"
image_hash: "cc30914dbb849385dc6c0bf877626671"
---

<div class="card">
<div class="card-header bg-dark text-light">
<p class="card-title float-left">Archives</p>
<span class="fa fa-archive float-right"></span>
<div class="clearfix"></div>
</div>
<div class="card-body">
{% 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 %}
<div class ="archive-year">
<a href="{{ site.baseurl }}/pages/archives-y#{{ year.name }}">
{{ year.name }}</a>
</div>
<div class="col-lg-8 col-md-10 mx-auto">
<section id="archive">

<ul class="this">
{% 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 %}
<ul class="archive-month">
{% assign postsByMonth = year.items | group_by_exp:"post", "post.date | date: '%m'" %}
{% assign postsByMonthSorted = postsByMonth | sort: 'name' | reverse %}

{% for month in postsByMonthSorted %}
<li class="list-month">
{% for post in month.items limit:1 %}
<span class ="archive-month">
<a href="{{ site.baseurl }}/pages/archives-m#{{ post.date | date: '%Y-%m' }}">
{{ post.date | date: '%B %Y' }}
</a></span>
{% endfor %}
{% assign post_year = post.date | date: '%Y' %}
{% if post_year == cur_year %}
<h2><i class="fa fa-file-archive-o"></i>&nbsp;Bu yılın arşivi</h2>
{% else %}
{% if post_year != last_p_year %}
</ul>
<ul class="past-{{post_year}}">
<h2>{{ post.date | date: '%Y' }}</h2>
{% assign last_p_year = post.date | date: '%Y' %}

{% if pg_month == month.name %}
<ul class="archive-item">
{% for post in month.items %}
<li class="list-content">
<a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
</div>
</div>
{% 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" %}
<li class="arch-list"> {{ dd }} {{ mm }} {{ yy }} &raquo; <a href="{{site.baseurl}}{{ post.url }}">{{ post.title }}</a> </li>
{% endfor %}
</ul>
</section>
</div>

0 comments on commit f5b8eec

Please sign in to comment.