#stylesheet1 { attrs: 'href' "#{@album.relroot}res/style1.css"; } #stylesheet2 { attrs: 'href' "#{@album.relroot}res/style2.css"; } #styleswitcher { attrs: 'src' "#{@album.relroot}res/styleswitcher.js"; } #prototype { attrs: 'src' "#{@album.relroot}res/prototype.js"; } #topgif { attrs: 'src' "#{@album.relroot}res/top.gif"; } #upgif { attrs: 'src' "#{@album.relroot}res/up.gif"; } #valid_xhtml_png { attrs: 'src' "#{@album.relroot}res/valid-xhtml.png"; } #valid_css_png { attrs: 'src' "#{@album.relroot}res/valid-css.png"; } #thumb_image { attrs: 'src' "#{@album.relroot + photo.thumb.page_url}"; } #thumb_subalbum { attrs: 'src' "#{@album.relroot + subalbum.default_image_pool.thumb.page_url}"; } #breadcrumbs { logic: { item_ctr = 0 for item in @album.breadcrumbs item_ctr += 1 if item_ctr > 1 _element("arrow") # expand element marked with arrow end _element("item") # expand element marked with item end } } #item { logic: { item_path = item[:path] # retrieve path and item_title = item[:title] # title from a hash if item_path.nil? # if path is null then _cont # don't print . else _stag _cont _etag end } } #thumbnails_table { logic: { _stag start_pos = 1 while start_pos <= @album.leaves.length idx = start_pos _element("thumbnail_image_row") idx = start_pos _element("thumbnail_title_row") start_pos += 7 end _etag } } #thumbnail_image_row { logic: { _stag while idx <= @album.leaves.length && idx % 7 != 0 photo = @album.leaves[ idx-1 ] _cont idx += 1 end _etag } } #thumbnail_title_row { logic: { _stag while idx <= @album.leaves.length && idx % 7 != 0 photo = @album.leaves[ idx-1 ] _cont idx += 1 end _etag } } #subalbums_row { logic: { col = 1 for subalbum in @album.children if col == 1 _stag end _cont; col += 1 if col == 3 col = 1 _etag end end if col != 1 _etag end } }