Created
February 2, 2011 15:40
-
-
Save adamhunter/807867 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-# where pages = that_example_hash[:pages] | |
- pages.each do |page| | |
.image | |
%img{ :src => "#{page[:image]}" } | |
-# the x & y coorinants for the top, left corners have some simple logic to subtract 2 from each to counter | |
-# the 2px border that's added in the CSS. This makes the focus areas overlay the main image in the right spot. | |
-# pages.each_pair do || | |
- page[:tooltips].each do |tooltip| | |
.focus{ :style => "top:#{tooltip[:y] -2}px;left:#{tooltip[:x] -2}px;height:#{tooltip[:height]}px;width:#{tooltip[:width]}px;background: url(#{page[:image]}) -#{tooltip[:x]}px -#{tooltip[:y]}px;", :rel => "#{tooltip[:name]}"} | |
.tooltip{ :id => "#{tooltip[:name]}", :class => "right-side"} | |
.header | |
%strong= tooltip[:heading] | |
.content | |
%p= tooltip[:content] | |
.footer | |
.tip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment