web: add view page for SAML Provider

This commit is contained in:
Jens Langhammer
2021-02-06 17:55:41 +01:00
parent 91d6a3c8c7
commit 6aa6615608
8 changed files with 244 additions and 40 deletions

25
web/src/elements/Page.ts Normal file
View File

@ -0,0 +1,25 @@
import { gettext } from "django";
import { LitElement } from "lit-element";
import { html, TemplateResult } from "lit-html";
export abstract class Page extends LitElement {
abstract pageTitle(): string;
abstract pageDescription(): string | undefined;
abstract pageIcon(): string;
abstract renderContent(): TemplateResult;
render(): TemplateResult {
const description = this.pageDescription();
return html`<section class="pf-c-page__main-section pf-m-light">
<div class="pf-c-content">
<h1>
<i class="${this.pageIcon()}"></i>
${gettext(this.pageTitle())}
</h1>
${description ? html`<p>${gettext(description)}</p>` : html``}
</div>
</section>
${this.renderContent()}`;
}
}