web/_includes/panel.html
2020-06-05 06:14:40 +08:00

76 lines
1.9 KiB
HTML

<!--
The Pannel on right side (Desktop views)
v2.0
https://github.com/cotes2020/jekyll-theme-chirpy
© 2017-2019 Cotes Chung
MIT License
-->
<div id="panel-wrapper" class="col-xl-3 pl-2 text-muted topbar-down">
<div class="access">
{% if site.data.updates %}
{% include update-list.html %}
{% if update_list.size > 0 %}
<div id="access-lastmod" class="post">
<h3 data-toc-skip>
{{- site.data.label.panel.lastmod -}}
</h3>
<ul class="post-content pl-0 pb-1 ml-1 mt-2">
{% for item in update_list %}
{% assign post_url = item | split: "::" | last | prepend: "/posts/" | append: "/" %}
{% assign post = site.posts | where: "url", post_url | first %}
{% if post %}
{% assign url = post.url | relative_url %}
<li><a href="{{ url }}">{{ post.title }}</a></li>
{% assign sum = sum | plus: 1 %}
{% if sum >= MAX_SIZE %} {% break %} {% endif %}
{% endif %}
{% endfor %}
</ul>
</div><!-- #access-lastmod -->
{% endif %}
{% endif %} <!-- site.data.updates -->
{% include trending-tags.html %}
{% if trending_tags.size > 0 %}
<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">
{% for tag in trending_tags %}
{% capture url %}/tags/{{ tag | downcase | url_encode }}/{% endcapture %}
<a class="post-tag" href="{{ url | relative_url }}">{{ tag | replace: '-', ' ' }}</a>
{% endfor %}
</div>
</div>
{% endif %}
</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 mb-3">
{{- site.data.label.panel.toc -}}
</h3>
<nav id="toc" data-toggle="toc"></nav>
</div>
{% endif %}
</div> <!-- #panel-wrapper -->