added some simple styles to make it nicer

pull/6/head
Adam Townsend 2023-09-22 17:42:50 -07:00
parent 47f8741592
commit c0c82e5395
2 changed files with 6 additions and 4 deletions

2
app.rb
View File

@ -20,7 +20,7 @@ class App < Roda
r.post "create" do
url = r.params['url']
if nil == links.filter(:url => url).first
code = SecureRandom.urlsafe_base64 5
code = SecureRandom.urlsafe_base64 4
links.insert(url: url, code: code)
end
@new_link = 'http://' + request.env['HTTP_HOST'] + '/' + links.filter(:url => url).first[:code]

View File

@ -3,8 +3,10 @@
<title><%= @page_title || "URL Shortener" %></title>
<link rel="icon" href="data:,">
</head>
<body>
<body style="background: #FEFEFE; font-family: Helvetica, sans-serif;">
<main style="max-width: 30rem; min-width: 18rem; border: 2px solid #111111; border-radius: 20px; margin: auto; padding: 1rem; margin-top: 5rem; text-align: center;">
<h1>URL Shortener</h1>
<%== yield %>
</main>
</body>
</html>