Skip to content

Commit ba95238

Browse files
committed
fix nav bar scroll styling and item id generation
1 parent 68dbcef commit ba95238

File tree

4 files changed

+6
-14
lines changed

4 files changed

+6
-14
lines changed

src/styles/nav-styles.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,6 @@ export default html`
2727
.nav-scroll::-webkit-scrollbar-track {
2828
background:transparent;
2929
}
30-
.nav-scroll::-webkit-scrollbar {
31-
display:none;
32-
width: 12px;
33-
background-color: transparent;
34-
}
35-
.nav-scroll:hover::-webkit-scrollbar {
36-
display:block;
37-
}
3830
.nav-scroll::-webkit-scrollbar-thumb {
3931
border: 3px solid var(--nav-bg-color);
4032
border-width: 0 3px;

src/templates/expanded-endpoint-template.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export function expandedEndpointBodyTemplate(path) {
7878
export default function expandedEndpointTemplate() {
7979
return html`
8080
${this.resolvedSpec.tags.map((tag) => html`
81-
<div id="${tag.name.replace(invalidCharsRegEx, '-')}" class='regular-font section-gap--read-mode observe-me' style="border-top:1px solid var(--primary-color);">
81+
<div id="tag--${tag.name.replace(invalidCharsRegEx, '-')}" class='regular-font section-gap--read-mode observe-me' style="border-top:1px solid var(--primary-color);">
8282
<div class="title tag">${tag.name}</div>
8383
<div class="regular-font-size">
8484
${unsafeHTML(`<div class='m-markdown regular-font'>${marked(tag.description ? tag.description : '')}</div>`)}

src/templates/focused-endpoint-template.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import '@/components/api-response';
88
/* eslint-disable indent */
99
function focusedTagBodyTemplate(tag) {
1010
return html`
11-
<h1 id="tag-${tag.name}">${tag.name}</h1>
11+
<h1 id="tag--${tag.name}">${tag.name}</h1>
1212
${tag.description ? html`<div class="m-markdown"> ${unsafeHTML(marked(tag.description || ''))}</div>` : ''}
1313
`;
1414
}
@@ -26,8 +26,8 @@ export default function focusedEndpointTemplate() {
2626
if (itemToFocus === 'overview' || itemToFocus === 'authentication' || itemToFocus === 'api-servers') {
2727
selectedPathObj = {};
2828
selectedTagObj = {};
29-
} else if (itemToFocus.startsWith('tag-')) {
30-
const tag = itemToFocus.replace('tag-', '');
29+
} else if (itemToFocus.startsWith('tag--')) {
30+
const tag = itemToFocus.replace('tag--', '');
3131
selectedTagObj = this.resolvedSpec.tags.find((v) => v.name === tag);
3232
} else {
3333
for (i = 0; i < this.resolvedSpec.tags.length; i += 1) {
@@ -46,7 +46,7 @@ export default function focusedEndpointTemplate() {
4646
return html`
4747
${itemToFocus === 'overview' || itemToFocus === 'authentication' || itemToFocus === 'api-servers'
4848
? html``
49-
: itemToFocus.startsWith('tag-')
49+
: itemToFocus.startsWith('tag--')
5050
? html`
5151
<div class='regular-font section-gap--focused-mode'>
5252
${focusedTagBodyTemplate.call(this, selectedTagObj)}

src/templates/navbar-template.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export default function navbarTemplate() {
6161
<span id='link-paths' class='nav-bar-section'>Operations</span>
6262
${this.resolvedSpec.tags.map((tag) => html`
6363
<!-- Tag -->
64-
<div class='nav-bar-tag' id="link-${tag.name.replace(invalidCharsRegEx, '-')}" data-content-id='tag-${tag.name}' @click='${(e) => this.scrollToEl(e)}'>
64+
<div class='nav-bar-tag' id="link-tag--${tag.name.replace(invalidCharsRegEx, '-')}" data-content-id='tag--${tag.name}' @click='${(e) => this.scrollToEl(e)}'>
6565
${tag.name}
6666
</div>
6767

0 commit comments

Comments
 (0)