Upload 2 files
Browse files- script.js +2 -2
- styles.css +3 -2
script.js
CHANGED
|
@@ -77,7 +77,7 @@ function render(reset = true) {
|
|
| 77 |
<h4>${e.name}</h4>
|
| 78 |
<p>${e.desc}</p>
|
| 79 |
<span class="method">${e.method}</span>
|
| 80 |
-
<span class="status">${e.isActive ? "Active" : "Inactive"}</span>
|
| 81 |
`;
|
| 82 |
card.onclick = () => openModal(e);
|
| 83 |
grid.appendChild(card);
|
|
@@ -122,7 +122,7 @@ function openModal(e) {
|
|
| 122 |
<p>${e.desc}</p>
|
| 123 |
<p><strong>Method:</strong> ${e.method}</p>
|
| 124 |
${e.params.length ? `<p><strong>Params:</strong> ${e.params.join(", ")}</p>` : ""}
|
| 125 |
-
<p><strong>Status:</strong> ${e.isActive ? "Active" : "Inactive"}</p>
|
| 126 |
<div class="code-snippet">curl -X ${e.method} "${url}"</div>
|
| 127 |
<div style="margin-top:1rem">
|
| 128 |
<button class="btn-copy" onclick="navigator.clipboard.writeText('${url}')">Copy URL</button>
|
|
|
|
| 77 |
<h4>${e.name}</h4>
|
| 78 |
<p>${e.desc}</p>
|
| 79 |
<span class="method">${e.method}</span>
|
| 80 |
+
<span class="status ${e.isActive ? "active" : "inactive"}">${e.isActive ? "Active" : "Inactive"}</span>
|
| 81 |
`;
|
| 82 |
card.onclick = () => openModal(e);
|
| 83 |
grid.appendChild(card);
|
|
|
|
| 122 |
<p>${e.desc}</p>
|
| 123 |
<p><strong>Method:</strong> ${e.method}</p>
|
| 124 |
${e.params.length ? `<p><strong>Params:</strong> ${e.params.join(", ")}</p>` : ""}
|
| 125 |
+
<p><strong>Status:</strong> <span class="status ${e.isActive ? "active" : "inactive"}">${e.isActive ? "Active" : "Inactive"}</span></p>
|
| 126 |
<div class="code-snippet">curl -X ${e.method} "${url}"</div>
|
| 127 |
<div style="margin-top:1rem">
|
| 128 |
<button class="btn-copy" onclick="navigator.clipboard.writeText('${url}')">Copy URL</button>
|
styles.css
CHANGED
|
@@ -136,9 +136,10 @@ nav a:hover { color: var(--accent-solid); }
|
|
| 136 |
.status {
|
| 137 |
position: absolute; bottom: 1rem; right: 1rem;
|
| 138 |
font-size: .7rem; font-weight: 600;
|
| 139 |
-
color: #000;
|
| 140 |
-
padding: .2rem .5rem; border-radius: 12px;
|
| 141 |
}
|
|
|
|
|
|
|
| 142 |
.load-more {
|
| 143 |
display: block; margin: 2.5rem auto 0;
|
| 144 |
padding: .75rem 2rem; border: 1px solid var(--accent-solid);
|
|
|
|
| 136 |
.status {
|
| 137 |
position: absolute; bottom: 1rem; right: 1rem;
|
| 138 |
font-size: .7rem; font-weight: 600;
|
| 139 |
+
color: #000; padding: .2rem .5rem; border-radius: 12px;
|
|
|
|
| 140 |
}
|
| 141 |
+
.status.active { background: #2ecc71; }
|
| 142 |
+
.status.inactive { background: #e74c3c; }
|
| 143 |
.load-more {
|
| 144 |
display: block; margin: 2.5rem auto 0;
|
| 145 |
padding: .75rem 2rem; border: 1px solid var(--accent-solid);
|