Add API and clean code

This commit is contained in:
132ikl 2019-02-24 00:07:01 -05:00
parent b58f1dd273
commit 33628a56d0
4 changed files with 178 additions and 66 deletions

View file

@ -12,11 +12,15 @@
<div class="form">
<h2>{{ config.site_name }}</h2>
<form class="pure-form">
<input name="long" type="url" placeholder="Long URL">
<p>
<input name="short" type="text" placeholder="Custom link (optional)">
<input name="long" type="url" placeholder="Long URL">
</p>
<p>
<button type="submit" class="pure-button pure-button-primary" formmethod="post">Shorten</button>
<input name="short" type="text" placeholder="Custom link (optional)">
</p>
<p>
<button type="submit" class="pure-button pure-button-primary" formmethod="post">Shorten</button>
</p>
</form>
</div>
{% if result is defined and result[0] %}