Skip to content

Commit

Permalink
Add the demo back.
Browse files Browse the repository at this point in the history
  • Loading branch information
andy840119 committed Aug 13, 2024
1 parent 3342e8b commit 6682c25
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<div class="bootstrap-version transition-option">
<span class="transition-option" [class.hideText]="!menuIsOpened">Bootstrap: </span>
<div class="flex-nowrap d-flex">
<button class="btn" type="button" [class.selected]="_bsVersions.isBs3" (click)="installTheme('bs3')">3</button>
<button class="btn" type="button" [class.selected]="_bsVersions.isBs4" (click)="installTheme('bs4')">4</button>
<button class="btn" type="button" [class.selected]="_bsVersions.isBs5" (click)="installTheme('bs5')">5</button>
</div>
Expand Down
14 changes: 10 additions & 4 deletions libs/common-docs/src/lib/common/sidebar/sidebar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { SIDEBAR_ROUTES } from '../../tokens/docs-sidebar-routes-token';
import { initNestedRoutes } from './helpers/sidebar-helpers';
import { Subscription } from "rxjs";

const _bs3Css = 'assets/css/bootstrap-3.3.7/css/bootstrap.min.css';
const _bs4Css = 'assets/css/bootstrap-4.5.3/css/bootstrap.min.css';
const _bs5Css = 'assets/css/bootstrap-5.2.3/css/bootstrap.min.css';

Expand All @@ -32,11 +33,16 @@ export class SidebarComponent {
@HostBinding('class.menuIsOpened') menuIsOpened = true;

get bsCssFile(): string {
if (this.currentTheme === 'bs5') {
return _bs5Css;
switch (this.currentTheme) {
case 'bs3':
return _bs3Css;
case 'bs4':
return _bs4Css;
case 'bs5':
return _bs5Css;
default:
throw new Error('Unsupported theme');
}

return _bs4Css;
}

get _bsVersions(): IBsVersion {
Expand Down

0 comments on commit 6682c25

Please sign in to comment.