Skip to content
Snippets Groups Projects
overview.html 4.28 KiB
<div class="overview">
  {% assign cat = site.data.sort[include.ln] %}{% assign cat_size = cat | size %}
  {% capture price_fairo %}{{ site.data.price-sources['fairo'].price['FAIRO'] }}{% endcapture %}
  {% if cat_size == 0 %}
  <h2>No Categories found</h2>
  {% else %}

  <div class="tags">
    <ul>
  {% for c in cat %}

  {% capture ID %}{{ site.data.categories[c].ID }}{% endcapture %}
      <li class="li-tags li-tag-{{ID}}" title="{{ ID }}" onclick="getByTag(['{{ID}}'])">{{ site.data.categories[c].title[include.ln] }} [{{ site.tags[ID] | size }}]</li>
      {% for tag in site.data.categories[c].Tags %}
         <tags class="li-subtags li-subtag-of-{{ID}} d-none li-tag-{{tag[0]}}" title="{{ tag[0] }}" onclick="getByTag(['{{ID}}', '{{tag[0]}}'])"><span class="feather-icon icon-tag"></span>{{ tag[1] | map: include.ln }}</tags>
      {% endfor %}
  {% endfor %}
    </ul>
  </div>
  {% endif %}

  {% for o in site.posts %}
  <div class="orders">
    <div class="orderlist-div{% for tag in o.tags %} tag-{{ tag }}{% endfor %}">

      <div class="orderlist-date">
        <div class="image">{% if o.image-profile == 'img' %}<img src="{{ o.image }}">
          {% elsif o.image-profile == 'imgbb' %}
            {% assign P = o.image | src_extract | imagesize %}{% assign Ps = P | size %}
            {% if Ps == 2 %}
              {% assign px = P[0] | times: P[1] %}
              {% if px < site.px_max %}
                {{ o.image }}
              {% else %}
                image too large! (max: {{ site.px_max | decimals | divided_by: 1000000 | decimals }}Mpx )
              {% endif %}
            {% else %}
              image not found!
            {% endif %}
          {% endif %}
        </div>
      </div>

      <div class="orderlist-title">
        <a href="{{ o.git-repo }}/blob/master/{{ o.order-title }}" target="git-order"><u>{{ o.headline | truncate: 32 }}</u></a> <a href="{{ o.git-profile }}" target="git-profile"><span class="feather-icon icon-user"></span></a> <a href="{{ o.git-repo }}/issues/new?issue[title]={{ o.order-title }}" target="git-contact"><span class="feather-icon icon-mail"></span></a><br>
        <small><lang><span class="feather-icon icon-tag"></span>{{ o.language-code }}</lang> <a href="https://www.latlong.net/c/?lat={{ o.latitude }}&long={{ o.longitude }}" target="latlong" title="latitude:{{ o.latitude }} | longitude: {{ o.longitude }}"><span class="d-none distance-data">{{ o.latitude }},{{ o.longitude }},{{ o.country-code }}</span> <span class="distance"></span></a> <used><span class="feather-icon icon-tag"></span>{{ o.condition }}</used>
          {% for tag in o.tags %}
            <tags class="li-tags li-tag-{{ tag }} clickable" title="{{ tag }}" onclick="getByTag( ['{{ o.tags[0] }}', '{{ tag }}'] )"><span class="feather-icon icon-tag"></span>
              {% if forloop.index == 1 %}
                {{ site.data.categories | map: o.tags[0] | map: "title" | map: include.ln }}
              {% else %}
                {% capture Tag %}{{ site.data.categories | map: o.tags[0] | map: "Tags" | map: tag | map: include.ln }}{% endcapture %}
                {% if Tag == '' %}<custom>{{ tag }}</custom>{% else %}{{ Tag }}{% endif %}
              {% endif %}
            </tags>
          {% endfor %}</small><br>
        <div><small>{{ o.description }}</small></div>
      </div>
      {% capture priceref %}{{ o.price-reference[0] | join: '-' }}{% endcapture %}
      {% capture price_ex %}{{ site.data.price-sources[priceref].price | plus: 0.00001 | round: 4 }}{% endcapture %}
      {% capture price %}{% if price_ex != "" %}{{price_ex}}{% else %}{{ o.price-source }}{% endif %}{% endcapture %}
      <div class="orderlist-price"><font class="faircoin-price">{{ o.price-per-unit | divided_by: price | round:1 | decimals }} FAIR</font><br>{% if o.min-size > 0 %}{{ o.min-size }}..{% endif %}{{ o.max-size }} {{ o.unit }}<br>( {{ o.price-per-unit | decimals }} {{ site.data.price-sources[priceref].currency }} / {{ o.unit }} )<br>( {{ price }} {{ site.data.price-sources[priceref].currency }} / FAIR )<br><i>{% if price_ex != "" %}<a href="{{ site.data.price-sources[o.price-source].www }}">{{ o.price-source | replace: '-','/' }}</a>{% else %}fixed price{% endif %}</i>

      </div>
    </div>
  </div>
  {% endfor %}
</div>
<script>
$( document ).ready(function() {
    getDistancesTags();
});
</script>