Skip to content

Commit 7c33b5b

Browse files
committed
fixes #942 - Do not show header if hidden when spec not found
1 parent cb8505d commit 7c33b5b

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

src/templates/main-body-template.js

+4-15
Original file line numberDiff line numberDiff line change
@@ -34,25 +34,14 @@ export default function mainBodyTemplate(isMini = false, pathsExpanded = false)
3434
};
3535
/* eslint-disable indent */
3636
if (this.resolvedSpec.specLoadError) {
37-
if (isMini) {
38-
return html`
39-
${this.theme === 'dark' ? SetTheme.call(this, 'dark', newTheme) : SetTheme.call(this, 'light', newTheme)}
40-
<div style='display:flex; align-items:center; border:1px dashed var(--border-color); height:42px; padding:5px; font-size:var(--font-size-small); color:var(--red); font-family:var(--font-mono)'> ${this.resolvedSpec.info.description} </div>
41-
`;
42-
}
4337
return html`
4438
${this.theme === 'dark' ? SetTheme.call(this, 'dark', newTheme) : SetTheme.call(this, 'light', newTheme)}
45-
<!-- Header -->
46-
${headerTemplate.call(this)}
47-
<main class='main-content regular-font' part='section-main-content'>
48-
<slot></slot>
49-
<div style='margin:24px; text-align: center;'>
50-
<h1 style='color: var(--red)'> ${this.resolvedSpec.info.title} </h1>
51-
<div style='font-family:var(--font-mono)'> ${this.resolvedSpec.info.description} </div>
52-
</div>
53-
</main>
39+
<div id="spec-not-found" style='display:flex; align-items:center; justify-content: center; border:1px dashed var(--border-color); height:42px; padding:5px; font-size:var(--font-size-small); color:var(--red); font-family:var(--font-mono)'>
40+
${this.resolvedSpec.info.description}
41+
</div>
5442
`;
5543
}
44+
5645
if (this.resolvedSpec.isSpecLoading) {
5746
return html`
5847
${this.theme === 'dark' ? SetTheme.call(this, 'dark', newTheme) : SetTheme.call(this, 'light', newTheme)}

0 commit comments

Comments
 (0)