repos

blog.bythewood.me-wagtail

mirror archived upstream

Self-hostable blog for developers built on Wagtail and Django, with webpack, Bootstrap, and CodeMirror.

blogbootstrapdjangodockerhandcodedpythonself-hostedwagtailwebpack

1.4 KB · 32 lines · HTML Raw History
 1{% load wagtailcore_tags wagtailimages_tags wagtailroutablepage_tags %}
 2
 3<div class="card rounded-0 border-0 border-bottom h-100">
 4  <div class="mb-3">
 5    {% for tag in blog_post.tags.all %}
 6      <a href="{% routablepageurl blog_post.get_parent.specific 'tag' tag.slug %}" class="btn btn-light btn-sm rounded-pill fw-bold py-0">
 7        {{ tag.name|title }}
 8      </a>
 9    {% endfor %}
10  </div>
11  {% if blog_post.cover_image %}
12  <a href="{% pageurl blog_post %}">
13    {% image blog_post.cover_image fill-640x480 format-webp class="card-img-top rounded img-fluid" %}
14  </a>
15  {% endif %}
16  <div class="card-body d-flex flex-column">
17    <a href="{% pageurl blog_post %}" class="text-decoration-none text-dark">
18      <div class="h5 card-title">{{ blog_post.title }}</div>
19    </a>
20    <div class="card-text text-muted flex-grow-1">{{ blog_post.search_description }}</div>
21    <div class="row g-0 mt-3">
22      <div class="col-12 col-xl-8 d-flex align-items-center">
23        <img class="rounded-circle me-3" src="{{ self.owner.wagtail_userprofile.avatar.url }}" alt="{{ self.owner.first_name }} {{ self.owner.last_name }}" width="25" height="25">
24        <strong class="me-2">{{ blog_post.owner.first_name }} {{ blog_post.owner.last_name }}</strong>
25      </div>
26      <div class="col-12 col-xl-4 d-flex justify-content-start justify-content-xl-end text-muted">
27        {{ blog_post.first_published_at|date:"F d, Y" }}
28      </div>
29    </div>
30  </div>
31</div>