{% extends "layouts/reader.njk" %} {% block reader %}
{{ icon("previous") }} Fediverse
{# Actor profile card #}
{% if actor.photo %} {% endif %}

{{ actor.name }}

{% if actor.handle %} @{{ actor.handle }} {% endif %} {% if actor.summary %}

{{ actor.summary }}

{% endif %}
{% if actor.followersCount %} {{ actor.followersCount }} followers {% endif %} {% if actor.followingCount %} {{ actor.followingCount }} following {% endif %}
{{ icon("syndicate") }} View profile {% if canFollow %} {% if isFollowing %}
{% else %}
{% endif %} {% endif %}
{% if error %}
{{ icon("warning") }}

{{ error }}

{% elif items.length > 0 %}
{% for item in items %}
{# Author #} {% if item.author %}
{% if item.author.photo %} {% endif %}
{{ item.author.name or "Unknown" }} {% if item.author.url %} {{ item.author.url | replace("https://", "") | replace("http://", "") }} {% endif %}
{% endif %} {# Reply context #} {% if item["in-reply-to"] and item["in-reply-to"].length > 0 %}
{{ icon("reply") }} Reply to {{ item["in-reply-to"][0] | replace("https://", "") | replace("http://", "") | truncate(50) }}
{% endif %} {# Title #} {% if item.name %}

{{ item.name }}

{% endif %} {# Content #} {% if item.content %}
{% if item.content.html %} {{ item.content.html | safe | striptags | truncate(400) }} {% elif item.content.text %} {{ item.content.text | truncate(400) }} {% endif %}
{% endif %} {# Tags #} {% if item.category and item.category.length > 0 %}
{% for cat in item.category %} {% if loop.index0 < 5 %} #{{ cat }} {% endif %} {% endfor %}
{% endif %} {# Photos #} {% if item.photo and item.photo.length > 0 %} {% set photoCount = item.photo.length if item.photo.length <= 4 else 4 %}
{% for photo in item.photo %} {% if loop.index0 < 4 %} {% endif %} {% endfor %}
{% endif %} {# Footer #}
{% if item.published %} {% endif %}
{# Actions #}
{% endfor %}
{% else %}
{{ icon("syndicate") }}

No posts found for this actor.

{% endif %}
{% endblock %}