mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-22 05:04:27 +00:00
80 lines
3.5 KiB
HTML
80 lines
3.5 KiB
HTML
{% extends "layout.html" %}
|
|
{% import 'utils.html' as utils %}
|
|
{% block header %}
|
|
<link rel="self" href="{{ config.ID }}/">
|
|
<link rel="hub" href="https://pubsubhubbub.superfeedr.com/">
|
|
<meta content="profile" property="og:type" />
|
|
<meta content="{{ config.ID }}" property="og:url" />
|
|
<meta content="{{ config.USERNAME }}" property="og:site_name" />
|
|
<meta content="{{ config.USERNAME }}" property="og:title" />
|
|
<meta content="{{ me.summary | html2plaintext | trim }}" 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" />
|
|
<meta content="{{config.USERNAME}}@{{ config.DOMAIN}}" property="profile:username" />
|
|
{% endblock %}
|
|
{% block content %}
|
|
<div class="h-feed" id="container">
|
|
<data class="p-name" value="{{config.USERNAME}} notes"></data>
|
|
|
|
{% include "header.html" %}
|
|
|
|
<main id="notes">
|
|
{% for item in pinned %}
|
|
{% if item.meta.pinned %}
|
|
<p style="margin-left:65px;padding-bottom:5px;">
|
|
<span class="bar-item-pinned">pinned</span>
|
|
</p>
|
|
{% endif %}
|
|
|
|
{{ utils.display_note(item.activity.object, meta=item.meta, no_color=True) }}
|
|
{% endfor %}
|
|
|
|
{% for item in outbox_data %}
|
|
|
|
{% if item | has_type('Announce') %}
|
|
{% if "actor" in item.meta %}
|
|
{% set boost_actor = item.meta.actor %}
|
|
{% if session.logged_in %}
|
|
<div style="margin-left:65px;padding-bottom:5px;margin-bottom:15px;display:inline-block">
|
|
<form action="/api/undo" class="action-form" method="POST">
|
|
<input type="hidden" name="redirect" value="/"/>
|
|
<input type="hidden" name="id" value="{{ item.remote_id }}"/>
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
|
<button type="submit" class="bar-item">unboost</button>
|
|
</form>
|
|
{{ utils.display_actor_box(boost_actor, after="boosted") }}
|
|
{{ utils.display_in_reply_to(item.meta, item.activity.object) }}
|
|
</div>
|
|
{% else %}
|
|
<p style="margin-left:65px;padding-bottom:5px;display:inline-block;">
|
|
{{ utils.display_actor_box(boost_actor, after="boosted") }}
|
|
{{ utils.display_in_reply_to(item.meta, item.activity.object) }}
|
|
</p>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% if item.meta.object %}
|
|
{{ utils.display_note(item.meta.object, meta=item.meta) }}
|
|
{% endif %}
|
|
{% elif item | has_type('Create') %}
|
|
{% if item.activity.object.inReplyTo %}
|
|
<p style="margin-left:65px;padding-bottom:5px;display:inline-block;">
|
|
{{ utils.display_in_reply_to(item.meta, item.activity.object) }}
|
|
</p>
|
|
{% endif %}
|
|
{{ utils.display_note(item.activity.object, meta=item.meta, no_color=True) }}
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{{ utils.display_pagination(older_than, newer_than) }}
|
|
</main>
|
|
|
|
</div>
|
|
{% endblock %}
|
|
{% block links %}<link rel="alternate" href="{{ config.ME.url | get_url }}" title="ActivityPub profile" type="application/activity+json">
|
|
<link rel="alternate" href="{{ config.ID }}/feed.json" type="application/json" title="JSON Feed">
|
|
<link rel="alternate" href="{{ config.ID }}/feed.rss" type="application/rss+xml" title="RSS">
|
|
<link rel="alternate" href="{{ config.ID }}/feed.atom" type="application/atom+xml" title="Atom 0.3">
|
|
{{ utils.display_pagination_links(older_than, newer_than) }}{% endblock %}
|