Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
</div>
</div>
</section>
+
+ {% if posts %}
+ <section>
+ <div class="container">
+ <div class="row justify-content-center">
+ <div class="col-12 col-lg-10">
+ <h3>{{ _("Related News from the IPFire Blog") }}</h3>
+
+ <div class="card my-3">
+ <div class="card-body">
+ {% module BlogPosts(posts) %}
+ </div>
+ </div>
+
+ <a class="btn btn-primary btn-lg btn-block" href="https://blog.ipfire.org/tag/location">
+ {{ _("Read More") }}
+ </a>
+ </div>
+ </div>
+ </div>
+ </section>
+ {% end %}
{% end block %}
class IndexHandler(auth.CacheMixin, base.BaseHandler):
def get(self):
- self.render("location/index.html", address=self.current_address)
+ posts = self.backend.blog.get_by_tag("location", limit=1)
+
+ self.render("location/index.html",
+ address=self.current_address, posts=posts,
+ )
class LookupHandler(base.BaseHandler):