Add something that shows the redirect sequence
[bigly] / src / bigly / templates / bigly / link_info.html
index bdd5265..7bce71d 100644 (file)
@@ -1,23 +1,40 @@
-{% load static %}
-<!doctype html>
-<html lang='en'>
-  <head>
-    <title>bigly</title>
+{% extends 'bigly/_base.html' %}
 
-    <meta charset='utf-8'/>
-    <meta name='viewport' content='width=device-width, initial-scale=1'/>
-    <meta name='description' content='A tool for unshortening links that have been shortened with a link shortener.'/>
-    <meta name='author' content='David Kerkeslager'/>
-
-    <link rel='stylesheet' href='{% static "bigly/styles.css" %}'/>
-  </head>
-
-  <body>
-    <table>
-      <tr>
-        <td>Link:</td>
-        <td><a href='{{ link }}'>{{ link }}</a></td>
-      </tr>
-    </table>
-  </body>
-</html>
+{% block body %}
+<table>
+  <tr>
+    <td>Status:</td>
+    {% if 200 <= status and status < 300 %}
+      <td style='color: green;'>{{ status }}</td>
+    {% elif 400 <= status and status < 600 %}
+      <td style='color: red;'>{{ status }}</td>
+    {% else %}
+      <td>{{ status }}</td>
+    {% endif %}
+  </tr>
+  <tr>
+    <td>Content Type:</td>
+    <td>{{ content_type }}</td>
+  </tr>
+  <tr>
+    <td>Link:</td>
+    <td><a href='{{ link }}'>{{ link }}</a></td>
+  </tr>
+  <tr>
+    <td>Redirects:</td>
+    <td>
+      <ol>
+        {% for r in redirect_sequence %}
+        <li>
+          {% comment "Add something that communicates when utm parameters were removed." %}
+          {% endcomment %}
+          <a href='{{ r }}'>
+            {{ r }}
+          </a>
+        </li>
+        {% endfor %}
+      </ol>
+    </td>
+  </tr>
+</table>
+{% endblock %}