... | ... |
@@ -0,0 +1,108 @@ |
1 |
+/* Offset */ |
|
2 |
+.offset1-mini { |
|
3 |
+ margin-left: 88px; |
|
4 |
+} |
|
5 |
+ |
|
6 |
+/* Font color */ |
|
7 |
+.font-black { |
|
8 |
+ color: #333; |
|
9 |
+} |
|
10 |
+.font-white { |
|
11 |
+ color: white; |
|
12 |
+} |
|
13 |
+ |
|
14 |
+/* Background color */ |
|
15 |
+.bk-blue-light { |
|
16 |
+ background-color:#E6F1F6; |
|
17 |
+} |
|
18 |
+.bk-black { |
|
19 |
+ background-color:black; |
|
20 |
+} |
|
21 |
+.bk-gray-light { |
|
22 |
+ background-color:#eee; |
|
23 |
+} |
|
24 |
+ |
|
25 |
+/* Padding */ |
|
26 |
+.vpadding5 { |
|
27 |
+ padding-top:5px; |
|
28 |
+ padding-bottom:5px; |
|
29 |
+} |
|
30 |
+.padding5 { |
|
31 |
+ padding:5px; |
|
32 |
+} |
|
33 |
+/* space */ |
|
34 |
+.space5 { |
|
35 |
+ display:inline-block; |
|
36 |
+ width:5px; |
|
37 |
+} |
|
38 |
+ |
|
39 |
+/* Vritical space */ |
|
40 |
+.vspace5 { |
|
41 |
+ margin-top:5px; |
|
42 |
+} |
|
43 |
+.vspace10 { |
|
44 |
+ margin-top:10px; |
|
45 |
+} |
|
46 |
+.vspace15 { |
|
47 |
+ margin-top:15px; |
|
48 |
+} |
|
49 |
+.vspace20 { |
|
50 |
+ margin-top:20px; |
|
51 |
+} |
|
52 |
+.vspace25 { |
|
53 |
+ margin-top:25px; |
|
54 |
+} |
|
55 |
+.vspace30 { |
|
56 |
+ margin-top:30px; |
|
57 |
+} |
|
58 |
+ |
|
59 |
+/* Border */ |
|
60 |
+.border-bottom-none { |
|
61 |
+ border-bottom:none; |
|
62 |
+} |
|
63 |
+.border-gray { |
|
64 |
+ border:1px solid #ccc; |
|
65 |
+} |
|
66 |
+.border-top-gray { |
|
67 |
+ border-top:1px solid #ccc; |
|
68 |
+} |
|
69 |
+.border-bottom-gray { |
|
70 |
+ border-bottom:1px solid #ccc; |
|
71 |
+} |
|
72 |
+.border-3-gray { |
|
73 |
+ border-left:1px solid #ccc; |
|
74 |
+ border-bottom:1px solid #ccc; |
|
75 |
+ border-right:1px solid #ccc; |
|
76 |
+} |
|
77 |
+ |
|
78 |
+.corner-left-none { |
|
79 |
+ border-top-left-radius:0; |
|
80 |
+ border-bottom-left-radius:0; |
|
81 |
+ margin-left:0; |
|
82 |
+} |
|
83 |
+.corner-right-none { |
|
84 |
+ border-top-right-radius:0; |
|
85 |
+ border-bottom-right-radius:0; |
|
86 |
+ margin-right:0; |
|
87 |
+} |
|
88 |
+ |
|
89 |
+/* Commit page */ |
|
90 |
+.file-add { |
|
91 |
+ margin-left:3px; |
|
92 |
+ padding:1px; |
|
93 |
+ line-height:10px; |
|
94 |
+ display:inline-block; |
|
95 |
+ color:#32CD32; |
|
96 |
+ border:2px #32CD32 solid; |
|
97 |
+ font-weight:bold; |
|
98 |
+} |
|
99 |
+ |
|
100 |
+.file-del { |
|
101 |
+ margin-left:3px; |
|
102 |
+ padding:1px; |
|
103 |
+ line-height:10px; |
|
104 |
+ display:inline-block; |
|
105 |
+ color:red; |
|
106 |
+ border:2px red solid; |
|
107 |
+ font-weight:bold; |
|
108 |
+} |
... | ... |
@@ -103,9 +103,9 @@ |
103 | 103 |
% my $from_mode_oct = $difftree->{from_mode_oct}; |
104 | 104 |
<td> |
105 | 105 |
% if ($status eq 'A') { |
106 |
- <div style="margin-left:3px;padding:1px;line-height:10px;display:inline-block;color:#32CD32;border:2px #32CD32 solid"><b>+</b></div> |
|
106 |
+ <span class="file-add">+</span> |
|
107 | 107 |
% } elsif ($status eq 'D') { |
108 |
- <div style="margin-left:3px;padding:1px;line-height:10px;display:inline-block;color:red;border:2px red solid"><b>-</b></div> |
|
108 |
+ <span class="file-del">-</span> |
|
109 | 109 |
% } elsif ($status eq 'M' || $status eq 'T') { |
110 | 110 |
% if ($from_mode != $mode) { |
111 | 111 |
<span> |
... | ... |
@@ -6,100 +6,11 @@ |
6 | 6 |
<title>GitPrep</title> |
7 | 7 |
%= stylesheet '/css/bootstrap.css', rel => 'stylesheet', media => 'screen'; |
8 | 8 |
%= stylesheet '/js/google-code-prettify/prettify.css'; |
9 |
+ %= stylesheet '/css/common.css'; |
|
9 | 10 |
%= javascript '/js/jquery-1.9.0.min.js'; |
10 | 11 |
%= javascript '/js/bootstrap.js'; |
11 | 12 |
|
12 | 13 |
<link rel="shortcut icon" href="<%= url_for('/git-favicon.png') %>" type="image/png" > |
13 |
- |
|
14 |
- %= stylesheet begin |
|
15 |
- /* Offset */ |
|
16 |
- .offset1-mini { |
|
17 |
- margin-left: 88px; |
|
18 |
- } |
|
19 |
- |
|
20 |
- /* Font color */ |
|
21 |
- .font-black { |
|
22 |
- color: #333; |
|
23 |
- } |
|
24 |
- .font-white { |
|
25 |
- color: white; |
|
26 |
- } |
|
27 |
- |
|
28 |
- /* Background color */ |
|
29 |
- .bk-blue-light { |
|
30 |
- background-color:#E6F1F6; |
|
31 |
- } |
|
32 |
- .bk-black { |
|
33 |
- background-color:black; |
|
34 |
- } |
|
35 |
- .bk-gray-light { |
|
36 |
- background-color:#eee; |
|
37 |
- } |
|
38 |
- |
|
39 |
- /* Padding */ |
|
40 |
- .vpadding5 { |
|
41 |
- padding-top:5px; |
|
42 |
- padding-bottom:5px; |
|
43 |
- } |
|
44 |
- .padding5 { |
|
45 |
- padding:5px; |
|
46 |
- } |
|
47 |
- /* space */ |
|
48 |
- .space5 { |
|
49 |
- display:inline-block; |
|
50 |
- width:5px; |
|
51 |
- } |
|
52 |
- |
|
53 |
- /* Vritical space */ |
|
54 |
- .vspace5 { |
|
55 |
- margin-top:5px; |
|
56 |
- } |
|
57 |
- .vspace10 { |
|
58 |
- margin-top:10px; |
|
59 |
- } |
|
60 |
- .vspace15 { |
|
61 |
- margin-top:15px; |
|
62 |
- } |
|
63 |
- .vspace20 { |
|
64 |
- margin-top:20px; |
|
65 |
- } |
|
66 |
- .vspace25 { |
|
67 |
- margin-top:25px; |
|
68 |
- } |
|
69 |
- .vspace30 { |
|
70 |
- margin-top:30px; |
|
71 |
- } |
|
72 |
- |
|
73 |
- /* Border */ |
|
74 |
- .border-bottom-none { |
|
75 |
- border-bottom:none; |
|
76 |
- } |
|
77 |
- .border-gray { |
|
78 |
- border:1px solid #ccc; |
|
79 |
- } |
|
80 |
- .border-top-gray { |
|
81 |
- border-top:1px solid #ccc; |
|
82 |
- } |
|
83 |
- .border-bottom-gray { |
|
84 |
- border-bottom:1px solid #ccc; |
|
85 |
- } |
|
86 |
- .border-3-gray { |
|
87 |
- border-left:1px solid #ccc; |
|
88 |
- border-bottom:1px solid #ccc; |
|
89 |
- border-right:1px solid #ccc; |
|
90 |
- } |
|
91 |
- |
|
92 |
- .corner-left-none { |
|
93 |
- border-top-left-radius:0; |
|
94 |
- border-bottom-left-radius:0; |
|
95 |
- margin-left:0; |
|
96 |
- } |
|
97 |
- .corner-right-none { |
|
98 |
- border-top-right-radius:0; |
|
99 |
- border-bottom-right-radius:0; |
|
100 |
- margin-right:0; |
|
101 |
- } |
|
102 |
- % end |
|
103 | 14 |
</head> |
104 | 15 |
<body> |
105 | 16 |
%= content; |
... | ... |
@@ -14,8 +14,7 @@ my $t = Test::Mojo->new($app); |
14 | 14 |
my $user = 'kimoto'; |
15 | 15 |
my $project = 'gitprep_t'; |
16 | 16 |
|
17 |
-# First commit |
|
18 |
-subtest 'first commit' => sub { |
|
17 |
+subtest 'Commit page - first commit' => sub { |
|
19 | 18 |
# Page access |
20 | 19 |
$t->get_ok("/$user/$project/commit/4b0e81c462088b16fefbe545e00b993fd7e6f884"); |
21 | 20 |
|
... | ... |
@@ -23,6 +22,19 @@ subtest 'first commit' => sub { |
23 | 22 |
$t->content_like(qr/first commit/); |
24 | 23 |
|
25 | 24 |
# Parent not eixsts |
26 |
- $t->content_like(qr/0 <span class="muted">parent/); |
|
25 |
+ $t->content_like(qr/0 <span .*?>parent/); |
|
26 |
+ |
|
27 |
+ # Commit id |
|
28 |
+ $t->content_like(qr/4b0e81c462088b16fefbe545e00b993fd7e6f884/); |
|
29 |
+ |
|
30 |
+ # Author |
|
31 |
+ $t->content_like(qr/Yuki Kimoto/); |
|
32 |
+ |
|
33 |
+ # File change count |
|
34 |
+ $t->content_like(qr/1 changed files/); |
|
35 |
+ |
|
36 |
+ # Added README |
|
37 |
+ $t->content_like(qr/class="file-add".*?README/s); |
|
38 |
+ |
|
27 | 39 |
}; |
28 | 40 |
|