55 * @package PHPDraft\HTML
66 * @author Sean Molenaar<sean@seanmolenaar.eu>
77 */
8+ use PHPDraft \Out \Minifier ;
89
910/**
10- * @var \PHPDraft\Model\APIBlueprintElement []
11+ * @var \PHPDraft\Model\HierarchyElement []
1112 */
1213$ base = $ this ->categories ;
1314?>
1920 <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
2021 integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
2122 <style>
22- <?= file_get_contents (__DIR__ . '/ ' .$ this ->template .'.css ' );?>
23+ <?= Minifier:: minify_css ( file_get_contents (__DIR__ . '/ ' .$ this ->template .'.css ' ) );?>
2324 </style>
2425</head>
2526<body>
@@ -89,7 +90,7 @@ class="pull-right <?= $this->get_method_icon($transition->get_method()); ?>"></s
8990 <ul class="list-unstyled">
9091 <?php foreach ($ this ->base_structures as $ key => $ structure ): ?>
9192 <li>
92- <a href="#object-<?= str_replace (' ' , '_ ' , $ key ); ?> "><?= $ key ; ?> </a>
93+ <a href="#object-<?= str_replace (' ' , '_ ' , strtolower ( $ key) ); ?> "><?= $ key ; ?> </a>
9394 </li>
9495 <?php endforeach ; ?>
9596 </ul>
@@ -249,11 +250,7 @@ class="value"><?= $value; ?></span>
249250 <?= $ key ; ?>
250251
251252 </h5>
252- <pre
253- class="collapse collapsed response-body"
254- id="request-<?= $ href ?> ">
255- <?= $ value ; ?>
256- </pre>
253+ <pre class="collapse collapsed response-body" id="request-<?= $ href ?> "><?= $ value ; ?> </pre>
257254 </div>
258255 <?php endforeach ; ?>
259256 </div>
@@ -265,11 +262,13 @@ class="collapse collapsed response-body"
265262 <?php endforeach ; ?>
266263 <?php endforeach ; ?>
267264 <?php endforeach ; ?>
265+ <?php if (count ($ this ->base_structures ) > 0 ):?>
266+ <h2><a id="datastructures">Data structures</a></h2>
268267 <?php foreach ($ this ->base_structures as $ key => $ structure ): ?>
269- <div class="panel panel-default object-<?= str_replace (' ' , '- ' , strtolower ($ key )); ?> structure">
268+ <div class="panel panel-default object-<?= str_replace (' ' , '_ ' , strtolower ($ key )); ?> structure">
270269 <div class="panel-heading">
271270 <h3 class="panel-title">
272- <a id="object-<?= str_replace (' ' , '- ' , strtolower ($ key )); ?> "><?= $ key ; ?> </a>
271+ <a id="object-<?= str_replace (' ' , '_ ' , strtolower ($ key )); ?> "><?= $ key ; ?> </a>
273272 </h3>
274273 </div>
275274 <div class="panel-body">
@@ -279,6 +278,7 @@ class="collapse collapsed response-body"
279278 </div>
280279 </div>
281280 <?php endforeach ; ?>
281+ <?php endif ;?>
282282 </div>
283283 </div>
284284</div>
@@ -288,6 +288,6 @@ class="collapse collapsed response-body"
288288<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"
289289 integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
290290 crossorigin="anonymous"></script>
291- <script><?= file_get_contents (__DIR__ . '/ ' . $ this ->template . '.js ' ); ?> </script>
291+ <script><?= Minifier:: minify_js ( file_get_contents (__DIR__ . '/ ' . $ this ->template . '.js ' ) ); ?> </script>
292292</body>
293293</html>
0 commit comments