Skip to content

Latest commit

 

History

History
66 lines (62 loc) · 2.29 KB

post_list.md

File metadata and controls

66 lines (62 loc) · 2.29 KB
layout
default

רשימת הפוסטים

<script src="//cdnjs.cloudflare.com/ajax/libs/list.js/1.5.0/list.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
חיפוש לפי כותרת
סינון לפי קטגוריה הכל {% for category in site.categories %} {{category.name}} {% endfor %}
מיון על פי שם מיון על פי תאריך
    {%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%} {%- for post in site.posts -%}
  • {{ post.date | date: date_format }}

    {% for category in post.categories %} {{category.name}}{% if forloop.last == false %}, {% endif %} {% endfor %}
    {% for category in post.categories %}{{category.name}}{% if forloop.last == false %}, {% endif %}{% endfor %}
  • {% endfor %}
<script type="text/javascript"> $(document).ready(function(){ var options = { valueNames: [ 'name', 'date', { name: 'timestamp', attr: 'data-timestamp' }, 'category'] }; var postList = new List('post-list', options); $('#category-filter-list').change(function() { postList.filter(function(item) { var item_categories = item.values().category.split(", ") if ($('#category-filter-list').val() == "הכל" || item_categories.indexOf($('#category-filter-list').val()) != -1) { return true; } else { return false; } }); return false; }); var url_string = window.location.href; var url = new URL(url_string); var c = url.searchParams.get("s"); $('#header-search').val(c); postList.search(c); }); </script>