5
5
* @package PHPDraft\HTML
6
6
* @author Sean Molenaar<[email protected] >
7
7
*/
8
+ use PHPDraft \Out \Minifier ;
8
9
9
10
/**
10
- * @var \PHPDraft\Model\APIBlueprintElement []
11
+ * @var \PHPDraft\Model\HierarchyElement []
11
12
*/
12
13
$ base = $ this ->categories ;
13
14
?>
19
20
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
20
21
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
21
22
<style>
22
- <?= file_get_contents (__DIR__ . '/ ' .$ this ->template .'.css ' );?>
23
+ <?= Minifier:: minify_css ( file_get_contents (__DIR__ . '/ ' .$ this ->template .'.css ' ) );?>
23
24
</style>
24
25
</head>
25
26
<body>
@@ -89,7 +90,7 @@ class="pull-right <?= $this->get_method_icon($transition->get_method()); ?>"></s
89
90
<ul class="list-unstyled">
90
91
<?php foreach ($ this ->base_structures as $ key => $ structure ): ?>
91
92
<li>
92
- <a href="#object-<?= str_replace (' ' , '_ ' , $ key ); ?> "><?= $ key ; ?> </a>
93
+ <a href="#object-<?= str_replace (' ' , '_ ' , strtolower ( $ key) ); ?> "><?= $ key ; ?> </a>
93
94
</li>
94
95
<?php endforeach ; ?>
95
96
</ul>
@@ -249,11 +250,7 @@ class="value"><?= $value; ?></span>
249
250
<?= $ key ; ?>
250
251
251
252
</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>
257
254
</div>
258
255
<?php endforeach ; ?>
259
256
</div>
@@ -265,11 +262,13 @@ class="collapse collapsed response-body"
265
262
<?php endforeach ; ?>
266
263
<?php endforeach ; ?>
267
264
<?php endforeach ; ?>
265
+ <?php if (count ($ this ->base_structures ) > 0 ):?>
266
+ <h2><a id="datastructures">Data structures</a></h2>
268
267
<?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">
270
269
<div class="panel-heading">
271
270
<h3 class="panel-title">
272
- <a id="object-<?= str_replace (' ' , '- ' , strtolower ($ key )); ?> "><?= $ key ; ?> </a>
271
+ <a id="object-<?= str_replace (' ' , '_ ' , strtolower ($ key )); ?> "><?= $ key ; ?> </a>
273
272
</h3>
274
273
</div>
275
274
<div class="panel-body">
@@ -279,6 +278,7 @@ class="collapse collapsed response-body"
279
278
</div>
280
279
</div>
281
280
<?php endforeach ; ?>
281
+ <?php endif ;?>
282
282
</div>
283
283
</div>
284
284
</div>
@@ -288,6 +288,6 @@ class="collapse collapsed response-body"
288
288
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"
289
289
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
290
290
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>
292
292
</body>
293
293
</html>
0 commit comments