toolmantim-bananajour 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,112 @@
1
+ - @page_title = "Commit #{@commit}"
2
+
3
+ %style{:type => 'text/css'}
4
+ :sass
5
+ #title
6
+ :margin-left 0
7
+
8
+ #commit_id
9
+ :text-transform uppercase
10
+ :margin 0
11
+ &, a
12
+ :color rgb(153, 136, 0)
13
+ a:hover
14
+ :color #760
15
+
16
+ p.message
17
+ .meta
18
+ :font-size 90%
19
+ :margin-top 0
20
+ :color #796B00
21
+
22
+ .codediff
23
+ :font 90%/140% "Bitstream Vera Sans Mono", Monaco, "Courier New", Courier, monospace
24
+ :width 100%
25
+ :border-collapse collapse
26
+ :margin-bottom 20px
27
+
28
+ th:first-child
29
+ :-webkit-border-top-left-radius 9px
30
+ tr:last-child td:last-child
31
+ :-webkit-border-bottom-right-radius 9px
32
+
33
+ .line-num-cut
34
+ :background #ccc
35
+ :border-top 1px dashed #ccc
36
+ :border-bottom 1px dashed #ccc
37
+
38
+ th, .line_numbers
39
+ :background #F0E342
40
+
41
+ th
42
+ :text-align left
43
+ :padding 3px 0
44
+
45
+ td
46
+ :padding 0 3px
47
+ &.line_numbers
48
+ :text-align right
49
+ :min-width 9px
50
+
51
+ &.code
52
+ :white-space pre-wrap
53
+ :white-space -moz-pre-wrap
54
+ :white-space -pre-wrap
55
+ :white-space -o-pre-wrap
56
+ :word-wrap break-word
57
+ :background #fff
58
+
59
+ &.unwrapped
60
+ :white-space pre
61
+
62
+ &.softwrapped
63
+ :white-space pre-wrap
64
+ :white-space -moz-pre-wrap
65
+ :white-space -pre-wrap
66
+ :white-space -o-pre-wrap
67
+ :word-wrap break-word
68
+
69
+ &.marked
70
+ :background #ffc !important
71
+
72
+ &.ins
73
+ :background #a3ffa3
74
+ ins
75
+ :text-decoration none
76
+
77
+ &.del
78
+ :background #ffa3a3
79
+ del
80
+ :text-decoration none
81
+
82
+
83
+ %h2#commit_id
84
+ Commit
85
+ = @commit.id_abbrev
86
+ to
87
+ %a{:href => @repository.web_uri}= @repository.name
88
+
89
+ %p.message
90
+ &= @commit.message
91
+ %span.meta
92
+ \~
93
+ = @commit.committed_date.strftime('%a %b %e %I:%M%p').sub(/\b0(\d+):/, '\1:').sub('AM', 'am').sub('PM', 'pm')
94
+ - unless @commit.committed_date.year == Time.now.year
95
+ = @commit.committed_date.strftime(' %Y')
96
+ by
97
+ %span.author&= @commit.author
98
+
99
+ - for diff in @commit.diffs
100
+ - filename, lines = parse_diff(diff)
101
+ %table.codediff
102
+ %thead
103
+ %tr
104
+ %th
105
+ %th
106
+ %th= filename
107
+ %tbody
108
+ - for line in lines
109
+ %tr.changes
110
+ %td.line_numbers= line.op == DiffHelpers::DIFF_INS ? '' : line.num
111
+ %td.line_numbers= line.op == DiffHelpers::DIFF_DEL ? '' : line.num
112
+ %td{:class => diff_op_css_class(line.op)}= html_escape(line.body)
@@ -0,0 +1,308 @@
1
+ - @page_title = "#{Bananajour.config.name}’s Bananajour"
2
+
3
+ %style{:type => "text/css"}
4
+ :sass
5
+ .people
6
+ :font-size 14px
7
+ a
8
+ :color black
9
+
10
+ - if @my_repositories.empty?
11
+
12
+ %h2 Add a project
13
+
14
+ %pre
15
+ :preserve
16
+ $ cd ~/code/myproj
17
+ $ bananajour init
18
+ #{Bananajour.plain_init_success_message('myproj.git')}
19
+ $ git push banana master
20
+ Counting objects: 3, done.
21
+ Writing objects: 100% (3/3), 229 bytes, done.
22
+ Total 3 (delta 0), reused 3 (delta 0)
23
+ Unpacking objects: 100% (3/3), done.
24
+ To #{Bananajour.repositories_path.expand_path}/myproj.git
25
+ * [new branch] master -> master
26
+
27
+ - else
28
+
29
+ %style{:type => "text/css"}
30
+ :sass
31
+ .repository
32
+ :clear both
33
+ :background-color white
34
+ :-webkit-border-radius 10px
35
+ :-moz-border-radius 10px
36
+ :padding 7px 10px
37
+ :margin 10px 0
38
+ :position relative
39
+ :border 4px solid #ff0
40
+
41
+ a
42
+ :color #888
43
+
44
+ h2, p.uri
45
+ :margin 0
46
+ :display inline
47
+
48
+ h2
49
+ :color #333
50
+ :font-size 24px
51
+ p.uri
52
+ :color #666
53
+ :margin 5px 0
54
+ :font-size 12px
55
+
56
+ p.branches
57
+ :margin 5px 0
58
+ :font-size 12px
59
+
60
+ ul, li
61
+ :margin 0
62
+ :padding 0
63
+ :list-style none
64
+
65
+ p.readme
66
+ :margin 0 -5px 0 0
67
+ a
68
+ :float right
69
+ :margin 0
70
+ :text-transform uppercase
71
+ :font-size 10px
72
+ :font-weight bold
73
+ :color #999
74
+ :background-color #eee
75
+ :line-height 20px
76
+ :padding 0 5px
77
+ :text-decoration none
78
+ :-webkit-border-radius 2px
79
+ :-moz-border-radius 2px
80
+ &:hover
81
+ :color #666
82
+ :background-color #ddd
83
+
84
+ h3
85
+ :margin 10px 0 0 0
86
+ :font-size 12px
87
+ :color #999
88
+ :text-transform uppercase
89
+
90
+ ul.network
91
+ :margin-top 5px
92
+ li
93
+ :line-height 1em
94
+ :min-height 16px
95
+ :padding-left 30px
96
+ :margin 10px 0
97
+ &.loading
98
+ :background transparent url('/loader.gif') no-repeat 4px center
99
+ a.name
100
+ :font-size 12px
101
+ :font-weight bold
102
+ :color #666
103
+ :text-transform uppercase
104
+ :text-decoration none
105
+ span.branches
106
+ :font-size 12px
107
+ :color #999
108
+ span.more
109
+ :float right
110
+ :width 15px
111
+ :height 15px
112
+ :color #fff
113
+ :background-color #ccc
114
+ :font-size 12px
115
+ :line-height 15px
116
+ :font-weight bold
117
+ :-webkit-border-radius 2px
118
+ :-moz-border-radius 2px
119
+ :text-align center
120
+ :cursor pointer
121
+ &:hover
122
+ :background-color #aaa
123
+ :color #fff
124
+ p.message
125
+ :font-size 12px
126
+ :margin 2px 0 5px 1px
127
+ a
128
+ :color #333
129
+ :text-decoration none
130
+ &:hover
131
+ :text-decoration underline
132
+ span.meta
133
+ :font-size 10px
134
+ :color #999
135
+ em.branch
136
+ :font-weight bold
137
+ :font-style normal
138
+ :color #666
139
+ img.gravatar
140
+ :float left
141
+ :margin-left -30px
142
+ :margin-top 2px
143
+
144
+ img.gravatar
145
+ :width 20px
146
+ :height 20px
147
+
148
+ .projects, .people
149
+ :float left
150
+ :width 48%
151
+ :background-color #fff
152
+ :border 4px solid #ff0
153
+ :-webkit-border-radius 10px
154
+ :-moz-border-radius 10px
155
+ :margin-top 10px
156
+
157
+ h2
158
+ :margin 0
159
+ :text-align center
160
+ :font-size 16px
161
+ :line-height 28px
162
+ :background-color #ff0
163
+ :color #960
164
+ :text-transform uppercase
165
+
166
+ h3
167
+ :margin 0 0 5px 0
168
+
169
+ ul, li
170
+ :margin 0
171
+ :padding 0
172
+ :list-style none
173
+
174
+ > ul
175
+ :font-size 12px
176
+ :margin 10px
177
+ > li
178
+ :margin-bottom 10px
179
+ li li
180
+ :margin-right 0.2em
181
+ a
182
+ :color #000
183
+
184
+ .projects
185
+ ul li
186
+ ul, li
187
+ :display inline
188
+ a
189
+ :white-space nowrap
190
+
191
+ .people
192
+ :margin-left 10px
193
+ ul
194
+ li
195
+ :float left
196
+ :width 50%
197
+ :margin-bottom 5px
198
+ a
199
+ :text-decoration none
200
+ .name
201
+ :text-decoration underline
202
+ img
203
+ :vertical-align middle
204
+
205
+ .local .repository
206
+ :border-color #980
207
+
208
+ - for repository in @my_repositories
209
+ - repository_id = repository.html_friendly_name
210
+ - heads = repository.grit_repo.heads
211
+
212
+ .repository{:id => repository_id, 'data-name' => repository.name}
213
+
214
+ - if repository.readme_file && !local?
215
+ %p.readme
216
+ %a{:href => "/#{repository.name}/readme"} Readme
217
+
218
+ %h2
219
+ &= repository.name
220
+
221
+ %p.uri&= repository.uri
222
+
223
+ - unless local?
224
+ %p.branches
225
+ %strong Branches:
226
+ = heads.map {|h| h.name}.join(", ")
227
+ %ul.commits
228
+ - for commit in repository.recent_commits
229
+ %li
230
+ %img.gravatar{:src => commit.author.gravatar_uri}
231
+ %p.message
232
+ %a{:href => "/#{repository.html_friendly_name}/#{commit.id}"}&= commit.short_message
233
+ %span.meta
234
+ - if head = heads.find {|h| h.commit == commit}
235
+ \-
236
+ %em.branch= head.name
237
+ \~
238
+ &= time_ago_in_words(commit.committed_date).gsub("about ","")
239
+ ago by
240
+ &= commit.author
241
+ - else
242
+ %ul.network
243
+ - for repo in @repository_browser.repositories_similar_to(repository)
244
+ %li.loading{'data-json-uri' => repo.json_uri}
245
+ %a.name{:href => "#{repo.person.uri}##{repo.html_friendly_name}"}= repo.person.name
246
+
247
+ - if local?
248
+ :javascript
249
+ $(function() {
250
+ $("ul.network li").each(function() {
251
+ var repoLi = $(this);
252
+ $.getJSON(repoLi.attr("data-json-uri") + "?callback=?", function(data) {
253
+ repoLi.removeClass("loading");
254
+ $("<img class='gravatar'/>").attr("src", data.bananajour.gravatar).prependTo(repoLi);
255
+ $("<span class='branches' />").text(data.heads.join(", ")).appendTo(repoLi);
256
+ $('<span class="more">+</span>')
257
+ .click(function() {
258
+ if ($(this).text() == "+") {
259
+ repoLi.find(".message").show();
260
+ $(this).text("-");
261
+ } else {
262
+ repoLi.find(".message").each(function(i) {
263
+ if (i != 0) $(this).hide();
264
+ });
265
+ $(this).text("+");
266
+ }
267
+ })
268
+ .appendTo(repoLi);
269
+ $(data.recent_commits).each(function(i) {
270
+ var commit = this;
271
+ var message = $("<p class='message'/>").html(
272
+ $("<a/>").attr("href", data.bananajour.uri + data.html_friendly_name + "/" + commit.id).text(commit.message)
273
+ ).appendTo(repoLi).append(
274
+ $("<span class='meta'/>")
275
+ .append($("<em class='branch'/>").text(commit.head && (" - " + commit.head)))
276
+ .append(" ~ " + commit.committed_date_pretty + " by " + commit.author.name)
277
+ .appendTo(repoLi)
278
+ )
279
+ if (i != 0) message.hide();
280
+ });
281
+ });
282
+ });
283
+ });
284
+
285
+ .projects
286
+ - if @other_repos_by_name.empty?
287
+ %h2 No other projects
288
+ - else
289
+ %h2= pluralize @other_repos_by_name.length, "Other Project", "Other Projects"
290
+ %ul
291
+ - for repo_name in @other_repos_by_name.keys.sort
292
+ %li
293
+ %h3&= repo_name
294
+ %ul
295
+ - for repo in @other_repos_by_name[repo_name].sort_by {|r| r.person.name}
296
+ %li
297
+ %a{:href => repo.web_uri}&= repo.person.name
298
+ .people
299
+ - if @people.empty?
300
+ %h2 No other bananas
301
+ - else
302
+ %h2= pluralize @people.length, "Other Banana", "Other Bananas"
303
+ %ul
304
+ - for person in @people
305
+ %li
306
+ %a{:href => person.uri}
307
+ %img.gravatar{:src => person.gravatar}
308
+ %span.name&= person.name
@@ -0,0 +1,119 @@
1
+ !!!
2
+ %html{:lang => "en-au"}
3
+ %head
4
+ %meta{:charset => "UTF-8"}
5
+ %title= @page_title
6
+
7
+ %style{:type => "text/css"}
8
+ :sass
9
+ body
10
+ :position relative
11
+ :background-color #dc0
12
+ :color black
13
+ :font-family "Helvetica", arial, sans-serif
14
+ :width 650px
15
+ :margin 0 auto
16
+ :padding 30px 0
17
+
18
+ h1#title
19
+ :font-size 32px
20
+ :margin 0 0 10px 12px
21
+ :position relative
22
+ :text-transform uppercase
23
+ img.gravatar
24
+ :width 50px
25
+ :height 50px
26
+ :float right
27
+ :margin-right 10px
28
+ :border 2px solid #ff0
29
+ :-webkit-border-radius 3px
30
+ a
31
+ :color #000
32
+ :text-decoration none
33
+ img
34
+ :position absolute
35
+ :top 0
36
+ :left -140px
37
+ :border none
38
+ .owner
39
+ :display block
40
+ :font-size 16px
41
+ :font-weight bold
42
+ :text-transform uppercase
43
+ :color #fff
44
+
45
+ pre
46
+ :overflow auto
47
+
48
+ ul.commits
49
+ :width 100%
50
+ :margin-top 5px
51
+
52
+ ul.commits li
53
+ :font-size 12px
54
+ :line-height 1.5em
55
+ :padding 8px 0
56
+ :border 0px solid #ddd
57
+ :border-top-width 1px
58
+
59
+ a
60
+ :text-decoration none
61
+ :color #333
62
+ &:hover
63
+ :text-decoration underline
64
+
65
+ &:first-child
66
+ :border-top-width 0
67
+
68
+ p
69
+ :margin 0
70
+ :line-height 1em
71
+
72
+ p.message
73
+ :line-height 1.4em
74
+ :padding-left 30px
75
+
76
+ span.meta
77
+ :font-size 10px
78
+ :color #666
79
+ :line-height 1.5em
80
+
81
+ img.gravatar
82
+ :margin-top -5px
83
+ :width 25px
84
+ :height 25px
85
+ :float left
86
+
87
+ .clear
88
+ :clear both
89
+
90
+ #pbjt
91
+ :width 54px
92
+ :height 93px
93
+ :position absolute
94
+ :bottom 0
95
+ :right -100px
96
+ &:hover
97
+ :background-image url(/peanut.png)
98
+
99
+ %script{:src => "/jquery-1.3.2.min.js", :type => "text/javascript"}
100
+
101
+ %body{:class => ("local" if local?)}
102
+ %h1#title
103
+ %img.gravatar{:src => Bananajour.gravatar}
104
+ %a{:href => "/"}
105
+ %img{:src => "/logo.png", :width => "100", :height => "163", :alt => "Banana broadcasting to the world"}/
106
+ %span.owner
107
+ == #{Bananajour.config.name}&rsquo;s
108
+ Bananajour
109
+
110
+ = yield
111
+
112
+ #pbjt
113
+
114
+ .clear
115
+
116
+ :javascript
117
+ $("#pbjt").bind("click", function(){
118
+ $("<embed bgcolor='#000000' height='400' width='550' name='pbjt' pluginspage='http://www.adobe.com/go/getflashplayer' quality='high' src='/pbjt.swf' style='position:fixed;top:0;left:0;width:100%;height:100%' type='application/x-shockwave-flash' />").appendTo($("body"));
119
+ });
@@ -0,0 +1,52 @@
1
+ - @page_title = "Readme for #{@repository.name}"
2
+
3
+ %style{:type => "text/css"}
4
+ :sass
5
+ #readme
6
+ :clear both
7
+ :background-color white
8
+ :-webkit-border-radius 10px
9
+ :-moz-border-radius 10px
10
+ :padding 7px 10px
11
+ :margin 10px 0
12
+ :position relative
13
+ :border 4px solid #ff0
14
+ :font-size 75%
15
+ :line-height 1.3em
16
+
17
+ > *
18
+ :margin-left 10px
19
+ :margin-right 10px
20
+
21
+ .return
22
+ :float right
23
+ a
24
+ :color #000
25
+
26
+ body > h2
27
+ :margin-left 12px
28
+
29
+ body > h2, .return a
30
+ :color #980
31
+
32
+ code
33
+ :background-color #fff
34
+ :font-size 12px
35
+ :color #666
36
+
37
+ %p.return
38
+ %a{:href => "/"} Return to repositories
39
+
40
+ %h2
41
+ Readme for
42
+ = @repository.name
43
+
44
+ #readme
45
+ - if @rendered_readme
46
+ :preserve
47
+ #{@rendered_readme}
48
+ - else
49
+ %pre
50
+ :preserve
51
+ #{@plain_readme}
52
+