Conditions | 1 |
Paths | 1 |
Total Lines | 29 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | public function __invoke(string $title, string $markdown): string |
||
12 | { |
||
13 | $htmlDiv = MarkdownExtra::defaultTransform($markdown); |
||
14 | |||
15 | return /** @lang HTML */<<<EOT |
||
16 | <html lang="en"> |
||
17 | <head> |
||
18 | <title>{$title}</title> |
||
19 | <meta charset="UTF-8"> |
||
20 | <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/3.0.1/github-markdown.min.css"> |
||
21 | <style> |
||
22 | .markdown-body { |
||
23 | box-sizing: border-box; |
||
24 | min-width: 200px; |
||
25 | max-width: 980px; |
||
26 | margin: 0 auto; |
||
27 | padding: 25px; |
||
28 | } |
||
29 | |||
30 | @media (max-width: 767px) { |
||
31 | .markdown-body { |
||
32 | padding: 15px; |
||
33 | } |
||
34 | } |
||
35 | </style> |
||
36 | </head> |
||
37 | <body> |
||
38 | <div class="markdown-body"> |
||
39 | {$htmlDiv} |
||
40 | </div> |
||
46 |