beeware.github.io/templates/blog-post.html
luna 1bc47bec7b Updated all links to twitter to the mastodon equivilent if one is available for all news and blog posts.
Updated all of the Beeware core team links to include their Mastodon link as well as updated how links were displayed so that it would only display the icon if a link was also provided.

Changed discord icon from the comment icon to the actual discord icon
2023-04-06 06:22:19 -05:00

50 lines
1.8 KiB
HTML

{% extends "layout.html" %}
{% from "macros/blog.html" import render_blog_post %}
{% from "macros/breadcrumbs.html" import breadcrumbs %}
{% from "macros/translation.html" import transbag %}
{% set t_on = transbag('translate', this.alt, 'on') %}
{% set t_posted_by = transbag('translate', this.alt, 'posted_by') %}
{% set t_next_entry = transbag('translate', this.alt, 'next_entry') %}
{% set t_previous_entry = transbag('translate', this.alt, 'previous_entry') %}
{% block title %}{{ this.title }}{% endblock %}
{% block preamble %}
<div class="banner">
<div class="container">
<p>{{ breadcrumbs(this) }}</p>
<h1>{{ this.title }}</h1>
<p>{{ t_posted_by }}
{% if this.mastodon_handle %}
<a href="https://mastodon.social/{{ this.mastodon_handle }}">{{ this.author or this.mastodon_handle }}</a>
{% elif this.twitter_handle %}
<a href="https://twitter.com/{{ this.twitter_handle }}">{{ this.author or this.twitter_handle }}</a>
{% else %}
{{ this.author }}
{% endif %}
{{ t_on }} {{ this.pub_date.strftime('%Y/%m/%d')}}
</p>
</div>
</div>
{% endblock %}
{% block body %}
<div class="row-fluid">
<div class="col-sm-12 col-md-10 col-lg-8" >
{{ render_blog_post(this) }}
</div>
<div class="hidden-sm-down col-md-2 col-lg-4"></div>
<div class="col-sm-12 col-md-4 gutter">
<dl>
{% if this.has_prev() %}
<dt>{{ t_next_entry }}</dt>
<dd><a href="{{ this.get_siblings().prev_page|url(alt=this.alt) }}">{{ this.get_siblings().prev_page.title }}</a></dd>
{% endif %}
{% if this.has_next() %}
<dt>{{ t_previous_entry }}</dt>
<dd><a href="{{ this.get_siblings().next_page|url(alt=this.alt) }}">{{ this.get_siblings().next_page.title }}</a></dd>
{% endif %}
</dl>
</div></div>
{% endblock %}