layout: page
title: Categories tagline: Check posts by category
sort: date permalink: /pages/private/blog/navigator/archive/categoryview/
skip_words: [ posts, public, private, premium ] noindex: true
resource_options:
- masthead: opacity: 0.5 slides: - url: /assets/images/master_header/chuttersnap-1280x800.png alt: chuttersnap-1200x800
regenerate: false
{% comment %} Debugging|Helpers ——————————————————————————– {% endcomment %} {% comment %} site_category_word_list: {{ site_category_word_list | debug }} {% endcomment %}
{% comment %} Liquid procedures ——————————————————————————– {% endcomment %} {% capture get_page_path %}themes/{{site.template.name}}/procedures/global/get_page_path.proc{% endcapture %} {% capture select_icon_size %}themes/{{site.template.name}}/procedures/global/select_icon_size.proc{% endcapture %} {% capture get_category_item %}themes/{{site.template.name}}/procedures/global/get_category_item.proc{% endcapture %} {% capture create_word_cloud %}themes/{{site.template.name}}/procedures/global/create_word_cloud.proc{% endcapture %}
{% comment %} Variables ——————————————————————————– {% endcomment %} {% assign view_config = site.data.builder.blog_navigator.category_view %} {% assign view_description = view_config.description %}
{% if site.permalink == 'none' %}
{% capture browser_page_url %}{{ page.url }}.html{% endcapture %}
{% else %}
{% capture browser_page_url %}{{ page.url }}{% endcapture %}
{% endif %}
{% include {{get_page_path}} mode='absolute' %} {% assign navigator_path = page_path | remove_first:'archive' %}
{% capture navigator %}{{navigator_path}}{% endcapture %} {% capture date_view %}{{page_path}}/dateview/{% endcapture %} {% capture category_view %}{{page_path}}/categoryview/{% endcapture %} {% capture tag_view %}{{page_path}}/tagview/{% endcapture %} {% capture all_view %}{{page_path}}/{% endcapture %}
{% if page.sort == 'title' %}
{% assign sorted_posts = site.posts | sort: 'title' %}
{% elsif page.sort == 'date' %}
{% assign sorted_posts = site.posts | sort: 'date' %}
{% else %}
{% assign sorted_posts = site.posts | sort: 'date' %}
{% endif %}
{% comment %} TODO: skip_words configured by yaml data file? ——————————————————————————– {% endcomment %} {% capture site_category_word_list %}{% for tag in site.categories %}{{ tag | first }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %} {% assign categories = site_category_word_list | split:',' %}
{% for category in categories %}
{% if page.skip_words contains category %} {% continue %} {% endif %} {% capture category_list %}{{ category_list | append: category }}{% unless forloop.last %},{% endunless %}{% endcapture %}
{% endfor %}
{% comment %} Main ——————————————————————————– {% endcomment %} <!– [INFO ] [ {{page.url}} ] [Generate HTML}] –> {% include {{create_word_cloud}} word_list=category_list source=“categories” skip_words=skip_words %}
<div class=“paginator ml-3”>
<ul class="pagination raised-z0"> <li class="page-item"><a class="page-link" href="{{navigator | prepend: site.baseurl}}" title="Blog View">Navigator</a></li> <li class="page-item"><a class="page-link" href="{{date_view | prepend: site.baseurl}}" title="View by Date">By Date</a></li> <li class="page-item"><a class="page-link" href="{{tag_view | prepend: site.baseurl}}" title="View by Tag">By Tag</a></li> <li class="page-item"><a class="page-link" href="{{all_view | prepend: site.baseurl}}" title="View All">All Posts</a></li> </ul>
</div>
<div class=“post-search-results col-md-10 col-sm-10 col-xs-11”>
<div class="view-description">{{view_description}}</div> <div class="post-headline"> <h2 id="post-headline" class="mt-5">Categories</h2></div> {% assign tags = site.categories | sort %} {% for tag in tags %} {% assign category = tag|first %} {% unless category_list contains category %} {% continue %} {% endunless %} <!-- h2 id="{{tag|first}}" class="toc-link mt-5 mb-4"><i class="fa fa-thumbtack mr-3"></i>{{tag|first|capitalize}} <i class="badge ml-1">{{tag|last|size}}</i></h2 --> <h3 id="{{tag|first}}" class="toc-link mt-5 mb-4"><i class="fa fa-thumbtack mr-3"></i>{{tag|first|capitalize}}</h3> {% for post in sorted_posts %} {%if post.categories contains tag[0]%} {% assign category = tag | first %} {% include {{get_category_item}} category=category %} {% include {{select_icon_size}} family=icon_family size=icon_size %} {% assign icon_size = size %} {% assign excerpt = post.excerpt | truncatewords: 50 | strip_html | strip_newlines | strip %} <div class="card card-flat mb-4"> <div class="card-body"> <!-- <span class="post-meta">{{post.date|date: "%B %d, %Y"}}</span> --> <h4 id="{{ 100000 | rand }}" class="card-title">{{ post.title }}</h4> <h5 class="notoc card-subtitle text-muted mb-2">{{ post.tagline }}</h5> <div class="card-text"><p>{{ excerpt }}</p></div> </div> <div class="card-footer"> <!-- <a class="card-link" href="{{post.url}}#readmore" target="_blank">Read more ..</a> --> <a class="btn btn-primary btn-raised btn-flex" href="{{post.url}}#readmore"> <i class="fa fa-eye fa-lg" style="color:#FFFFFF;"></i> Read more </a> </div> </div> {% endif %} {% endfor %} {% endfor %}
</div>
<!– [INFO ] [j1.page.{{page.title}} ] [Save the current page to cookieUserState cookie: {{ browser_page_url }}] –> {% comment %} Update cookie for lastpage ——————————————————————————– {% endcomment %} <script type=“text/javascript”>
function setLastPage() { var logger = log4javascript.getLogger('j1.BlogNavigator'); var user_state_last_page = "{{browser_page_url}}"; j1.setUserStateCookie( {last_page:user_state_last_page} ); logger.info('Saved current Post Browser page to cookie: {{browser_page_url}}'); } window.onload = setLastPage;
</script>