Sha256: e4be810cd98edfb0b14f0a6d1127cbbd84165a52ceec51d488a48b6ec4e14972

Contents?: true

Size: 1.6 KB

Versions: 2

Compression:

Stored size: 1.6 KB

Contents

<ul class="grid">
  {% for post in include.posts %}
    <li class="card-tab {{ post.color }}">
      <div class="top-bar">
        {{ post.date | date: site.acn.date_format }}
      </div>
      {% if post.icon %}
       <div class="tab"><span class="material-icons">{{ post.icon }}</span></div>
      {% else %}
        {% assign words = post.content | strip_html | strip_newlines | strip | split: " " %}
        <div class="tab">{{ words.size }}<small>words</small></div>
      {% endif %}
      <div class="header">
        {% include writer.html info=post %}
        {% if writer_url %}
          <a href="{{ writer_url }}">{{ writer }}</a>
        {% else %}
          {{ writer }}
        {% endif %}
      </div>
      <div class="body">
        {% if post.image %}
          <img src="/assets/loading.svg" data="{{ post.thumb | default: post.image }}" alt="{{ post.title }}" />
        {% endif %}
        <h3><a href="{{ post.url }}">{{ post.title }}</a></h3>
        {{ post.excerpt }}
      </div>
      <div class="control">
        <a href="{{ post.url }}">
          <span class="middle-align material-icons">article</span>
        </a>
        {% if post.tags %}
          <div class="tags">
          {% for tag in post.tags %}
            <small><a href="/hashtags/{{ tag }}">{{ tag }}</a></small>
          {% endfor %}
          </div>
        {% endif %}
      </div>
    </li>
  {% endfor %}
</ul>

<script defer>
  const samps = document.querySelectorAll('img');
  samps.forEach( el => {
    if (el.src.match(/loading\.svg$/) && el.attributes.data) {
      el.src = el.attributes.data.value;
    }
  } );
</script>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
askclass-news-theme-0.6.0 _includes/grid.html
askclass-news-theme-0.5.0 _includes/grid.html