| DTabidze | b00a1db | 2024-01-12 18:30:14 +0400 | [diff] [blame^] | 1 | <!DOCTYPE html> |
| 2 | <html lang="en"> |
| 3 | |
| 4 | <head> |
| 5 | <meta charset="UTF-8"> |
| 6 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 7 | <title>URL Shortener</title> |
| 8 | </head> |
| 9 | |
| 10 | <body> |
| 11 | <h1>URL Shortener</h1> |
| 12 | |
| 13 | <form action="/" method="post"> |
| 14 | <label for="address">Address:</label> |
| 15 | <input type="text" id="address" name="address" required> |
| 16 | |
| 17 | <label for="custom">Custom Name (optional):</label> |
| 18 | <input type="text" id="custom" name="custom"> |
| 19 | |
| 20 | <button type="submit">Shorten URL</button> |
| 21 | </form> |
| 22 | |
| 23 | <h2>Named Addresses:</h2> |
| 24 | <table> |
| 25 | <tr> |
| 26 | <th>Name</th> |
| 27 | <th>Address</th> |
| 28 | <th>Owner</th> |
| 29 | <th>Active</th> |
| 30 | </tr> |
| 31 | {{ range .NamedAddresses }} |
| 32 | <tr> |
| 33 | <td><a href="{{ .Name }}" target="_blank">{{ .Name }}</a></td> |
| 34 | <td>{{ .Address }}</td> |
| 35 | <td>{{ .OwnerId }}</td> |
| 36 | <td>{{ .Active }}</td> |
| 37 | </tr> |
| 38 | {{ end }} |
| 39 | </table> |
| 40 | </body> |
| 41 | |
| 42 | </html> |