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.
authentik/web/src/interfaces/Interface.ts

30 lines
1.0 KiB
TypeScript
Raw Normal View History

import { gettext } from "django";
2020-12-02 14:44:40 +00:00
import { html, LitElement, TemplateResult } from "lit-element";
import { SidebarItem } from "../elements/sidebar/Sidebar";
2020-12-02 14:44:40 +00:00
import "../elements/Messages";
import "../pages/router/RouterOutlet";
export abstract class Interface extends LitElement {
abstract get sidebar(): SidebarItem[];
2020-12-02 14:44:40 +00:00
createRenderRoot(): ShadowRoot | Element {
return this;
}
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>`;
}
}