Skip to content

Commit 0953282

Browse files
committed
Themes: Fix material div
1 parent eb41fcb commit 0953282

File tree

3 files changed

+25
-38
lines changed

3 files changed

+25
-38
lines changed

src/PHPDraft/Out/HTML/material.css

+5
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,9 @@ h2.mdl-card__title-text {
5050

5151
table.table p {
5252
margin-bottom: 0px;
53+
}
54+
55+
.showSearch {
56+
background: #122b40 center / cover;
57+
color: #cccccc;
5358
}

src/PHPDraft/Out/HTML/material.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
/**
22
* Created by smillernl on 18-5-17.
3-
*/
3+
*/

src/PHPDraft/Out/HTML/material.phtml

+19-37
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,9 @@ use PHPDraft\Out\Minifier;
2929
<!-- Title -->
3030
<span class="mdl-layout-title"><?= $this->base_data['TITLE']; ?></span>
3131
<div class="mdl-layout-spacer"></div>
32-
<div class="mdl-textfield mdl-js-textfield mdl-textfield--expandable
33-
mdl-textfield--floating-label mdl-textfield--align-right">
34-
<label class="mdl-button mdl-js-button mdl-button--icon"
35-
for="waterfall-exp">
36-
<i class="material-icons">search</i>
37-
</label>
38-
<div class="mdl-textfield__expandable-holder">
39-
<input class="mdl-textfield__input" type="text" name="sample"
40-
id="waterfall-exp">
41-
</div>
42-
</div>
4332
</div>
4433
</header>
4534
<div class="mdl-layout__drawer">
46-
<span class="mdl-layout-title"><?= $this->base_data['TITLE']; ?></span>
4735
<nav class="mdl-navigation">
4836
<a class="mdl-navigation__link" href="#"><b>Webservices</b></a>
4937
<?php foreach ($this->categories as $category): ?>
@@ -100,7 +88,7 @@ use PHPDraft\Out\Minifier;
10088
<div class="mdl-tabs mdl-js-tabs mdl-js-ripple-effect">
10189
<div class="mdl-tabs__tab-bar">
10290
<?php if (!empty($transition->requests)): ?>
103-
<a href="#<?= $transition->get_href(); ?>-request-panel" class="mdl-tabs__tab is-active">Request</a>
91+
<a href="#<?= $transition->get_href(); ?>-request-panel" class="mdl-tabs__tab is-active"><b>Request</b></a>
10492
<?php endif;?>
10593
<?php if (!empty($transition->responses)): ?>
10694
<?php foreach ($transition->responses as $key => $response): ?>
@@ -174,35 +162,29 @@ use PHPDraft\Out\Minifier;
174162
<?php endif; ?>
175163
<?php if ($response->structure !== []): ?>
176164
<h5>Data Structure</h5>
177-
<div class="row">
178-
<?php foreach ($response->structure as $value): ?>
179-
<?= $value; ?>
180-
<?php endforeach; ?>
181-
</div>
165+
<?php foreach ($response->structure as $value): ?>
166+
<?= $value; ?>
167+
<?php endforeach; ?>
182168
<?php endif; ?>
183-
<?php foreach ($response->content as $key => $value): ?>
184-
<div>
185-
<?php $href =
186-
$transition->get_href() . '-' . $response->statuscode . '-' . str_replace([
187-
'/',
188-
'+',
189-
], '-', $key); ?>
190-
<h5 class="response-body"
191-
data-toggle="collapse"
192-
data-target="#request-<?= $href ?>">
193-
<span class="glyphicon indicator glyphicon-menu-up"></span>
194-
<?= $key; ?>
195-
196-
</h5>
197-
<pre class="collapse collapsed response-body"
198-
id="request-<?= $href ?>"><?= $value; ?></pre>
199-
</div>
200-
<?php endforeach; ?>
201-
</div>
169+
<div class="mdl-grid">
170+
<?php foreach ($response->content as $key => $value): ?>
171+
<div class="mdl-cell mdl-cell--<?= 12/count($response->content)?>-col">
172+
<?php $href =
173+
$transition->get_href() . '-' . $response->statuscode . '-' . str_replace([
174+
'/',
175+
'+',
176+
], '-', $key); ?>
177+
<h5 class="response-body"><?= $key; ?></h5>
178+
<pre class="response-body" id="request-<?= $href ?>"><?= $value; ?></pre>
179+
</div>
180+
<?php endforeach; ?>
181+
</div>
202182
</div>
183+
203184
<?php endforeach; ?>
204185
<?php endif; ?>
205186
<?php endif;?>
187+
</div>
206188
</div>
207189
<div class="mdl-card__menu">
208190
<button id="<?=$transition->get_href();?>" class="mdl-button mdl-button--icon mdl-js-button mdl-js-ripple-effect">

0 commit comments

Comments
 (0)