forked from
microcosm.blue/microcosm-rs
Constellation, Spacedust, Slingshot, UFOs: atproto crates and services for microcosm
1{% extends "base.html.j2" %}
2{% import "try-it-macros.html.j2" as try_it %}
3
4{% block title %}Explore links{% endblock %}
5{% block description %}All link sources of atproto records linking to {{ query.target }}{% endblock %}
6
7{% block content %}
8
9 {% call try_it::explore_links(query.target) %}
10
11 <h2>
12 All links to <code>{{ query.target }}</code>
13 {% if let Some(browseable_uri) = query.target|to_browseable %}
14 <small style="font-weight: normal; font-size: 1rem"><a href="{{ browseable_uri }}">browse record</a></small>
15 {% endif %}
16 </h2>
17
18 <h3>Links by collection and path:</h3>
19
20<pre style="display: block; margin: 1em 2em" class="code">
21{%- for (collection, collection_links) in links -%}
22 <strong>{{ collection }}</strong>
23 {%- for (path, counts) in collection_links %}
24 {{ path }}: <a href="/links?target={{ query.target|urlencode }}&collection={{ collection|urlencode }}&path={{ path|urlencode }}">{{ counts.records|human_number }} links</a> from <a href="/links/distinct-dids?target={{ query.target|urlencode }}&collection={{ collection|urlencode }}&path={{ path|urlencode }}">{{ counts.distinct_dids|human_number }} distinct DIDs</a></li>
25 {%- endfor %}
26
27{% else -%}
28 <em>No links indexed for this target</em>
29{% endfor -%}
30</pre>
31 <details>
32 <summary>Raw JSON response</summary>
33 <pre class="code">{{ self|tojson }}</pre>
34 </details>
35
36{% endblock %}