Pridvorci, Nevesinje, Mandera West Constituency & Obliquogobius
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 143 KiB After Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 151 KiB |
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 151 KiB |
Before Width: | Height: | Size: 146 KiB After Width: | Height: | Size: 152 KiB |
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 151 KiB |
Before Width: | Height: | Size: 143 KiB After Width: | Height: | Size: 149 KiB |
Before Width: | Height: | Size: 143 KiB After Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 146 KiB After Width: | Height: | Size: 152 KiB |
Before Width: | Height: | Size: 146 KiB After Width: | Height: | Size: 152 KiB |
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 151 KiB |
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 151 KiB |
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 148 KiB After Width: | Height: | Size: 146 KiB |
Before Width: | Height: | Size: 149 KiB After Width: | Height: | Size: 147 KiB |
Before Width: | Height: | Size: 149 KiB After Width: | Height: | Size: 147 KiB |
Before Width: | Height: | Size: 148 KiB After Width: | Height: | Size: 146 KiB |
Before Width: | Height: | Size: 149 KiB After Width: | Height: | Size: 147 KiB |
Before Width: | Height: | Size: 148 KiB After Width: | Height: | Size: 146 KiB |
|
@ -17,46 +17,53 @@ layouts = ['economy.yml', 'space-layout-1.yml']
|
|||
c1 = '#9f68ed'
|
||||
c2 = '#ed9f68'
|
||||
c3 = '#b5ed68'
|
||||
c4 = '#eeeeee'
|
||||
|
||||
# conditional coloring
|
||||
# https://squib.readthedocs.io/en/v0.15.0/colors.html?highlight=color#samples
|
||||
|
||||
bg = c1
|
||||
fg = c2
|
||||
color = c1
|
||||
|
||||
Squib::Deck.new cards: data['name'].size, layout: layouts do
|
||||
|
||||
# background_color = cards['type'].map do |t|
|
||||
# if color == 'bg' && t == 'O' then
|
||||
# 'bg'
|
||||
# else
|
||||
# 'fg'
|
||||
# end
|
||||
# end
|
||||
#background color: background_color
|
||||
# set background colour per card type
|
||||
bg = data['type'].map do |t|
|
||||
if (t.eql? 'O')
|
||||
c1
|
||||
elsif (t.eql? 'Q')
|
||||
c2
|
||||
elsif (t.eql? 'Q')
|
||||
c3
|
||||
else
|
||||
c4
|
||||
end
|
||||
end
|
||||
|
||||
background color: bg #background color: '#9f68ed'
|
||||
# set fill colour per card type
|
||||
fg = data['type'].map do |t|
|
||||
if (t.eql? 'O')
|
||||
c2
|
||||
elsif (t.eql? 'Q')
|
||||
c1
|
||||
elsif (t.eql? 'Q')
|
||||
c4
|
||||
else
|
||||
c4
|
||||
end
|
||||
end
|
||||
|
||||
background color: bg
|
||||
rect fill_color: fg , x: 78, y: 78, width: '2.25in', height: '3.25in', radius: 32
|
||||
|
||||
|
||||
rect layout: 'cut' # cut line as defined by TheGameCrafter
|
||||
rect layout: 'safe' # safe zone as defined by TheGameCrafter
|
||||
text str: data['name'], layout: 'title'
|
||||
text str: data['type'], layout: 'type'
|
||||
text str: data['text'], layout: 'description'
|
||||
svg file: data['illustration'], layout: 'illustration'
|
||||
|
||||
# output a png of each card and pdf of the deck
|
||||
save_png
|
||||
save_pdf
|
||||
|
||||
# Defaults are pretty sensible.
|
||||
showcase file: 'showcase.png'
|
||||
|
||||
# Here's a more complete example.
|
||||
# Tons of ways to tweak it if you like - check the docs.
|
||||
showcase trim: 32, trim_radius: 32, margin: 100, face: :right,
|
||||
scale: 0.85, offset: 0.95, fill_color: :black,
|
||||
reflect_offset: 25, reflect_strength: 0.1, reflect_percent: 0.4,
|
||||
file: 'showcase2.png'
|
||||
|
||||
save_png prefix: 'showcase_individual_' # to show that they're not trimmed
|
||||
|
||||
|
||||
end
|
||||
|
|