Add the ability to redirect to the resulting link, some styling
[bigly] / src / bigly / templates / bigly / index.html
index 17bf9f7..960aaed 100644 (file)
@@ -1,30 +1,26 @@
+{% extends 'bigly/_base.html' %}
 {% load static %}
-<!doctype html>
-<html lang='en'>
-  <head>
-    <title>bigly</title>
 
-    <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'/>
+{% block body %}
+<h1>bigly</h1>
+<h2>make links big again</h2>
 
-    <link rel='stylesheet' href='{% static "bigly/styles.css" %}'/>
-  </head>
+<form action='{% url "embiggen" %}' method='get'>
+  <input type='url' name='link' autofocus></input>
+  <label for='link'>Link</label>
+  <span>
+    <input type='checkbox' name='remove_utm' checked></input>
+    <label for='remove_utm'>Remove UTM Parameters</label>
+  </span>
+  <span>
+    <input type='radio' name='handler' value='display' checked></input>
+    <label for='display'>Display link information</label>
+    <input type='radio' name='handler' value='redirect'></input>
+    <label for='redirect'>Redirect to link</label>
+  </span>
+  <input type='submit' value='Embiggen'></input>
+</form>
 
-  <body>
-    <h1>bigly</h1>
-    <h2>make links big again</h2>
-
-    <form action='{% url "embiggen" %}' method='get'>
-      <input type='url' name='link' autofocus></input>
-      <label for='link'>Link</label>
-      <input type='checkbox' name='remove_utm' checked></input>
-      <label for='remove_utm'>Remove UTM Parameters</label>
-      <input type='submit' value='Embiggen'></input>
-    </form>
-
-    <script src='{% static "bigly/scripts.js" %}'></script>
-  </body>
-</html>
+<script src='{% static "bigly/scripts.js" %}'></script>
+{% endblock %}