| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Pistachio::Css::Github; |
|
2
|
|
|
|
|
|
|
# ABSTRACT: provides methods which return CSS definitions, for a Github-like styling |
|
3
|
|
|
|
|
|
|
|
|
4
|
4
|
|
|
4
|
|
30345
|
use strict; |
|
|
4
|
|
|
|
|
10
|
|
|
|
4
|
|
|
|
|
158
|
|
|
5
|
4
|
|
|
4
|
|
23
|
use warnings; |
|
|
4
|
|
|
|
|
7
|
|
|
|
4
|
|
|
|
|
796
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.10'; # VERSION |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# @param string $type Object type. |
|
10
|
|
|
|
|
|
|
# @return Pistachio::Css::Github |
|
11
|
|
|
|
|
|
|
sub new { |
|
12
|
5
|
|
|
5
|
0
|
17
|
my $type = shift; |
|
13
|
5
|
|
|
|
|
22
|
bless \$type, $type; |
|
14
|
|
|
|
|
|
|
} |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
# @param Pistachio::Css::Github |
|
17
|
|
|
|
|
|
|
# @return string css for the line count div |
|
18
|
|
|
|
|
|
|
sub number_strip { |
|
19
|
1
|
|
|
1
|
0
|
4
|
my @style = ( |
|
20
|
|
|
|
|
|
|
"font-family:Consolas,'Liberation Mono',Courier,monospace", |
|
21
|
|
|
|
|
|
|
'float:left', |
|
22
|
|
|
|
|
|
|
'background-color:#eee', |
|
23
|
|
|
|
|
|
|
'border-right:1px #999988 solid' |
|
24
|
|
|
|
|
|
|
); |
|
25
|
1
|
|
|
|
|
10
|
join ';', @style; |
|
26
|
|
|
|
|
|
|
} |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
# @param Pistachio::Css::Github |
|
29
|
|
|
|
|
|
|
# @return string css for a single line count number cell |
|
30
|
|
|
|
|
|
|
sub number_cell { |
|
31
|
1
|
|
|
1
|
0
|
89
|
my @style = ( |
|
32
|
|
|
|
|
|
|
'font-size:13px', |
|
33
|
|
|
|
|
|
|
'color:#999988', |
|
34
|
|
|
|
|
|
|
'display:block', |
|
35
|
|
|
|
|
|
|
'line-height:18px', |
|
36
|
|
|
|
|
|
|
'padding:0 8px', |
|
37
|
|
|
|
|
|
|
'margin:0', |
|
38
|
|
|
|
|
|
|
'border:0', |
|
39
|
|
|
|
|
|
|
'text-align:right', |
|
40
|
|
|
|
|
|
|
'border-spacing:2px' |
|
41
|
|
|
|
|
|
|
); |
|
42
|
1
|
|
|
|
|
20
|
join ';', @style; |
|
43
|
|
|
|
|
|
|
} |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
# @param Pistachio::Css::Github |
|
46
|
|
|
|
|
|
|
# @return string css for the div containing source code token spans |
|
47
|
|
|
|
|
|
|
sub code_div { |
|
48
|
2
|
|
|
2
|
0
|
14
|
my @style = ( |
|
49
|
|
|
|
|
|
|
"font-family:Consolas,'Liberation Mono',Courier,monospace", |
|
50
|
|
|
|
|
|
|
'padding:0 8px 0 11px', |
|
51
|
|
|
|
|
|
|
'white-space:pre', |
|
52
|
|
|
|
|
|
|
'font-size:13px', |
|
53
|
|
|
|
|
|
|
'line-height:18px', |
|
54
|
|
|
|
|
|
|
'float:left' |
|
55
|
|
|
|
|
|
|
); |
|
56
|
2
|
|
|
|
|
55
|
join ';', @style; |
|
57
|
|
|
|
|
|
|
} |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
1; |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
__END__ |