This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
2020-12-02 12:56:26 +00:00
|
|
|
import { gettext } from "django";
|
2020-12-02 14:44:40 +00:00
|
|
|
import { html, LitElement, TemplateResult } from "lit-element";
|
2020-12-02 12:56:26 +00:00
|
|
|
import { SidebarItem } from "../elements/sidebar/Sidebar";
|
|
|
|
|
2020-12-02 14:44:40 +00:00
|
|
|
import "../elements/Messages";
|
|
|
|
import "../pages/router/RouterOutlet";
|
|
|
|
|
2020-12-02 12:56:26 +00:00
|
|
|
export abstract class Interface extends LitElement {
|
|
|
|
|
|
|
|
abstract get sidebar(): SidebarItem[];
|
|
|
|
|
2020-12-02 14:44:40 +00:00
|
|
|
createRenderRoot(): ShadowRoot | Element {
|
|
|
|
return this;
|
2020-12-02 12:56:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
render(): TemplateResult {
|
|
|
|
return html`<pb-messages></pb-messages>
|
|
|
|
<div class="pf-c-page">
|
|
|
|
<a class="pf-c-skip-to-content pf-c-button pf-m-primary" href="#main-content">${gettext("Skip to content")}</a>
|
|
|
|
<pb-sidebar class="pf-c-page__sidebar" .items=${this.sidebar}>
|
|
|
|
</pb-sidebar>
|
|
|
|
<main class="pf-c-page__main">
|
|
|
|
<pb-router-outlet role="main" class="pf-c-page__main" tabindex="-1" id="main-content" defaultUrl="/library/">
|
|
|
|
</pb-router-outlet>
|
|
|
|
</main>
|
|
|
|
</div>`;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|