Skip to content

Commit c62d474

Browse files
committed
Mirror parent
1 parent 16bed2c commit c62d474

File tree

11 files changed

+295
-267
lines changed

11 files changed

+295
-267
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
.vscode/

_layouts/dynamic_template.hbs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
<html>
22
<head>
33
<title>{{title}}</title>
4-
<link type="text/css" href="./style.css" rel="stylesheet"/>
54
</head>
65
<body>
76
<section>
87
<details>
98
<summary>
109
<div>
1110
<p>
12-
<span class="method">{{method}}</span>
11+
<span class="method {{method}}">{{method}}</span>
1312
<span id="baseUrl">
1413
<span>{{baseUrl}}</span><span class="path">{{path}}</span>
1514
</span>
@@ -26,6 +25,12 @@
2625
<div class="type">{{type}}</div>
2726
<div class="pathDescription">{{paramDescription}}</div>
2827
</div>
28+
<p class="subtitle">Body</p>
29+
<div id="requestBody">
30+
<div class="pathName">{{paramName}}<span class="required">{{required}}</span></div>
31+
<div class="type">{{type}}</div>
32+
<div class="pathDescription">{{paramDescription}}</div>
33+
</div>
2934
<p class="title">Responses</p>
3035
<!-- Looping through each response -->
3136
{{#each responses}}

_layouts/form.hbs

Lines changed: 0 additions & 74 deletions
This file was deleted.

assets/js/pretty-print-json-bundle.js

Lines changed: 0 additions & 74 deletions
This file was deleted.

assets/style.css

Lines changed: 47 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
:root {
22
--small-font: 1.4rem;
3+
--connect-method: rgb(185, 94, 4);
4+
--delete-method: rgb(211, 61, 61);
35
--get-method: rgb(52, 109, 219);
6+
--head-method: rgb(185, 94, 4);
7+
--options-method: rgb(115, 92, 255);
8+
--patch-method: rgb(185, 94, 4);
9+
--post-method: rgb(0, 136, 71);
10+
--put-method: rgb(185, 94, 4);
11+
--trace-method: rgb(185, 94, 4);
412
--background-color: rgb(245, 247, 249);
513
--text-color: rgb(59, 69, 78);
614
--type-color: rgb(52, 109, 219);
@@ -30,15 +38,15 @@ summary {
3038

3139

3240
details #detailItems{
33-
padding: 0 0 1rem 2rem;
41+
padding: 0 0 1rem 3rem;
3442
}
3543

3644
details #detailItems > p:first-of-type{
3745
margin-bottom:2.5rem;
3846
}
3947

4048
details > summary {
41-
list-style: none;
49+
cursor:pointer;
4250
}
4351

4452
details > summary::marker,
@@ -71,7 +79,7 @@ summary{
7179
}
7280

7381
summary div{
74-
margin:1rem 2rem;
82+
margin:1rem 3rem;
7583
}
7684

7785
section{
@@ -85,11 +93,15 @@ section{
8593

8694
#baseUrl{
8795
color: var(--light-text-color);
88-
font-size: var(--small-font)
96+
font-size: var(--small-font);
97+
line-height: 2rem;
8998
}
9099

100+
.get{ background-color: var(--get-method); }
101+
.post{ background-color: var(--post-method); }
102+
.put{ background-color: var(--put-method);}
103+
91104
.method{
92-
background-color: var(--get-method);
93105
text-transform: uppercase;
94106
font-weight: 700;
95107
font-size: var(--small-font);
@@ -106,7 +118,7 @@ section{
106118
color: var(--text-color);
107119
}
108120

109-
#pathDetails{
121+
#pathDetails, #requestBody{
110122
color: var(--bright-text-color);
111123
display: flex;
112124
flex-direction: row;
@@ -116,30 +128,28 @@ section{
116128
margin-bottom: 3.2rem;
117129
}
118130

119-
#pathDetails div{
131+
#pathDetails div, #requestBody div{
120132
display: inline;
121133
padding: 1rem 0;
122-
font-weight: 500;
123134
white-space: pre-wrap;
124135
overflow-wrap: break-word;
125136
}
126137

127-
#pathDetails div:first-child{
128-
width: 10.5rem;
138+
#pathDetails div:first-child, #requestBody div:first-child{
139+
width: 20rem;
129140
padding: 0;
141+
font-weight: 600;
130142
}
131143

132-
#pathDetails div:nth-child(2){
133-
width: 6rem;
134-
padding: 0;
135-
144+
#pathDetails div:nth-child(2), #requestBody div:nth-child(2){
145+
width: 9rem;
146+
padding: 0;
136147
}
137148

138-
#pathDetails div:last-child{
149+
#pathDetails div:last-child, #requestBody div:last-child{
139150
flex: 1 1 0%;
140151
margin-right: 2.5rem;
141-
padding: 0;
142-
152+
padding: 0;
143153
}
144154

