web/_includes/panel.html

66 lines
1.9 KiB
HTML
Raw Normal View History

2019-09-30 15:38:41 +03:00
<!--
The Pannel on right side (Desktop views)
© 2017-2019 Cotes Chung
MIT License
-->
<div id="panel-wrapper" class="col-xl-3 pl-2 topbar-down">
2019-09-30 15:38:41 +03:00
<div class="access">
2019-09-30 15:38:41 +03:00
{% assign lastmod_list = "" | split: "" %}
2019-10-24 21:40:42 +03:00
{% assign index = 0 %}
2019-09-30 15:38:41 +03:00
{% for post in site.posts %}
2019-10-24 21:40:42 +03:00
{% 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 %}
2019-09-30 15:38:41 +03:00
{% endfor %}
{% if lastmod_list.size > 0 %}
2019-12-22 19:55:51 +03:00
<div id="access-lastmod" class="post mb-4">
2019-10-29 12:05:28 +03:00
<h3 data-toc-skip>
{{- site.data.label.panel.lastmod -}}
</h3>
<ul class="post-content pl-0 pb-1 ml-1 mt-2">
2019-09-30 15:38:41 +03:00
{% assign MAX_SIZE = 5 %}
{% assign sum = 0 %}
2019-10-24 21:40:42 +03:00
{% assign lastmod_list = lastmod_list | sort | reverse %}
{% for item in lastmod_list %}
{% assign index = item | split: "::" | last | plus: 0 %}
{% assign post = site.posts[index] %}
2019-10-29 12:05:28 +03:00
<li><a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a></li>
2019-09-30 15:38:41 +03:00
{% assign sum = sum | plus: 1 %}
{% if sum >= MAX_SIZE %}
{% break %}
{% endif %}
{% endfor %}
2019-10-29 12:05:28 +03:00
</ul>
</div><!-- #access-lastmod -->
2019-09-30 15:38:41 +03:00
{% endif %}
2019-10-29 12:05:28 +03:00
<div id="access-tags">
<h3 data-toc-skip>
{{- site.data.label.panel.trending_tags -}}
</h3>
<div class="d-flex flex-wrap mt-3 mb-1 mr-3">
{% include trending-tags.html %}
</div>
</div>
2019-09-30 15:38:41 +03:00
2019-10-29 12:05:28 +03:00
</div> <!-- .access -->
{% if page.layout == 'post' and site.toc and page.toc %}
<div id="toc-wrapper" class="pl-0 pr-4 mb-5">
<h3 data-toc-skip class="pl-3 pt-2">
{{- site.data.label.panel.toc -}}
</h3>
<nav id="toc" data-toggle="toc"></nav>
</div>
2019-10-29 12:05:28 +03:00
{% endif %}
</div> <!-- #panel-wrapper -->