- WIP on Lean's API

This commit is contained in:
Dave Mc Nicoll 2026-06-01 15:11:49 +00:00
parent c624e8bbbd
commit c82eae5be4
3 changed files with 11 additions and 4 deletions

View File

@ -47,7 +47,7 @@
<div><u>Valeur par défaut</u> : {{ $field['default'] }}</div>
{% endif %}
{% if $field['values'] %}
<div><u>Valeurs possibles</u> : [ <u>{{= implode('</u>, <u>', $field['values']) }}</u> ]</div>
<div><u>Valeurs possibles</u> : [ <u class="enum-value">{{= implode('</u><u class="enum-value">', $field['values']) }}</u> ]</div>
{% endif %}
</div>
</li>

View File

@ -108,7 +108,7 @@
document.addEventListener("DOMContentLoaded", (evt) => {
document.querySelectorAll(".form-name").forEach(elem => {
elem.insertAdjacentHTML('beforeend', '<a href="javascript:void(0)" class="btn debug">DEBUG</a>');
elem.insertAdjacentHTML('beforeend', '<a href="javascript:void(0)" class="btn debug">debug</a>');
let formData = JSON.parse(elem.closest('.single-form').getAttribute('data-form'));

View File

@ -26,6 +26,7 @@
li.odd-even:first-child{border:0}
input, button {padding:5px; font-size:1em;margin:0}
h2 + p {font-family: monospace, serif;font-size: 0.9rem;}
.hide {display:none!important}
ul {background:#f4f4f4; list-style: none; padding-left:20px}
@ -38,12 +39,18 @@
.forms ol {background: #ccdef2;}
.forms li {border-color: #859aae;}
.forms .form-name {background: #9cc5e6;display:flex;justify-content: space-between}
.forms .btn {display: flex;justify-content: center;align-items: center;padding: 0 15px;gap: 15px;background-color:#4b6080;outline: 1px #4b6080 solid;border: 4px solid #9cc5e6;outline-offset: -3px;border-radius: 5px;cursor: pointer;transition: 400ms;color: white;font-weight: 100;font-size: 0.85em;transition-duration: 400ms;}
.forms .btn:hover {background-color: transparent;color: #4b6080;border-color:#fff}
.forms .form-name {background: #9cc5e6;display:flex;justify-content: space-between;align-items: center;}
.forms .form-name span {color: #284168;font-size:110%}
.forms .form-name .btn {background:rgba(50,50,50,0.5);padding:0 15px;border: 1px solid rgba(50,50,50,0.8);font-family: 'Déja Vu', 'Courier New', Courier, monospace, serif;font-size: 90%;color: #fff;text-decoration: underline;}
.forms .header-fields {background: #677b8c;}
.forms .fields-wrapper{border-color:#677b8c}
.enum-value:nth-child(odd) {color:gray}
.enum-value:after {content: ", "; color:#677b8c}
.enum-value:not(:last-child):after {content:"":}
.routes-wrapper {padding:5px}
.routes-wrapper li {display:flex;border: 1px solid #ccc;align-items: stretch;cursor:pointer}
.routes-wrapper li:hover {filter: contrast(85%)}