- WIP on route descriptor
This commit is contained in:
1 parent
21f315cc22
commit
ad310ffee5
7 files changed
+52
-18
No files matched your search
@@ -1,8 +1,10 @@
|
||||
{% language.set "lean.api.descriptor.entity" %}
|
||||
|
||||
{% function yesOrNo(bool $toggle) : void %}
|
||||
<span style="color: {{ $toggle ? 'green' : '#ac1b1b' }}">{{ $toggle ? 'oui' : 'non' }}</span>
|
||||
{% endfunction %}
|
||||
|
||||
{% function length(int|null $length): void %}
|
||||
{% function length(int|null|string $length): void %}
|
||||
<span style="color:{{ $length ? 'black' : 'gray' }}">{{ $length ?? "non-défini" }}</span>
|
||||
{% endfunction %}
|
||||
|
||||
@@ -61,5 +63,7 @@
|
||||
{% endforeach %}
|
||||
</ol>
|
||||
</div>
|
||||
{% or %}
|
||||
<i style="color:#585858; padding:0 12px">{% _ "none" %}</i>
|
||||
{% endforeach %}
|
||||
</div>
|
||||
@@ -1,3 +1,5 @@
|
||||
{% language.set "lean.api.descriptor.form" %}
|
||||
|
||||
{% function yesOrNo(bool $toggle) : void %}
|
||||
<span style="color: {{ $toggle ? 'green' : '#ac1b1b' }}">{{ $toggle ? 'oui' : 'non' }}</span>
|
||||
{% endfunction %}
|
||||
@@ -34,5 +36,7 @@
|
||||
{% endforeach %}
|
||||
</ol>
|
||||
</div>
|
||||
{% or %}
|
||||
<i style="color:#585858; padding:0 12px">{% _ "none" %}</i>
|
||||
{% endforeach %}
|
||||
</div>
|
||||
@@ -1,14 +1,21 @@
|
||||
{% language.set "lean.api.descriptor.route" %}
|
||||
|
||||
<ul class="routes-wrapper">
|
||||
{% foreach $routes as $route %}
|
||||
{% foreach $route['methods'] as $method %}
|
||||
<li class="method-{{ strtolower($method) }}">
|
||||
<span class="route-method">{{ $method }}</span>
|
||||
<span class="route-method">
|
||||
<span class="method-name">{{ strtoupper($method) }}</span>
|
||||
</span>
|
||||
<span class="route-link">
|
||||
<a href="{{ $route['route'] }}" title="{{ $route['path'] }}">{{ $route['cleaned'] }}</a>
|
||||
<span>- {{= $route['description'] }}</span>
|
||||
<span>-</span>
|
||||
<span>{{= $route['description'] }}</span>
|
||||
</span>
|
||||
<small class="route-name">{{ $route['name'] }}</small>
|
||||
</li>
|
||||
{% or %}
|
||||
<i style="color:#585858; padding:0 12px">{% _ "none" %}</i>
|
||||
{% endforeach %}
|
||||
{% endforeach %}
|
||||
</ul>
|
||||
@@ -35,12 +35,13 @@
|
||||
.forms .form-name {background: #9cc5e6;color: #284168;font-size:110%}
|
||||
|
||||
.routes-wrapper {padding:8px}
|
||||
.routes-wrapper li + li {margin-top: 5px}
|
||||
.routes-wrapper li {display:flex;align-items:center;border: 1px solid #ccc;}
|
||||
.routes-wrapper .route-method {line-height: 1.8rem;padding:6px 5px 0 5px;width:80px;text-align:center;font-weight:bold;color:#fff;}
|
||||
.routes-wrapper .route-link {line-height: 1.8rem;padding:0 10px}
|
||||
.routes-wrapper li {display:flex;border: 1px solid #ccc;align-items: stretch;}
|
||||
.routes-wrapper li + li {margin-top: 5px;}
|
||||
.routes-wrapper .route-method {display:flex;align-items: center; justify-content: center; line-height: 1.8rem;padding:6px 5px 0 5px;min-width:80px;text-align:center;font-weight:bold;color:#fff;}
|
||||
.routes-wrapper .route-link {line-height: 1.8rem;padding:0 10px;display: flex;align-items: center;}
|
||||
.routes-wrapper .route-link span {margin-left: 7px;}
|
||||
.routes-wrapper .route-link a {font-family:monospace;font-size:.85em}
|
||||
.routes-wrapper .route-name {margin-left:auto;font-weight:bold;width: 200px;text-align: right;background:rgba(0, 0, 0, 0.02);line-height: 1.8rem;padding:6px 7px 0 5px;}
|
||||
.routes-wrapper .route-name {margin-left:auto;font-weight:bold;min-width: 20%;text-align: right;background:rgba(0, 0, 0, 0.02);line-height: 1.8rem;padding:6px 7px 0 5px;}
|
||||
.routes-wrapper li.method-get {background:#e7eff7;border-color: #bfcfdd;}
|
||||
.routes-wrapper li.method-get .route-method {background:#0f6ab4;}
|
||||
.routes-wrapper li.method-get .route-link a, .routes-wrapper li.method-get .route-name {color: #0f6ab4;}
|
||||
|
||||
Reference in new issue
Block a user