Skip to content

Commit

Permalink
RoutingPanel: Add better panel responsivity (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek authored and dg committed Aug 5, 2019
1 parent 14f6ce4 commit af851cb
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/Bridges/ApplicationTracy/templates/RoutingPanel.panel.phtml
Expand Up @@ -22,14 +22,22 @@ use Tracy\Helpers;
background: #C1D3FF !important; background: #C1D3FF !important;
} }


#tracy-debug .nette-RoutingPanel td:first-child {
width: 20px;
}

#tracy-debug .nette-RoutingPanel td:nth-child(2) {
white-space: nowrap;
}

#tracy-debug .nette-RoutingPanel pre, #tracy-debug .nette-RoutingPanel code { #tracy-debug .nette-RoutingPanel pre, #tracy-debug .nette-RoutingPanel code {
display: inline; display: inline;
background: transparent; background: transparent;
} }


#tracy-debug .nette-RoutingPanel-rel { #tracy-debug .nette-RoutingPanel-rel {
background: #eee; background: #eee;
white-space: nowrap white-space: nowrap;
} }
</style> </style>


Expand Down Expand Up @@ -63,7 +71,7 @@ use Tracy\Helpers;
<tr class="<?= $router['matched'] ?>"> <tr class="<?= $router['matched'] ?>">
<td><?= $router['matched'] === 'yes' ? '✓' : ($router['matched'] === 'may' ? '≈' : '') ?></td> <td><?= $router['matched'] === 'yes' ? '✓' : ($router['matched'] === 'may' ? '≈' : '') ?></td>


<td><code title="<?= Helpers::escapeHtml($router['class']) ?>"><?= Helpers::escapeHtml($router['mask'] ?? $router['class']) ?></code></td> <td><code title="<?= Helpers::escapeHtml($router['class']) ?>"><?= isset($router['mask']) ? str_replace('/', '<wbr>/', Helpers::escapeHtml($router['mask'])) : str_replace('\\', '<wbr>\\', Helpers::escapeHtml($router['class'])) ?></code></td>


<td><code> <td><code>
<?php foreach ($router['defaults'] as $key => $value): ?> <?php foreach ($router['defaults'] as $key => $value): ?>
Expand All @@ -88,9 +96,11 @@ use Tracy\Helpers;
</tbody> </tbody>
</table> </table>
<?php endif ?> <?php endif ?>
</div>


<div class="tracy-inner-container">
<p><code><?= Helpers::escapeHtml($method) ?></code> <p><code><?= Helpers::escapeHtml($method) ?></code>
<code><?= Helpers::escapeHtml($url->getBaseUrl()) ?><span class="nette-RoutingPanel-rel"><?= Helpers::escapeHtml($url->getRelativeUrl()) ?></span></code></p> <code><?= Helpers::escapeHtml($url->getBaseUrl()) ?><wbr><span class="nette-RoutingPanel-rel"><?= str_replace(['&amp;', '?'], ['<wbr>&amp;', '<wbr>?'], Helpers::escapeHtml($url->getRelativeUrl())) ?></span></code></p>


<?php if ($source): ?> <?php if ($source): ?>
<p><a href="<?= Helpers::escapeHtml(Tracy\Helpers::editorUri($source->getFileName(), $source->getStartLine())) ?>"><?= $source instanceof \ReflectionClass ? $source->getName() : $source->getDeclaringClass()->getName() . '::' . $source->getName() . '()' ?></a></p> <p><a href="<?= Helpers::escapeHtml(Tracy\Helpers::editorUri($source->getFileName(), $source->getStartLine())) ?>"><?= $source instanceof \ReflectionClass ? $source->getName() : $source->getDeclaringClass()->getName() . '::' . $source->getName() . '()' ?></a></p>
Expand Down

0 comments on commit af851cb

Please sign in to comment.