From 68f84d33c66b3087b4337d450aef88c1910829bd Mon Sep 17 00:00:00 2001 From: Matt Soucy Date: Fri, 24 Feb 2023 22:47:22 -0500 Subject: [PATCH] Audience on setlist cards --- 2022/11-setlist/deck.rb | 7 +++++-- 2022/11-setlist/layout.yml | 11 +++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/2022/11-setlist/deck.rb b/2022/11-setlist/deck.rb index 3d392fb..7fbbe03 100644 --- a/2022/11-setlist/deck.rb +++ b/2022/11-setlist/deck.rb @@ -52,13 +52,16 @@ Squib::Deck.new(cards: data.nrows) do text layout: :description, str: data.effect.zip(data.blurb).map { |e, b| "#{e}#{b ? "\n#{b}" : nil}" } do |embed| - embed.svg key: '{a}', width: 32, height: 32, data: Icons::AUDIENCE + embed.svg key: '{A}', width: 32, height: 32, data: Icons::AUDIENCE embed.svg key: '{l}', width: 32, height: 32, data: Icons::LOVE embed.svg key: '{a}', width: 32, height: 32, data: Icons::ANGER embed.svg key: '{j}', width: 32, height: 32, data: Icons::JOY embed.svg key: '{s}', width: 32, height: 32, data: Icons::SAD end - text layout: :type, markup: true, str: data.volume.map { |v| "#{v} (#{VOLUMES[v]})" } + text layout: :volume, markup: true, str: data.volume.map { |v| "#{v} (#{VOLUMES[v]})" } + text layout: :audience, ellipsize: :autoscale, str: data.audience.map { |au| "{A}#{au}"} do |embed| + embed.svg key: '{A}', width: 48, height: 48, data: Icons::AUDIENCE + end save format: :png save_sheet prefix: "sheet", diff --git a/2022/11-setlist/layout.yml b/2022/11-setlist/layout.yml index e69de29..10893dd 100644 --- a/2022/11-setlist/layout.yml +++ b/2022/11-setlist/layout.yml @@ -0,0 +1,11 @@ +volume: + x: 90 + y: 955 + width: 320 + height: 50 + align: left + +audience: + extends: volume + x: += 329 + align: right \ No newline at end of file