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/elements/Page.ts
Jens Langhammer e2f01ce740 web: replace spaces after icons with nbsp
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
2021-04-04 19:01:00 +02:00

26 lines
879 B
TypeScript

import { t } from "@lingui/macro";
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>&nbsp;
${t`${this.pageTitle()}`}
</h1>
${description ? html`<p>${t`${description}`}</p>` : html``}
</div>
</section>
${this.renderContent()}`;
}
}