I have started a new blog and will merge this one with the new one. No further blogposts will be made here.
Checkout my new blog!
Is Rails broken?
5 years ago
Shoes.app do
background black
para "Look ma, a black background!", :size => 30, :align => "center", :stroke => crimson
end
background "#FF0".."#0FF", :angle => 60
background "justsomelocal.jpg", :border => "FF0".."0FF", :strokewidth => 10
background "http://poignantguide.net/ruby/i/the.foxes-4c.png"
Shoes.app do
stack do
para "heya"
para "we are stacked"
para "stacked you see?"
para "different lines"
end
end
Shoes.app do
stack do
background fuchsia
para "hi again"
end
stack do
background cornflowerblue
para "we are in stacks"
para "we are blue together"
end
stack do
background peru
para "each our own"
end
stack do
background gold
para "with our colours"
end
end
Shoes.app do
background black
stack :width => 100 do
background fuchsia
para "we are not wide"
end
stack :width => 200, :height => 150, :scroll => true do
background cornflowerblue
para "we are in stacks"
para "the stack is high"
para "content exeeds height"
para "bla"
para "blabla"
para "but we have a scrollbar"
end
stack :top => 250, :left => 150 do
background gold
para "some margin for errors"
end
end
Shoes.app :width => 400, :height => 140 do
flow do
stack :width => '50%' do
background khaki
para "first stack"
para "stacks rock"
para "khakis are only cool in shoes"
end
stack :width => '40%' do
background peru
para "second stack"
end
para "i'm no stack but just in a flow, but did not fit", :stroke => blue
end
end
Shoes.app doPara's
end
Shoes.app doSave your file and open it with Shoes by running "shoes step1.rb" or just opening an app from the Shoes GUI. You will get something like this:
para "Hello World!"
end
para "Hello World, are you there?", :size => 48Save, run and take a look.
Shoes.app doWhat do you think this app will look like? Save and run it! As you might have noticed you can use style options for colors too. Colors can be specified by their name or their hexadecimal Red-Green-Blue value. Here's a list for color names and values. We also used some alternatives to para's.
para "Hello World!", :size => 48, :stroke => dodgerblue
subtitle "Why are you not answering?", :stroke => red
tagline "Hmm wait, what to say in case it does answer?", :fill => "#FF0000"
inscription "...yes quite some responsibility to be the one who talks to the world", :fill => darkkhaki
end
A few last tips: use alt + ? for help and alt + . to reload your Shoes app in the Shoes GUI. Use alt + / for the Shoes console to see debug messages. Use alt + p to package your app.
Shoes.app do
para "Centered text!", :size => 14, :align => "center", :stroke => firebrick
subtitle "justify", :justify => true, :stroke => hotpink, :fill => black
para "top and left", :top => 150, :left => 222, :stroke => mediumspringgreen
tagline "oblique", :emphasis => "oblique", :stroke => peru
inscription "displace", :displace_left => 20, :top => 180
para "more left less top", :top => 250, :left => 280, :stroke => olive
title "strikethrough and strikecolor", :strikethrough => "single", :strikecolor => crimson
caption "leading", :leading => 10
para "undercolor", :underline => "single", :undercolor => darkorchid, :top => 210
tagline "Variant Weight", :variant => "smallcaps", :weight => "heavy", :stroke => gold
end