A URL shortener service that uses ATProto to allow self hosting and ensuring the user owns their data
at main 1.8 kB view raw
1<!doctype html> 2<html lang="en"> 3 <head> 4 <title>AT-Shorter</title> 5 <link rel="icon" type="image/x-icon" href="/public/favicon.ico" /> 6 <meta charset="UTF-8" /> 7 <meta name="viewport" content="width=device-width, initial-scale=1.0" /> 8 <link href="/public/app.css" rel="stylesheet" /> 9 </head> 10 <body> 11 <div id="header"> 12 <h1>AT-Shorter</h1> 13 <p>Create your own short URLs</p> 14 </div> 15 <div class="container"> 16 <div class="card"> 17 <form action="/logout" method="post" class="session-form"> 18 <div>Create your own short URL now!</div> 19 <div> 20 <button type="submit">Log out</button> 21 </div> 22 </form> 23 </div> 24 <form action="/create-url" method="post" class="status-options"> 25 <label for="newURL">URL to shorten:</label> 26 <input type="text" id="newURL" name="newURL"><br><br> 27 <button type="submit">Create</button> 28 </form> 29 {{range .UsersShortURLs}} 30 <tr> 31 <td> 32 <a href="{{.OriginHost}}/a/{{.ID}}">{{.ID}}</a> 33 </td> 34 <td> 35 <a href="{{ .URL }}">{{.URL}}</a> 36 </td> 37 <form action="/delete/{{.ID}}" method="post" class="status-options"> 38 <td> 39 <button> 40 <p class="text-sm">Delete</p> 41 </button> 42 </td> 43 </form> 44 </tr> 45 {{end}} 46 </div> 47 </body> 48</html>