%section
  = to_markup 'title_and_breadcrumb', {title: title, nav: nav}

  - recent_groups.each do |recent|
    %h3= I18n.t('pictures.recents.' + recent[:group_type])
    %ul.groups
      - recent[:groups].each do |group|
        %li{ title: group['title'] }
          %a{ onclick: 'openImagesGallery("' + gallery_url(recent[:group_type], group['id']) + '");' }
            %figure
              %div{ style: 'background-image: url("api/group/' + recent[:group_type] + '?' + recent[:group_type] + '=' + group['id'] + '")' }
              %figcaption
                = group['title']
                - if group['brief']
                  %br
                  %em= group['brief']
    - unless recent[:see_more_url].empty?
      %p.see_more
        %a{ href: recent[:see_more_url] }= I18n.t('pictures.see_more')

  - all_groups.each do |section|
    %h3= I18n.t('pictures.browse_by.' + section[:group_type])
    %ul.groups.wide
      - section[:groups].each do |group|
        %li{ title: group['title'] }
          %a{ href: section[:url_prefix] + '&' + section[:group_type] + '=' + group['id'] }
            %figure
              %div{ style: 'background-image: url("api/group/' + section[:group_type] + '?' + section[:group_type] + '=' + group['id'] + '")' }
              %figcaption
                = group['title']
                - if group['brief']
                  %br
                  %em= group['brief']

- unless recent_groups.empty?
  = to_markup 'pictures_photoswipe'