<style>
.snippet_{{ post.id | slugify: "ascii" }}::after { background-image: radial-gradient(ellipse closest-side, var(--c-snippetBackgroundExternal), var(--c-snippetBackgroundInternal)), url( {% if post.image_dir == "default" %} {% assign url = post.path | split: "." | first | split: "/" | last %} {{ site.url }}/assets/posts/{{ url }}/background_image.png {% else if post.image_dir != nil %} {{ site.url }}/{{ post.image_dir }} {% endif %} ); } </style>
<a class=“snippet__link” href=“{{ post.url }}”>
<section class="snippet__data"> <section class="snippet__data__metadata"> <section class="snippet__data__metadata__category"> {% for category in post.category %} <p class="snippet__data__metadata__category__title" style="background: {{ site.category | where: "category", category | map: "hue"}}">{{ site.category | where: "category", category | map: "title"}}</p> {% else %} <p class="snippet__data__metadata__category__title">No category</p> {% endfor %} </section> <p class="snippet__data__metadata__date">{{ post.date | date: '%B %d, %Y' }}</p> </section> <h2 class="snippet__data__header">{{post.title }}</h2> <p class="snippet__data__text">{{ post.excerpt | strip_html }}</p> {% if post.author != nil %} <div class="snippet__data__author"> {% assign author = site.authors | where: "nick", post.author | first %} <img src="{{ site.url }}/{{ author.photo_dir }}"/> <p>{{ author.full_name }}</p> </div> {% endif %} </section>
</a>