| 72:93de83b09c2d | 73:707f42bb0484 |
|---|---|
| 71 } | 71 } |
| 72 return buffer; | 72 return buffer; |
| 73 } | 73 } |
| 74 } | 74 } |
| 75 | 75 |
| 76 void html::open(bool fragment, unsigned char fragment_indent) { | 76 void html::styles_and_script() { |
| 77 if (fragment) { | 77 puts(R"( <style> |
| 78 indent(fragment_indent); | |
| 79 puts("<div class=\"heatmap-content\">"); | |
| 80 indentation++; | |
| 81 } else { | |
| 82 puts(R"(<!DOCTYPE html> | |
| 83 <html> | |
| 84 <head> | |
| 85 <meta charset="UTF-8"> | |
| 86 <style> | |
| 87 table.heatmap { | 78 table.heatmap { |
| 88 table-layout: fixed; | 79 table-layout: fixed; |
| 89 border-collapse: separate; | 80 border-collapse: separate; |
| 90 border-spacing: 2px; | 81 border-spacing: 2px; |
| 91 font-family: sans-serif; | 82 font-family: sans-serif; |
| 271 cell.classList.toggle("popup-open"); | 262 cell.classList.toggle("popup-open"); |
| 272 }); | 263 }); |
| 273 } | 264 } |
| 274 }); | 265 }); |
| 275 }); | 266 }); |
| 276 </script> | 267 </script>)"); |
| 277 </head> | 268 } |
| 269 | |
| 270 void html::open(bool fragment, unsigned char fragment_indent) { | |
| 271 if (fragment) { | |
| 272 indent(fragment_indent); | |
| 273 puts("<div class=\"heatmap-content\">"); | |
| 274 indentation++; | |
| 275 } else { | |
| 276 puts(R"(<!DOCTYPE html> | |
| 277 <html> | |
| 278 <head> | |
| 279 <meta charset="UTF-8">)"); | |
| 280 styles_and_script(); | |
| 281 puts(R"( </head> | |
| 278 <body> | 282 <body> |
| 279 <div class="heatmap-content">)"); | 283 <div class="heatmap-content">)"); |
| 280 indentation = 3; | 284 indentation = 3; |
| 281 } | 285 } |
| 282 } | 286 } |