Initial commit: simpleblog
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
{% extends "admin/base.html" %}
|
||||
{% block admin_content %}
|
||||
<div class="admin-panel">
|
||||
<h1>Visitor history</h1>
|
||||
<table class="admin-table">
|
||||
<tbody>
|
||||
<tr><th>Visitor ID</th><td><code>{{ visitor.visitor_id }}</code></td></tr>
|
||||
<tr><th>Browser</th><td>{{ visitor.browser or "—" }}</td></tr>
|
||||
<tr><th>Operating system</th><td>{{ visitor.os or "—" }}</td></tr>
|
||||
<tr><th>Device</th><td>{{ visitor.device }}</td></tr>
|
||||
<tr><th>Location</th><td>{% if visitor.city or visitor.country %}{% if visitor.country_code %}<span class="location-flag">{{ visitor.country_code|country_flag }}</span> {% endif %}{{ visitor.city or "—" }}{% if visitor.region %}, {{ visitor.region }}{% endif %}{% if visitor.country %}, {{ visitor.country }}{% endif %}{% if visitor.latitude is not none %} <span class="muted">({{ "%.2f"|format(visitor.latitude) }}, {{ "%.2f"|format(visitor.longitude) }})</span>{% endif %}{% else %}—{% endif %}</td></tr>
|
||||
<tr><th>Source</th><td><span class="term">{{ visitor.source }}</span></td></tr>
|
||||
<tr><th>Referrer domain</th><td>{{ visitor.referrer_domain or "direct (no referrer)" }}</td></tr>
|
||||
<tr><th>Raw referrer</th><td>{{ visitor.referrer or "—" }}</td></tr>
|
||||
<tr><th>First seen</th><td>{{ parse_date(visitor.first_seen) }}</td></tr>
|
||||
<tr><th>Last seen</th><td>{{ parse_date(visitor.last_seen) }}</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="admin-panel">
|
||||
<h2>Pages visited ({{ visits|length }})</h2>
|
||||
<table class="admin-table">
|
||||
<thead><tr><th>Page</th><th>Title</th><th>When</th></tr></thead>
|
||||
<tbody>
|
||||
{% for v in visits %}
|
||||
<tr>
|
||||
<td><code>{{ v.page_path }}</code></td>
|
||||
<td>{{ v.title or "(untitled)" }}</td>
|
||||
<td>{{ parse_date(v.timestamp) }}</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr><td colspan="3" class="empty-state">This visitor has not visited any page yet.</td></tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user