neocities/views/browse.slim
2013-06-20 20:48:43 -07:00

29 lines
1.3 KiB
Text

.row
.span12.text-center
h1 Home Pages on NeoCities
p If you like a site, don't forget to bookmark it!<br>Hit counts are updated daily.<br>Want to make your own site? <a href="/new">Click here</a>!
- @sites.each_with_index do |site,i|
- if i.even? && i != 0
.row
.span6 style="background-color: #F8F8F8; margin-bottom: 30px"
.row
.span3
h3 style="margin-left: 20px": a href="http://#{site.username}.neocities.org" target="_blank" #{site.username}
.span3.text-right
p style="margin-right: 20px; margin-top: 10px" #{site.hits} hits<br>last updated #{site.updated_at.ago}
a href="http://#{site.username}.neocities.org" target="_blank": img src="/site_screenshots/#{ENV['RACK_ENV'] == 'development' ? 'victoria' : site.username}.jpg"
- if @page_count > 1
.pagination.pagination-large.text-center
ul
- if @current_page != 1
li: a href="/browse?current_page=#{@current_page - 1}": i.icon-arrow-left style="font-size: 12pt"
- 1.upto(@page_count) do |num|
li class="#{"active" if num == @current_page}": a href="/browse?current_page=#{num}" #{num}
- if @current_page != @page_count
li: a href="/browse?current_page=#{@current_page + 1}": i.icon-arrow-right style="font-size: 12pt"