Files
microblog.pub/templates/note.html
Fabio 1f2a8f6da7 add get_text template filter
returns object's `content` or `name`, the first is set, or an empty 
string.

some objects don't have `content`, don't let templates rely on it
2020-01-10 14:13:04 +01:00

28 lines
1.4 KiB
HTML

{% extends "layout.html" %}
{% import 'utils.html' as utils %}
{% block title %}{{ config.NAME }}{{ note.activity.object | get_text | html2plaintext | trim | truncate(50) }}"{% endblock %}
{% block header %}
<meta name="description" content="{{ note.activity.object | get_text | html2plaintext | trim | truncate(50) }}">
<meta content="article" property="og:type" />
<meta content="{{ note.activity.object.url }}" property="og:url" />
<meta content="{{ config.USERNAME }} microblog" property="og:site_name" />
<meta content="{{ config.USERNAME }}" property="og:title" />
<meta content="{{ note.activity.object | get_text | html2plaintext | trim | truncate(50) }}" property="og:description" />
<meta content="{{ me.icon.url }}" property="og:image" />
<meta content="200" property="og:image:width" />
<meta content="200" property="og:image:height" />
<meta content="summary" property="twitter:card" />
{% endblock %}
{% block content %}
<div id="container">
{% if request.path != "/admin/thread" %}
{% include "header.html" %}
{% endif %}
<main>
{{ utils.display_thread(thread, likes=likes, shares=shares) }}
</main>
</div>
{% endblock %}
{% block links %}<link rel="alternate" href="{{ note.activity.object.id}}" type="application/activity+json">{% endblock %}