diff --git a/app/assets/images/banner.png:Zone.Identifier b/app/assets/images/banner.png:Zone.Identifier deleted file mode 100644 index 8faa796..0000000 --- a/app/assets/images/banner.png:Zone.Identifier +++ /dev/null @@ -1,4 +0,0 @@ -[ZoneTransfer] -ZoneId=3 -ReferrerUrl=https://www.canva.com/ -HostUrl=https://export-download.canva.com/fI-lI/DAFtSsfI-lI/10/0/0001-3345450671263431284.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJHKNGJLC2J7OGJ6Q%2F20230905%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230905T105305Z&X-Amz-Expires=85473&X-Amz-Signature=64ca888fac664a42bf680fd8e3f0ef3bfb101d66d9b627db1278fb9ceb7d6648&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%2A%3DUTF-8%27%27Linkaroo.png&response-expires=Wed%2C%2006%20Sep%202023%2010%3A37%3A38%20GMT diff --git a/app/assets/stylesheets/loftwah.scss b/app/assets/stylesheets/loftwah.scss index c79a8bf..94950ea 100644 --- a/app/assets/stylesheets/loftwah.scss +++ b/app/assets/stylesheets/loftwah.scss @@ -84,4 +84,10 @@ .nav-link:hover { color: rgba(255, 255, 255, 0.9) !important; /* Almost white */ } - } \ No newline at end of file + } + + // .qr-code svg { + // width: 100%; + // background-color: #f2f2f2; /* or any color you prefer */ + // } + \ No newline at end of file diff --git a/app/controllers/public_links_controller.rb b/app/controllers/public_links_controller.rb index 6eb2c0c..e1725b1 100644 --- a/app/controllers/public_links_controller.rb +++ b/app/controllers/public_links_controller.rb @@ -1,9 +1,19 @@ +# PublicLinksController +require 'rqrcode' + class PublicLinksController < ApplicationController - skip_before_action :authenticate_user!, only: [:show] # Skip Devise's authentication for show action - - def show - @user = User.find_by!(username: params[:username]) - @public_links = Link.where(user_id: @user.id, public: true) - end + skip_before_action :authenticate_user!, only: [:show] + + def show + @user = User.find_by!(username: params[:username]) + @public_links = Link.where(user_id: @user.id, public: true) + @qr = RQRCode::QRCode.new(request.original_url) + @svg = @qr.as_svg( + offset: 0, + color: '000', + shape_rendering: 'crispEdges', + module_size: 6, + standalone: true + ) end - \ No newline at end of file +end diff --git a/app/views/public_links/show.html.erb b/app/views/public_links/show.html.erb index cdde6a0..260704b 100644 --- a/app/views/public_links/show.html.erb +++ b/app/views/public_links/show.html.erb @@ -1,42 +1,68 @@
@<%= @user.username %>
-<%= @user.short_description %>
-@<%= @user.username %>
+<%= @user.short_description %>
+