Skip to content

Commit 380bdea

Browse files
committed
added new slot on navigation bar
1 parent e5021d9 commit 380bdea

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

docs/api.html

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
<h2> Attributes</h2>
7070
<div class='table-block' style="display:flex; flex-direction: column;">
7171

72-
<div class='table-title'> General </div>
72+
<div class='table-title' id="general"> General </div>
7373
<table class="m-table">
7474
<tr>
7575
<td class="attr-col mono-bold right">spec-url </td>
@@ -83,7 +83,7 @@ <h2> Attributes</h2>
8383
</tr>
8484
</table>
8585

86-
<div class='table-title'> UI Colors and Fonts </div>
86+
<div class='table-title' id="colors"> UI Colors and Fonts </div>
8787
<table class="m-table">
8888
<tr>
8989
<td class=" attr-col mono-bold right">theme </td>
@@ -115,7 +115,7 @@ <h2> Attributes</h2>
115115
</tr>
116116
</table>
117117

118-
<div class='table-title'> Navigation bar colors (only applicable in read-mode)</div>
118+
<div class='table-title' id="nav-bar-colors"> Navigation bar colors (only applicable in read-mode)</div>
119119
<table class="m-table">
120120
<tr>
121121
<td class=" attr-col mono-bold right">nav-bg-color </td>
@@ -144,7 +144,7 @@ <h2> Attributes</h2>
144144
</tr>
145145
</table>
146146

147-
<div class='table-title'> UI Layout & Placement</div>
147+
<div class='table-title' id='layout'> UI Layout & Placement</div>
148148
<table class="m-table">
149149
<tr>
150150
<td class="attr-col mono-bold right"> layout </td>
@@ -204,7 +204,7 @@ <h2> Attributes</h2>
204204
</tr>
205205
</table>
206206

207-
<div class='table-title'> Hide/Show Sections </div>
207+
<div class='table-title' id='toggle-sections'> Hide/Show Sections </div>
208208
<table class="m-table">
209209
<tr>
210210
<td class="attr-col mono-bold right">show-info</td>
@@ -279,7 +279,7 @@ <h2> Attributes</h2>
279279
</tr>
280280
</table>
281281

282-
<div class='table-title'> API Server</div>
282+
<div class='table-title' id='api-servers'> API Server</div>
283283
<table class="m-table">
284284
<tr>
285285
<td class="attr-col mono-bold right">api-key-name</td>
@@ -368,6 +368,10 @@ <h2> Slots</h2>
368368
<td class="mono-bold right">footer</td>
369369
<td class="gray"> The conents of this slot will appear at the bottom of the spec</td>
370370
</tr>
371+
<tr>
372+
<td class="mono-bold right">nav-logo</td>
373+
<td class="gray"> The conents of this slot will appear on Side navigation bar (only available in read-mode)</td>
374+
</tr>
371375
</table>
372376
</div>
373377
</div>

docs/specs/basic.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"swagger": "2.0",
33
"info": {
44
"title": "Basic Spec",
5+
"version" : "1.0.0",
56
"description": ""
67
},
78
"consumes": [ "application/json"],

src/rapidoc.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -501,9 +501,12 @@ export default class RapiDoc extends LitElement {
501501
${(this.allowSearch === 'false')
502502
? ''
503503
: html`
504-
<div style="position:sticky; top:0; display:flex; align-items: center; padding:16px 24px; background: var(--bg3);">
505-
<input id="nav-bar-search" type="text" placeholder="search" @change="${this.onSearchChange}" style="flex:1" spellcheck="false" >
506-
<div style="margin: 6px 5px 0 -24px; font-size:var(--title-font-size); cursor:pointer;">&#x23ce;</div>
504+
<div style="position:sticky; top:0; display:flex; flex-direction:column; align-items: stretch; padding:16px 24px; background: var(--bg3);">
505+
<slot name="nav-logo" class="logo"></slot>
506+
<div style="display:flex;">
507+
<input id="nav-bar-search" style="width:100%" type="text" placeholder="search" @change="${this.onSearchChange}" spellcheck="false" >
508+
<div style="margin: 6px 5px 0 -24px; font-size:var(--title-font-size); cursor:pointer;">&#x23ce;</div>
509+
</div>
507510
${this.matchPaths
508511
? html`
509512
<div style='margin-left:10px; cursor:pointer;' @click = '${this.onClearSearch}'> Clear </div>`

0 commit comments

Comments
 (0)