forked from kkuchta/Vimbits
/
index.html.haml
52 lines (44 loc) · 1.28 KB
/
index.html.haml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
%p#notice= notice
- cache do
%h1= @title
- content_for(:title) do
= params[:sort].capitalize
.row
%form.tag-search{ method:'get', action:('/bits') }
.span3
- if params[:sort]
%input{ type:'hidden', name:'sort', value: params[:sort] }
%textarea.singleTagBox{ rows: 1, name:'tag' }
.span3
%input.btn{ type:'submit' }
= render "tags"
.bit-list
- if @bits.length == 0
.bit.row
.well.span2
No vimbits found
- @bits.each do |bit|
.bit.row
.row
.span8.row.header
.vote-box
%i.icon-arrow-up.upvote{ bit_id: bit.id }
.vote-count= bit.plusminus.to_s
%i.icon-arrow-down.downvote{ bit_id: bit.id }
.title
%a{ href: url_for( bit ) }
= bit.title
.tags
- bit.tag_list.each do |t|
%a.label.label-info.tag{href: '/bits?tag='+t}
= t
.row
.span8.code
%pre.prettyprint.linenums= limit_string bit.code
- if bit.comments.count > 0
.row
.span8.comment-summary
%a{ href: url_for( bit ) }
= bit.comments.count.to_s + " comments"
%hr
= paginate @bits