File Coverage

blib/lib/WebServer/DirIndex/CSS.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1 2     2   102531 use strict;
  2         3  
  2         63  
2 2     2   24 use warnings;
  2         4  
  2         105  
3 2     2   418 use Feature::Compat::Class;
  2         394  
  2         14  
4              
5             class WebServer::DirIndex::CSS v0.1.0 {
6              
7             field $pretty :param = 0;
8              
9             field $standard_css :reader = <
10             table {
11             width: 100%;
12             }
13             .icon {
14             width: 1.5em;
15             text-align: center;
16             }
17             .name {
18             text-align: left;
19             }
20             .size, .mtime {
21             text-align: right;
22             }
23             .type {
24             width: 11em;
25             }
26             .mtime {
27             width: 15em;
28             }
29             CSS
30              
31             field $pretty_css :reader = <
32             body {
33             color: #000;
34             background-color: #fff;
35             font-family: Calibri, Candara, Segoe, Segoe UI, Helvetica Neue, Helvetica, Optima, Arial, sans-serif;
36             font-size: normal 1em sans-serif;
37             text-align: center;
38             padding: 0;
39             margin: 0;
40             }
41              
42             h2 {
43             font-size: 2.000em;
44             font-weight: 700;
45             }
46              
47             table {
48             width: 90%;
49             margin: 3em;
50             border: 1px solid #aaa;
51             border-collapse: collapse;
52             background-color: #eee;
53             }
54              
55             thead {
56             background-color: #bbb;
57             font-weight: 700;
58             font-size: 1.300em;
59             }
60              
61             td, th {
62             padding: 1em;
63             text-align: left;
64             border-bottom: 1px solid #999999;
65             color: #000;
66             }
67              
68             tr:nth-child(even) {
69             background: #ccc;
70             }
71              
72             .icon {
73             width: 1.5em;
74             text-align: center;
75             }
76              
77             .size {
78             text-align: right;
79             padding-right: 1.700em;
80             }
81              
82             a:link {
83             font-size: 1.200em;
84             font-weight: 500;
85             color: #000;
86             text-decoration: none;
87             }
88              
89             a:link:hover {
90             text-decoration: underline;
91             }
92              
93             a:visited {
94             font-size: 1.200em;
95             font-weight: 500;
96             color: #301934;
97             text-decoration: none;
98             }
99             CSS
100              
101             method css {
102             return $pretty ? $pretty_css : $standard_css;
103             }
104             }
105              
106             1;
107              
108             __END__