microblog.pub/templates/lookup.html

49 lines
1.7 KiB
HTML
Raw Normal View History

2018-07-20 22:15:47 +00:00
{% extends "layout.html" %}
{% import 'utils.html' as utils %}
{% block title %}Lookup - {{ config.NAME }}{% endblock %}
{% block content %}
<div id="container">
{% include "header.html" %}
<div style="margin-top:50px;">
<form id="lookup-form" method="GET">
<input type="text" name="url" value="{{url or '' }}" placeholder="https://url-of-a-user-or-a-note.tld">
<input type="submit" value="Lookup">
2018-07-20 22:15:47 +00:00
</form>
{% if data %}
{% set data = data.to_dict() %}
<div id="lookup-result" style="margin-top:30px;">
2018-07-29 18:24:46 +00:00
{% if data | has_actor_type %}
2019-07-05 20:05:28 +00:00
<div style="margin-left:95px;padding-bottom:5px;margin-bottom:15px;display:inline-block;">
2019-08-27 21:02:19 +00:00
<a class="bar-item" href="/admin/profile?actor_id={{data.id}}">profile</a>
2018-07-20 22:15:47 +00:00
<form action="/api/follow" class="action-form" method="POST">
<input type="hidden" name="redirect" value="{{ request.path }}"/>
<input type="hidden" name="actor" value="{{ data.id }}"/>
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
<button type="submit" class="bar-item">follow</button>
</form>
</div>
{{ utils.display_actor_inline(data, size=80) }}
2019-08-27 21:02:19 +00:00
2018-07-20 22:15:47 +00:00
{% elif data | has_type('Create') %}
{{ utils.display_note(data.object, ui=True) }}
{% elif data | has_type(['Note', 'Article', 'Video', 'Audio', 'Page', 'Question']) %}
2018-07-20 22:15:47 +00:00
{{ utils.display_note(data, ui=True) }}
2018-07-29 18:10:15 +00:00
{% elif data | has_type('Announce') %}
{% set boost_actor = meta.actor %}
<p style="margin-left:65px;padding-bottom:5px;">
<span class="bar-item-no-hover"><a style="color:#808080;" href="{{ boost_actor.url | get_url }}">{{ boost_actor.name }}</a> boosted</span>
</p>
{{ utils.display_note(meta.object, ui=False, meta={'actor': meta.object_actor}) }}
2018-07-20 22:15:47 +00:00
{% endif %}
</div>
{% endif %}
</div>
</div>
{% endblock %}