Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion app/assets/stylesheets/qr-codes.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
@layer components {
.qr-code {
aspect-ratio: 1;
block-size: 50dvh;
border-radius: 1ch;
inline-size: clamp(20ch, 50dvh, 70ch);
margin-block: var(--block-space);
}
}
2 changes: 1 addition & 1 deletion app/controllers/qr_codes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def show

qr_code_svg = RQRCode::QRCode
.new(QrCodeLink.from_signed(params[:id]).url)
.as_svg(viewbox: true, fill: :white, color: :black)
.as_svg(viewbox: true, fill: :white, color: :black, offset: 16)

render svg: qr_code_svg
end
Expand Down