- Some bugfixes in templates
This commit is contained in:
1 parent
5b68bb191b
commit
3de4b78a0b
9 files changed
+74
-31
No files matched your search
@@ -37,3 +37,4 @@
|
||||
<li><a href="{% route 'lean.console:debugging-phpinfo' %}">{% lang "lean.nav.debugging.phpinfo" %}</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<hr>
|
||||
@@ -10,9 +10,9 @@
|
||||
|
||||
{% function routeHtml($route) %}
|
||||
<div class="grid">
|
||||
<strong class="col route-name">{{ $route->name }}</strong>
|
||||
<div class="col route-uri">{{ $route->getRoute() }}</div>
|
||||
<div class="col route-methods">{{ implode(', ', (array) ( $route->method ?? $route->methods )) }}</div>
|
||||
<strong class="col-2 route-name">{{ $route->name }}</strong>
|
||||
<div class="col-3 route-uri">{{ $route->getRoute() }}</div>
|
||||
<div class="col-2 route-methods">{{ implode(', ', (array) ( $route->method ?? $route->methods )) }}</div>
|
||||
<div class="col controller-method">
|
||||
<span class="class">{{ $route->class }}</span>::<span>{{ $route->classMethod }}</span>
|
||||
</div>
|
||||
@@ -28,9 +28,9 @@
|
||||
<article class="routes">
|
||||
{% if $routes %}
|
||||
<strong class="grid">
|
||||
<div class="col route-name">{% _ 'route.name' %}</div>
|
||||
<div class="col route-uri">{% _ 'route.uri' %}</div>
|
||||
<div class="col route-methods">{% _ 'route.methods' %}</div>
|
||||
<div class="col-2 route-name">{% _ 'route.name' %}</div>
|
||||
<div class="col-3 route-uri">{% _ 'route.uri' %}</div>
|
||||
<div class="col-2 route-methods">{% _ 'route.methods' %}</div>
|
||||
<div class="col controller-method">{% _ 'route.target' %}</div>
|
||||
</strong>
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
{% endif %}
|
||||
|
||||
<style>
|
||||
.databases strong.grid {background: #242528;color:#fff}
|
||||
.databases strong.grid {background: #888a91;color:#fff}
|
||||
|
||||
.databases .db-grid {padding:0.66rem 0.3rem}
|
||||
.databases .db-grid strong {color:#444}
|
||||
|
||||
@@ -4,6 +4,30 @@
|
||||
|
||||
{% title _("title") %}
|
||||
|
||||
|
||||
{% function setStatusModifierClass($line) : string %}
|
||||
{% return match(substr($line, 0, 2)) {
|
||||
'??' => "action-add",
|
||||
default => false,
|
||||
} ?: match(substr($line, 0, 1)) {
|
||||
'M' => "action-delete",
|
||||
default => "",
|
||||
}%}
|
||||
{% endfunction %}
|
||||
|
||||
{% function setDiffModifierClass($line) : string %}
|
||||
{% return match(substr($line, 0, 2)) {
|
||||
'--' => "action-delete",
|
||||
'++' => "action-add",
|
||||
'@@' => "action-group",
|
||||
default => false,
|
||||
} ?: match(substr($line, 0, 1)) {
|
||||
'-' => "action-delete",
|
||||
'+' => "action-add",
|
||||
default => "",
|
||||
}%}
|
||||
{% endfunction %}
|
||||
|
||||
{% section "content" %}
|
||||
<section>
|
||||
<header>
|
||||
@@ -16,11 +40,11 @@
|
||||
|
||||
<code style="white-space:normal;font-size:120%">
|
||||
{% foreach $status as $line %}
|
||||
<div>
|
||||
{% if $line %}
|
||||
{{ $line }}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="{{ setStatusModifierClass($line) }}">
|
||||
{% if $line %}
|
||||
{{ $line }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endforeach %}
|
||||
</code>
|
||||
</div>
|
||||
@@ -30,7 +54,7 @@
|
||||
|
||||
<code style="white-space:normal;font-size:120%">
|
||||
{% foreach $diff as $line %}
|
||||
<div>
|
||||
<div class="{{ setDiffModifierClass($line) }}">
|
||||
{% if $line %}
|
||||
{{ $line }}
|
||||
{% endif %}
|
||||
@@ -39,5 +63,14 @@
|
||||
</code>
|
||||
</div>
|
||||
</article>
|
||||
<footer>
|
||||
{{ $lastUpdate }}
|
||||
</footer>
|
||||
</section>
|
||||
{% endsection %}
|
||||
{% endsection %}
|
||||
|
||||
<style>
|
||||
.action-delete {color:#f88}
|
||||
.action-add {color: #88ff8a}
|
||||
.action-group {color:#88bcff}
|
||||
</style>
|
||||
Reference in new issue
Block a user