pdnew/themes/default/templates/renderable/scoredlink.html

49 lines
2.3 KiB
HTML
Raw Permalink Normal View History

{% extends 'default/templates/renderable/administerable.html' %}
{% block content %}
2024-10-22 15:02:22 +00:00
<a
class="url"
href="{{ content.url }}"
target="_blank"
rel="noreferrer noopener"
style="background-image: url('/theme/dynamic/scoredlink/{{ content.id }}/');"
2024-10-22 15:02:22 +00:00
title="This URL loads data from {{ content.external_site_count }} external sites (median: {{ content.median }}, mean: {{ content.mean }}, min {{ content.min }}, max: {{ content.max }}, set size: {{ content.set_size }})"
>{{ content.url }}</a>
2024-09-01 16:52:27 +00:00
<ul class="fields">
<li class="field external-site-count">
<span class="name">External site count</span>
<span class="value" style="color: {{ content.color.css() }};">
{% if content.external_site_count is none %}
unknown
{% else %}
{{ content.external_site_count }}
{% endif %}
</span>
2024-09-01 16:52:27 +00:00
<input id="scoredlink-{{ content.id }}-external-site-count-toggle" class="toggle-input" type="checkbox" />
<label for="scoredlink-{{ content.id }}-external-site-count-toggle" class="toggle-label" title="{{ content.__class__.explanation_external_site_count }}">?</label>
<div class="explanation">
{{ content.__class__.explanation_external_site_count.render() }}
<span>The statistical spread of our dataset currently looks like this:</span>
<ul class="statistic-info">
<li class="stat"><span>Median:</span> <span class="value">{{ content.median }}</span></li>
<li class="stat"><span>Mean:</span> <span class="value">{{ content.mean }}</span></li>
<li class="stat"><span>Min:</span> <span class="value">{{ content.min }}</span></li>
<li class="stat"><span>Max:</span> <span class="value">{{ content.max }}</span></li>
<li class="stat"><span>Set size:</span> <span class="value">{{ content.set_size }}</span></li>
</ul>
</div>
</li>
<li class="field last-scrape">
<span class="name">Last scrape</span>
<span class="value">{{ content.last_scrape|prettydate or 'never' }}</span>
</li>
</dl>
{% endblock %}