Sha256: c95ce51f5e124d0c72e087057a2f15e79504a0ae5d135b0372a9999c84c6ffa9

Contents?: true

Size: 1.67 KB

Versions: 3

Compression:

Stored size: 1.67 KB

Contents

{% assign posts = site.posts %}
{% if paginator %}
  {% assign posts = paginator.posts %}
{% endif %}
{% for post in posts %}
  <article class="post-card">
    {% if post.cover %}
      <a class="post-card-image-link" href="{{ post.url | relative_url }}">
        <div class="post-card-image" style="background-image: url({{  post.cover | relative_url }})"></div>
      </a>
    {% endif %}
    <div class="post-card-content {% unless post.cover %}no-cover{% endunless %}">
      <a class="post-card-content-link" href="{{ post.url | relative_url }}">
        <header class="post-card-header">
          {% if post.categories.size > 0 %}
            {% for category in post.categories %}
              {% if forloop.index == post.categories.size %}
                <span class="post-card-categories">{{ category }}</span>
              {% else %}
                <span class="post-card-categories">{{ category }} / </span>
              {% endif %}
            {% endfor %}
          {% endif %}

          <h2 class="post-card-title">{{ post.title }}</h2>
        </header>
        <section class="post-card-excerpt">
          {% if post.description %}
            <p>{{ post.description | truncate: 128 }}</p>
          {% elsif post.excerpt %}
            <p>{{ post.excerpt | strip_html | truncate: 128 }}</p>
          {% else %}
            <p>{{ post.content | strip_html | truncate: 128 }}</p>
          {% endif %}
        </section>
      </a>
      <footer class="post-card-meta">
        <time datetime="{{ post.date | date_to_xmlschema }}">
          <i class="fa-solid fa-calendar-days"></i> {{ post.date | date_to_string }}
        </time>
      </footer>
    </div>
  </article>
{% endfor %}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
jekyll-theme-quartz-0.1.2 _includes/post-cards.html
jekyll-theme-quartz-0.1.1 _includes/post-cards.html
jekyll-theme-quartz-0.1.0 _includes/post-cards.html