Skip to content

Commit 9bb5a1b

Browse files
committed
POC: Tidy styles
1 parent 974a9eb commit 9bb5a1b

File tree

3 files changed

+33
-4
lines changed

3 files changed

+33
-4
lines changed

assets/css/v2/style.css

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,6 +1439,7 @@ hr {
14391439
padding: 6px;
14401440
margin-top: 5px;
14411441
margin-bottom: 15px;
1442+
border: darkgrey 1px solid;
14421443
}
14431444
.header-row {
14441445
display: flex;
@@ -1469,6 +1470,15 @@ hr {
14691470
outline: none;
14701471
box-shadow: 0px 2px 0px oklch(0.65 0.188 24 / 0.8);
14711472
}
1473+
1474+
button:hover.green {
1475+
box-shadow: 0px 2px 0px oklch(var(--color-brand) / 0.3);
1476+
}
1477+
1478+
button:focus.green {
1479+
outline: none;
1480+
box-shadow: 0px 2px 0px oklch(var(--color-brand) / 0.8);
1481+
}
14721482
}
14731483

14741484
.njs-function {
@@ -1478,8 +1488,26 @@ hr {
14781488
}
14791489

14801490
#run-btn {
1481-
padding: 8px 16px;
1482-
font-size: 16px;
1491+
height: 29px;
1492+
margin-top: 5px;
1493+
background-color: white;
1494+
border: 1px solid black;
1495+
padding: 4px 6px;
1496+
cursor: pointer;
1497+
font-size: 12px;
1498+
color: #000;
1499+
z-index: 1;
1500+
--color-codeblock-shadow: 0% 0 0;
1501+
box-shadow: 0px 2px 0px oklch(var(--color-codeblock-shadow) / 0.15);
1502+
}
1503+
1504+
#run-btn:hover {
1505+
box-shadow: 0px 2px 0px oklch(var(--color-brand) / 0.3);
1506+
}
1507+
1508+
#run-btn:focus {
1509+
outline: none;
1510+
box-shadow: 0px 2px 0px oklch(var(--color-brand) / 0.8);
14831511
}
14841512

14851513
.njs-output {

layouts/partials/njs-playground.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ <h3>Request Builder</h3>
2121
<div id="headers-container">
2222
<!-- Dynamic header entries go here -->
2323
</div>
24-
<button id="add-header">Add Header</button>
24+
<button id="add-header" class="green">Add Header</button>
2525

2626
</div>
2727
<h3>NJS Function</h3>
@@ -148,7 +148,7 @@ <h3>NJS Function</h3>
148148
return {
149149
...request,
150150
requestText: request.body,
151-
return: (status, value) => (JSON.stringify({status, value})),
151+
return: (status, value) => (JSON.stringify({status, value}, null, 2)),
152152
headersOut: {},
153153
}
154154
}

layouts/partials/sidebar-v2.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
(dict "title" "NGINX App Protect DoS" "url" "/nginx-app-protect-dos" "type" "nginx-app-protect")
1212
(dict "title" "NGINX as a Service for Azure" "url" "/nginxaas/azure/" "type" "nginx-as-a-service")
1313
(dict "title" "NGINX Unit" "url" "https://unit.nginx.org/" "type" "nginx-other")
14+
(dict "title" "NJS Playground" "url" "/njs" "type" "nginx-other")
1415
}}
1516
{{ $productMap := dict }}
1617
{{ range $nginxProducts }}

0 commit comments

Comments
 (0)