From c0c82e53951ebd9bb649a1af23f2014fb112ac62 Mon Sep 17 00:00:00 2001 From: Adam Townsend Date: Fri, 22 Sep 2023 17:42:50 -0700 Subject: [PATCH] added some simple styles to make it nicer --- app.rb | 2 +- views/layout.erb | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app.rb b/app.rb index 736d0dc..9321f03 100644 --- a/app.rb +++ b/app.rb @@ -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] diff --git a/views/layout.erb b/views/layout.erb index 7f6853c..bc24c5c 100644 --- a/views/layout.erb +++ b/views/layout.erb @@ -3,8 +3,10 @@ <%= @page_title || "URL Shortener" %> - -

URL Shortener

- <%== yield %> + +
+

URL Shortener

+ <%== yield %> +