news

news

{% comment %}
*
*   Possible parameter for this loop:
*
*    › entries
*    › offset
*    › network
*
*   Example for network: {% include list-posts entries='3' network='facebook' %}
*
{% endcomment %}

{% assign network = include.network %}
{% assign tag = include.tag %}

<ul class="no-bullet">

  {% if network == NULL and tag == NULL %}
    {% if include.entries == NULL %}{% assign counter = 100 | plus: 0 %}{% else %}{% assign counter = include.entries | plus: 0 %}{% endif %}

    {% for news in site.data.news %}
      {% if counter > 0 %}
        <li><a href="{{ site.url }}{{ site.baseurl }}/{{ news.network | downcase }}/"><code>#{{ news.network }}</code></a> {% if news.date %}<code>{{ news.date }}</code>{% endif %} <a href="{{ news.url }}" target="_blank"> {{ news.title }}</a></li>
      {% endif %}
      {% assign counter=counter | minus:1 %}
    {% endfor %}

  {% elsif network %}
    {% if include.entries == NULL %}{% assign counter = 100 | plus: 0 %}{% else %}{% assign counter = include.entries | plus: 0 %}{% endif %}
    {% for news in site.data.news %}
      {% if network == news.network %}
        {% if counter > 0 %}
            <li> {% if news.date %}<code>{{ news.date }}</code>{% endif %} <a href="{{ news.url }}" target="_blank"> {{ news.title }}</a></li>
        {% endif %}
          {% assign counter=counter | minus:1 %}
      {% endif %}
    {% endfor %}
  {% endif %}
</ul>