@sfirew/minecraft-motd-parser 1.1.3 → 1.1.5-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,307 +1,211 @@
1
1
  # Minecraft Server MOTD Parser
2
+
2
3
  ![Version](https://img.shields.io/github/languages/top/SnowFireWolf/minecraft-motd-parser?style=for-the-badge)
3
4
  [![npm version](https://img.shields.io/npm/v/@sfirew/minecraft-motd-parser?label=version&style=for-the-badge)](https://www.npmjs.com/package/@sfirew/minecraft-motd-parser?style=for-the-badge)
4
5
  [![License](https://img.shields.io/npm/l/minecraft-server-util?style=for-the-badge)](https://github.com/SnowFireWolf/minecraft-motd-parser/blob/master/LICENSE)
5
6
  ![npm weekly downloads](https://img.shields.io/npm/dw/@sfirew/minecraft-motd-parser?style=for-the-badge)
6
7
 
8
+ A powerful and lightweight library to parse Minecraft server MOTD (Message of the Day) data into various formats.
9
+
10
+
11
+
12
+ ## Table of Contents
7
13
 
14
+ - [Features](#features)
15
+ - [Installation](#installation)
16
+ - [Quick Start](#quick-start)
17
+ - [API Reference](#api-reference)
18
+ - [Auto Detection](#auto-detection)
19
+ - [Text Parsing](#text-parsing)
20
+ - [JSON Parsing](#json-parsing)
21
+ - [Clean Text](#clean-text)
22
+ - [Examples](#examples)
23
+ - [Visual Examples](#visual-examples)
24
+ - [Contributing](#contributing)
8
25
 
9
- ## Introduction
10
- This package support **CommonJS**, **ES Module**, and **tree shaking**
11
26
 
12
- Can convert minecraft server MOTD data to text, json, html, and clean codes.
13
27
 
14
- Support **1.16** custom **hex color**, and auto check motd data type.
28
+ ## Features
15
29
 
16
- Don't have other dependencies.
30
+ **Zero Dependencies** - Lightweight and fast
31
+ 🔄 **Auto Detection** - Automatically detects MOTD data type
32
+ 🎨 **Multiple Formats** - Convert to HTML, JSON, or clean text
33
+ 🌈 **Full Color Support** - Including Minecraft 1.16+ hex colors
34
+ 📦 **Module Support** - CommonJS, ES Modules, and tree shaking
35
+ 🎯 **TypeScript Ready** - Full TypeScript support
17
36
 
18
37
 
19
38
 
20
39
  ## Installation
21
- choose your favorite package manager
40
+
41
+ Choose your favorite package manager:
42
+
22
43
  ```bash
23
44
  # npm
24
- $ npm install @sfirew/minecraft-motd-parser
45
+ npm install @sfirew/minecraft-motd-parser
25
46
 
26
47
  # yarn
27
- $ yarn add @sfirew/minecraft-motd-parser
48
+ yarn add @sfirew/minecraft-motd-parser
28
49
 
29
50
  # pnpm
30
- $ pnpm add @sfirew/minecraft-motd-parser
51
+ pnpm add @sfirew/minecraft-motd-parser
31
52
  ```
32
53
 
33
54
 
34
55
 
35
- ## Usage
36
- ### CommonJS
37
- ```typescript
38
- const { autoToHTML } = require('@sfirew/minecraft-motd-parser');
39
- ```
56
+ ## Quick Start
40
57
 
41
58
  ### ES6 Modules
42
59
  ```typescript
43
60
  import { autoToHTML } from '@sfirew/minecraft-motd-parser'
61
+
62
+ const motd = "§aHypixel Network §7§c1.8/1.9/1.10/1.11/1.12 §e§lNEW PTL GAME:§b§l THE BRIDGE";
63
+ const html = autoToHTML(motd);
64
+ console.log(html);
44
65
  ```
45
66
 
46
- ### Simple use example
67
+ ### CommonJS
47
68
  ```typescript
48
- import { autoToHTML as motdParser } from '@sfirew/minecraft-motd-parser'
49
- // or
50
- import motdParser from '@sfirew/minecraft-motd-parser'
51
- // motdParser.autoToHTML('motdString...');
52
-
53
- const hypixelMotdString = "§aHypixel Network §7§c1.8/1.9/1.10/1.11/1.12 §e§lNEW PTL GAME:§b§l THE BRIDGE";
54
-
55
- console.log(motdParser(hypixelMotdString));
56
-
57
- /* result
58
- <span style="color:#55FF55;">Hypixel Network </span><span style="color:#FF5555;">1.8/1.9/1.10/1.11/1.12 </span><span style="color:#FFFF55;font-weight: bold;">NEW PTL GAME:</span><span style="color:#55FFFF;font-weight: bold;"> THE BRIDGE</span>
59
- */
69
+ const { autoToHTML } = require('@sfirew/minecraft-motd-parser');
60
70
  ```
61
71
 
72
+ ### Default Import
73
+ ```typescript
74
+ import motdParser from '@sfirew/minecraft-motd-parser'
75
+ motdParser.autoToHTML('motdString...');
76
+ ```
62
77
 
63
- ### Some good custom motd hex color servers
64
- The parser does not have the Minecraft font by default.
65
78
 
66
- #### Minecraft font example
67
- ![Image_2022_01_2022d-2022h_58___002](https://user-images.githubusercontent.com/14024836/149810729-71909ca5-5705-43cf-ab3c-bdd66db00b78.png)
68
79
 
69
- ![Image_2022_01_2022d-2022h_00___004](https://user-images.githubusercontent.com/14024836/149811040-5ddc35a0-38cf-4434-856a-968c94a4d6b4.png)
80
+ ## API Reference
70
81
 
71
- #### No Minecraft font
72
- ![Image_2022_01_2022d-2022h_04___003](https://user-images.githubusercontent.com/14024836/149811501-d1376d90-d9ad-4092-912a-de1f78fa42eb.png)
82
+ ### Auto Detection
73
83
 
74
- ![Image_2022_01_2022d-2022h_01___002](https://user-images.githubusercontent.com/14024836/149811151-d9270d63-aead-46f9-b496-c88eb3b00c72.png)
84
+ #### `autoToHTML(data: string | object): string`
85
+ Automatically detects the MOTD data type and converts it to HTML.
75
86
 
87
+ ```typescript
88
+ import { autoToHTML } from '@sfirew/minecraft-motd-parser'
76
89
 
77
- You can try server status view in my created service
78
- [https://mcsv.top/server/mc.hypixel.net](https://mcsv.top/server/mc.hypixel.net)
90
+ // Works with both text and JSON formats
91
+ const textMOTD = "§aHypixel Network §c1.8-1.19";
92
+ const jsonMOTD = { text: "", extra: [{ color: "green", text: "Hello World" }] };
79
93
 
94
+ console.log(autoToHTML(textMOTD));
95
+ console.log(autoToHTML(jsonMOTD));
96
+ ```
80
97
 
98
+ #### `autoCleanToText(data: string | object): string`
99
+ Automatically detects the MOTD data type and returns clean text without formatting codes.
81
100
 
82
- ## Example and main formatter
83
- Some examples here, you can use **TypeScript** or **JavaScript**.
101
+ ```typescript
102
+ import { autoCleanToText } from '@sfirew/minecraft-motd-parser'
84
103
 
104
+ const motd = "§aHypixel Network §c1.8-1.19";
105
+ console.log(autoCleanToText(motd)); // "Hypixel Network 1.8-1.19"
106
+ ```
85
107
 
108
+ ### Text Parsing
86
109
 
87
- ### `autoToHTML(string | object)`
88
- auto check MOTD data type then return same html result.
110
+ #### `textToHTML(text: string): string`
111
+ Converts MOTD text format to HTML.
89
112
 
90
113
  ```typescript
91
- import motdParser from '@sfirew/minecraft-motd-parser'
114
+ import { textToHTML } from '@sfirew/minecraft-motd-parser'
92
115
 
93
- let jsonExample = {
94
- "extra": [
95
- {
96
- "bold": true,
97
- "color": "gold",
98
- "text": "Viper "
99
- },
100
- {
101
- "color": "gray",
102
- "text": "┃ "
103
- },
104
- {
105
- "color": "yellow",
106
- "text": "Summer Sale"
107
- },
108
- {
109
- "color": "white",
110
- "text": " at "
111
- },
112
- {
113
- "color": "gold",
114
- "text": "store.vipermc.net\n"
115
- },
116
- {
117
- "color": "gray",
118
- "text": "► "
119
- },
120
- {
121
- "color": "yellow",
122
- "text": "EOTW "
123
- },
124
- {
125
- "color": "white",
126
- "text": "on "
127
- },
128
- {
129
- "color": "gold",
130
- "text": "Infernal"
131
- },
132
- {
133
- "color": "white",
134
- "text": " is this Thursday at "
135
- },
136
- {
137
- "color": "yellow",
138
- "text": "5PM ET"
139
- },
140
- {
141
- "color": "white",
142
- "text": "."
143
- }
144
- ],
145
- "text": ""
146
- };
147
- let autoJsonResult = motdParser.autoToHTML(jsonExample);
148
- console.log(autoJsonResult);
149
-
150
- /* auto JSON Result, callback HTML:
151
- <span style="color: #FFAA00;font-weight: bold;">Viper </span><span style="color: #AAAAAA;">┃ </span><span style="color: #FFFF55;">Summer Sale</span><span style="color: #FFFFFF;"> at </span><span style="color: #FFAA00;">store.vipermc.net<br/></span><span style="color: #AAAAAA;">► </span><span style="color: #FFFF55;">EOTW </span><span style="color: #FFFFFF;">on </span><span style="color: #FFAA00;">Infernal</span><span style="color: #FFFFFF;"> is this Thursday at </span><span style="color: #FFFF55;">5PM ET</span><span style="color: #FFFFFF;">.</span>
152
- */
153
-
154
- let textExample = "§aHypixel Network §7§c1.8/1.9/1.10/1.11/1.12 §e§lNEW PTL GAME:§b§l THE BRIDGE";
155
- let autoTextResult = motdParser.autoToHTML(textExample);
156
- console.log(autoTextResult);
157
-
158
- /* auto Text Result, callback HTML:
159
- <span style="color: #55FF55;">Hypixel Network <span style="color: #AAAAAA;"><span style="color: #FF5555;">1.8/1.9/1.10/1.11/1.12 <span style="color: #FFFF55;"><span style="font-weight: bold;">NEW PTL GAME:<span style="color: acqua;"><span style="font-weight: bold;"> THE BRIDGE</span></span></span></span></span></span></span>
160
- */
116
+ const motd = "§aGreen §lBold §rReset §cRed";
117
+ const html = textToHTML(motd);
118
+ // Output: <span style="color:#55FF55;">Green <span style="font-weight:bold;">Bold </span></span><span style="color:#FF5555;">Red</span>
161
119
  ```
162
120
 
121
+ #### `textToJSON(text: string): object`
122
+ Converts MOTD text format to JSON structure.
163
123
 
124
+ ```typescript
125
+ import { textToJSON } from '@sfirew/minecraft-motd-parser'
164
126
 
127
+ const motd = "§aHello §bWorld";
128
+ const json = textToJSON(motd);
129
+ console.log(json);
130
+ ```
165
131
 
132
+ ### JSON Parsing
166
133
 
134
+ #### `JSONToHTML(json: object): string`
135
+ Converts MOTD JSON format to HTML.
167
136
 
168
- ## clean codes formatter
169
- ### `cleanCodes(string)`
170
- clean motd text color codes.
171
137
  ```typescript
172
- import motdParser from '@sfirew/minecraft-motd-parser'
173
- import { cleanCodes } from '@sfirew/minecraft-motd-parser'
138
+ import { JSONToHTML } from '@sfirew/minecraft-motd-parser'
174
139
 
175
- const motdText = "§aHypixel Network §7§c1.8/1.9/1.10/1.11/1.12 §e§lNEW PTL GAME:§b§l THE BRIDGE";
176
- const result = cleanCodes(motdText);
177
- console.log(result);
140
+ const motdJson = {
141
+ text: "",
142
+ extra: [
143
+ { color: "green", text: "Hello " },
144
+ { color: "blue", text: "World", bold: true }
145
+ ]
146
+ };
178
147
 
179
- /* result, callback Text:
180
- * Hypixel Network 1.8/1.9/1.10/1.11/1.12 NEW PTL GAME: THE BRIDGE
181
- */
148
+ const html = JSONToHTML(motdJson);
182
149
  ```
183
150
 
151
+ ### Clean Text
184
152
 
153
+ #### `cleanCodes(text: string): string`
154
+ Removes all formatting codes from MOTD text.
185
155
 
186
- ### `autoCleanToText(string | object)`
187
- auto check MOTD data type then return same cleaned text.
188
156
  ```typescript
189
- import motdParser from '@sfirew/minecraft-motd-parser'
190
- import { autoCleanToText } from '@sfirew/minecraft-motd-parser'
191
-
192
- const motdText = "§aHypixel Network §7§c1.8/1.9/1.10/1.11/1.12 §e§lNEW PTL GAME:§b§l THE BRIDGE";
193
- const result = autoCleanToText(motdText);
194
- console.log(result);
157
+ import { cleanCodes } from '@sfirew/minecraft-motd-parser'
195
158
 
196
- /* result, callback Text:
197
- * Hypixel Network 1.8/1.9/1.10/1.11/1.12 NEW PTL GAME: THE BRIDGE
198
- */
159
+ const motd = "§aHypixel Network §c1.8-1.19";
160
+ const clean = cleanCodes(motd);
161
+ console.log(clean); // "Hypixel Network 1.8-1.19"
199
162
  ```
200
163
 
201
164
 
202
165
 
166
+ ## Examples
203
167
 
168
+ ### Complex MOTD with Multiple Formats
204
169
 
205
-
206
- ## origin formatter
207
- ### `textToHTML(string)`
208
- convert motd text to html.
209
170
  ```typescript
210
- let motdText = "§aHypixel Network §7§c1.8/1.9/1.10/1.11/1.12 §e§lNEW PTL GAME:§b§l THE BRIDGE";
211
- let result = motdParser.textToHTML(motdText);
212
- console.log(result);
171
+ import motdParser from '@sfirew/minecraft-motd-parser'
213
172
 
214
- /* result, callback HTML:
215
- * <span style="color: #55FF55;">Hypixel Network <span style="color: #AAAAAA;"><span style="color: #FF5555;">1.8/1.9/1.10/1.11/1.12 <span style="color: #FFFF55;"><span style="font-weight: bold;">NEW PTL GAME:<span style="color: acqua;"><span style="font-weight: bold;"> THE BRIDGE</span></span></span></span></span></span></span>
216
- */
173
+ // Text format example
174
+ const textExample = "§aHypixel Network §7§c1.8/1.9/1.10/1.11/1.12 §e§lNEW PTL GAME:§b§l THE BRIDGE";
175
+ console.log(motdParser.autoToHTML(textExample));
176
+
177
+ // JSON format example
178
+ const jsonExample = {
179
+ "text": "",
180
+ "extra": [
181
+ { "bold": true, "color": "gold", "text": "Viper " },
182
+ { "color": "gray", "text": "┃ " },
183
+ { "color": "yellow", "text": "Summer Sale" },
184
+ { "color": "white", "text": " at " },
185
+ { "color": "gold", "text": "store.vipermc.net\n" }
186
+ ]
187
+ };
188
+ console.log(motdParser.autoToHTML(jsonExample));
217
189
  ```
218
190
 
219
- ![Image_2021_08_2021d-2021h_23___001](https://user-images.githubusercontent.com/14024836/129277576-e94914f3-35f7-45a6-8ba3-58163f71d5a1.png)
191
+ ## Visual Examples
220
192
 
193
+ The parser supports rich formatting including colors, bold, italic, underline, and strikethrough text.
221
194
 
195
+ ### With Minecraft Font
196
+ ![Minecraft Font Example](https://user-images.githubusercontent.com/14024836/149810729-71909ca5-5705-43cf-ab3c-bdd66db00b78.png)
222
197
 
198
+ ### Standard Font
199
+ ![Standard Font Example](https://user-images.githubusercontent.com/14024836/149811501-d1376d90-d9ad-4092-912a-de1f78fa42eb.png)
223
200
 
224
- ### `textToJSON(string)`
225
- convert motd json to html.
226
- ```typescript
227
- let motdText = "§aHypixel Network §7§c1.8/1.9/1.10/1.11/1.12 §e§lNEW PTL GAME:§b§l THE BRIDGE";
228
- let result = motdParser.textToJSON(motdText);
229
- console.log(result);
201
+ > **Try it live**: Check out the [Minecraft Server Status Viewer](https://mcsv.top/server/mc.hypixel.net) to see the parser in action.
230
202
 
231
- /* result, callback JSON:
232
- {
233
- text: '',
234
- extra: [
235
- { text: '', extra: [] },
236
- { text: 'Hypixel Network ', extra: [], color: '#55FF55' },
237
- { text: '', extra: [], color: '#AAAAAA' },
238
- { text: '1.8/1.9/1.10/1.11/1.12 ', extra: [], color: '#FF5555' },
239
- { text: '', extra: [], color: '#FFFF55' },
240
- { text: 'NEW PTL GAME:', extra: [], bold: true, color: '#FFFF55' },
241
- { text: '', extra: [], bold: true, color: '#55FFFF' },
242
- { text: ' THE BRIDGE', extra: [], bold: true, color: '#55FFFF' }
243
- ]
244
- }
245
- */
246
- ```
203
+ ## Contributing
247
204
 
205
+ Contributions are welcome! Please feel free to submit a Pull Request.
248
206
 
249
- ### `JSONToHTML(object)`
250
- convert text to motd json.
251
- ```typescript
252
- let mcfalloutJson = {
253
- "extra": [
254
- {
255
- "color": "gray",
256
- "text": " "
257
- },
258
- {
259
- "color": "gold",
260
- "text": "廢土伺服器 "
261
- },
262
- {
263
- "color": "white",
264
- "text": "mcFallout.net"
265
- },
266
- {
267
- "color": "dark_gray",
268
- "text": " - "
269
- },
270
- {
271
- "color": "gray",
272
- "text": "版本 1.17.1 "
273
- },
274
- {
275
- "color": "gold",
276
- "text": "洞穴"
277
- },
278
- {
279
- "color": "light_purple",
280
- "text": "與"
281
- },
282
- {
283
- "color": "aqua",
284
- "text": "山崖\n"
285
- },
286
- {
287
- "color": "gray",
288
- "text": " "
289
- },
290
- {
291
- "color": "dark_gray",
292
- "text": "享受工廠、農場、建築與紅石"
293
- }
294
- ],
295
- "text": ""
296
- }
297
- let result = motdParser.JSONToHTML(mcfalloutJson);
298
- console.log(result)
299
-
300
- /* result, callback HTML:
301
- <span style="color: #AAAAAA;">  </span><span style="color: #FFAA00;">廢土伺服器  </span><span style="color: #FFFFFF;">mcFallout.net</span><span style="color: #555555;"> - </span><span style="color: #AAAAAA;">版本 1.17.1 </span><span style="color: #FFAA00;">洞穴</span><span style="color: #FF55FF;">與</span><span style="color: #55FFFF;">山崖<br/></span><span style="color: #AAAAAA;">  </span><span style="color: #555555;">享受工廠、農場、建築與紅石</span>
302
- */
303
- ```
207
+ ## License
304
208
 
305
- ![Image_2021_08_2021d-2021h_24___001](https://user-images.githubusercontent.com/14024836/129277638-fe8c5735-54fe-4ff1-afc5-4b5493706be9.png)
209
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
306
210
 
307
211
 
@@ -0,0 +1,224 @@
1
+ body, html {
2
+ margin:0; padding: 0;
3
+ height: 100%;
4
+ }
5
+ body {
6
+ font-family: Helvetica Neue, Helvetica, Arial;
7
+ font-size: 14px;
8
+ color:#333;
9
+ }
10
+ .small { font-size: 12px; }
11
+ *, *:after, *:before {
12
+ -webkit-box-sizing:border-box;
13
+ -moz-box-sizing:border-box;
14
+ box-sizing:border-box;
15
+ }
16
+ h1 { font-size: 20px; margin: 0;}
17
+ h2 { font-size: 14px; }
18
+ pre {
19
+ font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace;
20
+ margin: 0;
21
+ padding: 0;
22
+ -moz-tab-size: 2;
23
+ -o-tab-size: 2;
24
+ tab-size: 2;
25
+ }
26
+ a { color:#0074D9; text-decoration:none; }
27
+ a:hover { text-decoration:underline; }
28
+ .strong { font-weight: bold; }
29
+ .space-top1 { padding: 10px 0 0 0; }
30
+ .pad2y { padding: 20px 0; }
31
+ .pad1y { padding: 10px 0; }
32
+ .pad2x { padding: 0 20px; }
33
+ .pad2 { padding: 20px; }
34
+ .pad1 { padding: 10px; }
35
+ .space-left2 { padding-left:55px; }
36
+ .space-right2 { padding-right:20px; }
37
+ .center { text-align:center; }
38
+ .clearfix { display:block; }
39
+ .clearfix:after {
40
+ content:'';
41
+ display:block;
42
+ height:0;
43
+ clear:both;
44
+ visibility:hidden;
45
+ }
46
+ .fl { float: left; }
47
+ @media only screen and (max-width:640px) {
48
+ .col3 { width:100%; max-width:100%; }
49
+ .hide-mobile { display:none!important; }
50
+ }
51
+
52
+ .quiet {
53
+ color: #7f7f7f;
54
+ color: rgba(0,0,0,0.5);
55
+ }
56
+ .quiet a { opacity: 0.7; }
57
+
58
+ .fraction {
59
+ font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
60
+ font-size: 10px;
61
+ color: #555;
62
+ background: #E8E8E8;
63
+ padding: 4px 5px;
64
+ border-radius: 3px;
65
+ vertical-align: middle;
66
+ }
67
+
68
+ div.path a:link, div.path a:visited { color: #333; }
69
+ table.coverage {
70
+ border-collapse: collapse;
71
+ margin: 10px 0 0 0;
72
+ padding: 0;
73
+ }
74
+
75
+ table.coverage td {
76
+ margin: 0;
77
+ padding: 0;
78
+ vertical-align: top;
79
+ }
80
+ table.coverage td.line-count {
81
+ text-align: right;
82
+ padding: 0 5px 0 20px;
83
+ }
84
+ table.coverage td.line-coverage {
85
+ text-align: right;
86
+ padding-right: 10px;
87
+ min-width:20px;
88
+ }
89
+
90
+ table.coverage td span.cline-any {
91
+ display: inline-block;
92
+ padding: 0 5px;
93
+ width: 100%;
94
+ }
95
+ .missing-if-branch {
96
+ display: inline-block;
97
+ margin-right: 5px;
98
+ border-radius: 3px;
99
+ position: relative;
100
+ padding: 0 4px;
101
+ background: #333;
102
+ color: yellow;
103
+ }
104
+
105
+ .skip-if-branch {
106
+ display: none;
107
+ margin-right: 10px;
108
+ position: relative;
109
+ padding: 0 4px;
110
+ background: #ccc;
111
+ color: white;
112
+ }
113
+ .missing-if-branch .typ, .skip-if-branch .typ {
114
+ color: inherit !important;
115
+ }
116
+ .coverage-summary {
117
+ border-collapse: collapse;
118
+ width: 100%;
119
+ }
120
+ .coverage-summary tr { border-bottom: 1px solid #bbb; }
121
+ .keyline-all { border: 1px solid #ddd; }
122
+ .coverage-summary td, .coverage-summary th { padding: 10px; }
123
+ .coverage-summary tbody { border: 1px solid #bbb; }
124
+ .coverage-summary td { border-right: 1px solid #bbb; }
125
+ .coverage-summary td:last-child { border-right: none; }
126
+ .coverage-summary th {
127
+ text-align: left;
128
+ font-weight: normal;
129
+ white-space: nowrap;
130
+ }
131
+ .coverage-summary th.file { border-right: none !important; }
132
+ .coverage-summary th.pct { }
133
+ .coverage-summary th.pic,
134
+ .coverage-summary th.abs,
135
+ .coverage-summary td.pct,
136
+ .coverage-summary td.abs { text-align: right; }
137
+ .coverage-summary td.file { white-space: nowrap; }
138
+ .coverage-summary td.pic { min-width: 120px !important; }
139
+ .coverage-summary tfoot td { }
140
+
141
+ .coverage-summary .sorter {
142
+ height: 10px;
143
+ width: 7px;
144
+ display: inline-block;
145
+ margin-left: 0.5em;
146
+ background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
147
+ }
148
+ .coverage-summary .sorted .sorter {
149
+ background-position: 0 -20px;
150
+ }
151
+ .coverage-summary .sorted-desc .sorter {
152
+ background-position: 0 -10px;
153
+ }
154
+ .status-line { height: 10px; }
155
+ /* yellow */
156
+ .cbranch-no { background: yellow !important; color: #111; }
157
+ /* dark red */
158
+ .red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
159
+ .low .chart { border:1px solid #C21F39 }
160
+ .highlighted,
161
+ .highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{
162
+ background: #C21F39 !important;
163
+ }
164
+ /* medium red */
165
+ .cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE }
166
+ /* light red */
167
+ .low, .cline-no { background:#FCE1E5 }
168
+ /* light green */
169
+ .high, .cline-yes { background:rgb(230,245,208) }
170
+ /* medium green */
171
+ .cstat-yes { background:rgb(161,215,106) }
172
+ /* dark green */
173
+ .status-line.high, .high .cover-fill { background:rgb(77,146,33) }
174
+ .high .chart { border:1px solid rgb(77,146,33) }
175
+ /* dark yellow (gold) */
176
+ .status-line.medium, .medium .cover-fill { background: #f9cd0b; }
177
+ .medium .chart { border:1px solid #f9cd0b; }
178
+ /* light yellow */
179
+ .medium { background: #fff4c2; }
180
+
181
+ .cstat-skip { background: #ddd; color: #111; }
182
+ .fstat-skip { background: #ddd; color: #111 !important; }
183
+ .cbranch-skip { background: #ddd !important; color: #111; }
184
+
185
+ span.cline-neutral { background: #eaeaea; }
186
+
187
+ .coverage-summary td.empty {
188
+ opacity: .5;
189
+ padding-top: 4px;
190
+ padding-bottom: 4px;
191
+ line-height: 1;
192
+ color: #888;
193
+ }
194
+
195
+ .cover-fill, .cover-empty {
196
+ display:inline-block;
197
+ height: 12px;
198
+ }
199
+ .chart {
200
+ line-height: 0;
201
+ }
202
+ .cover-empty {
203
+ background: white;
204
+ }
205
+ .cover-full {
206
+ border-right: none !important;
207
+ }
208
+ pre.prettyprint {
209
+ border: none !important;
210
+ padding: 0 !important;
211
+ margin: 0 !important;
212
+ }
213
+ .com { color: #999 !important; }
214
+ .ignore-none { color: #999; font-weight: normal; }
215
+
216
+ .wrapper {
217
+ min-height: 100%;
218
+ height: auto !important;
219
+ height: 100%;
220
+ margin: 0 auto -48px;
221
+ }
222
+ .footer, .push {
223
+ height: 48px;
224
+ }