145155
.httpResponse{
@@ -154,8 +164,9 @@ section{
154164
}
155165

156166
.httpResponse details > summary {
157-
width: 100%;
158-
position: relative; /* Add this line */
167+
cursor: pointer;
168+
position: relative;
169+
width: fit-content;
159170
}
160171

161172
.httpResponse summary{
@@ -168,10 +179,10 @@ section{
168179
}
169180

170181
.httpResponse summary:before{
171-
content: ""; /* Add this line */
182+
content: "";
172183
right: 0;
173184
cursor: pointer;
174-
top: -1.4rem;
185+
top: -2rem;
175186
background-image: url("./arrow.svg");
176187
transform: rotate(-90deg);
177188
width: 1.25rem;
@@ -190,11 +201,11 @@ section{
190201
}
191202

192203
.httpResponseContainer .statusDescription{
193-
margin-left: -2.5rem;
204+
/* empty */
194205
}
195206

196207
.httpStatus{
197-
width: 19rem;
208+
width: 29rem;
198209
font-weight: 700;
199210
color: var(--text-color);
200211
display: flex;
@@ -215,11 +226,11 @@ section{
215226

216227

217228
.httpResponse details .schema details[open] > summary:before{
218-
content: "‒"; /* Add this line */
229+
content: "‒";
219230
}
220231

221232
.httpResponse details .schema summary:before{
222-
content: "+"; /* Add this line */
233+
content: "+";
223234
font-weight: 500;
224235
cursor: pointer;
225236
background-image:none;
@@ -228,7 +239,7 @@ section{
228239
font-size: 1.6rem;
229240
position: absolute;
230241
left: -1.6rem;
231-
top: 0;
242+
top: calc(1rem / 16);
232243
}
233244

234245
.httpResponse details .schema summary{
@@ -243,6 +254,7 @@ section{
243254
.httpResponse details .schema .type{
244255
color: var(--type-color);
245256
margin-bottom: 0;
257+
line-height: 2rem;
246258
}
247259

248260
.httpResponse details .schema .comment{
@@ -253,12 +265,11 @@ section{
253265

254266
.title {
255267
font-weight: 600;
256-
line-height: 1.5rem;
257268
color: var(--text-color);
258269
margin-right: 1rem;
259270
}
260271

261-
.pathName, .httpResponse details .schema .type{
272+
.pathName, .httpResponse details .schema .type, .httpResponse details .schema summary{
262273
font-family: 'Courier New', Courier, monospace;
263274
}
264275

@@ -293,4 +304,12 @@ section{
293304

294305
.httpStatus.blue .circle-path {
295306
fill: rgb(0, 0, 255);
307+
}
308+
309+
.markdown-section * {
310+
line-height: 2.2rem;
311+
}
312+
313+
.markdown-section section {
314+
margin: 1rem 0;
296315
}

bundle.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

form.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)