2021-09-24 11:53:07 +00:00
|
|
|
import { DeesElement, property, html, customElement, TemplateResult, css, cssManager } from '@designestate/dees-element';
|
2021-09-23 12:30:02 +00:00
|
|
|
import * as domtools from '@designestate/dees-domtools';
|
|
|
|
|
|
|
|
declare global {
|
|
|
|
interface HTMLElementTagNameMap {
|
|
|
|
'upl-statuspage-header': UplStatuspageHeader;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@customElement('upl-statuspage-header')
|
|
|
|
export class UplStatuspageHeader extends DeesElement {
|
2021-09-24 11:53:07 +00:00
|
|
|
// STATIC
|
2021-09-23 12:30:02 +00:00
|
|
|
public static demo = () => html`
|
|
|
|
<upl-statuspage-header></upl-statuspage-header>
|
|
|
|
`;
|
|
|
|
|
2021-09-24 11:53:07 +00:00
|
|
|
// INSTANCE
|
|
|
|
@property()
|
|
|
|
public pageTitle: string = "Statuspage Title";
|
2021-09-23 12:30:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
constructor() {
|
|
|
|
super();
|
|
|
|
}
|
|
|
|
|
2021-09-24 11:53:07 +00:00
|
|
|
public static styles = [
|
|
|
|
domtools.elementBasic.staticStyles,
|
|
|
|
css`
|
|
|
|
:host {
|
2021-09-23 12:30:02 +00:00
|
|
|
display: block;
|
2021-09-24 11:53:07 +00:00
|
|
|
background: ${cssManager.bdTheme('#eeeeeb', '#222222')};
|
2021-09-23 12:30:02 +00:00
|
|
|
font-family: Roboto Mono;
|
2021-09-24 11:53:07 +00:00
|
|
|
color: ${cssManager.bdTheme('#333333', '#ffffff')};
|
2021-09-23 12:30:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.mainbox {
|
|
|
|
margin: auto;
|
|
|
|
max-width: 900px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mainbox .actions {
|
|
|
|
display: flex;
|
|
|
|
justify-content: flex-end;
|
|
|
|
padding: 20px 0px 40px 0px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mainbox .actions .actionButton {
|
2021-09-24 11:53:07 +00:00
|
|
|
background: ${cssManager.bdTheme('#00000000', '#ffffff00')};
|
|
|
|
|
2021-09-23 12:30:02 +00:00
|
|
|
font-size: 12px;
|
2021-09-24 11:53:07 +00:00
|
|
|
border: 1px solid ${cssManager.bdTheme('#333', '#CCC')};
|
2021-09-23 12:30:02 +00:00
|
|
|
padding: 6px 10px 7px 10px;
|
|
|
|
margin-left: 10px;
|
|
|
|
border-radius: 3px;
|
|
|
|
cursor: pointer;
|
|
|
|
user-select: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mainbox .actions .actionButton:hover {
|
2021-09-24 11:53:07 +00:00
|
|
|
background: ${cssManager.bdTheme('#333333', '#efefef')};
|
|
|
|
border: 1px solid ${cssManager.bdTheme('#333333', '#efefef')};
|
|
|
|
color: ${cssManager.bdTheme('#fff', '#333333')};
|
2021-09-23 12:30:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
h1 {
|
|
|
|
margin: 0px;
|
|
|
|
text-align: center;
|
|
|
|
font-weight: 300;
|
|
|
|
font-size: 35px;
|
|
|
|
}
|
|
|
|
|
|
|
|
h2 {
|
|
|
|
margin: 0px;
|
|
|
|
margin-top: 10px;
|
|
|
|
text-align: center;
|
|
|
|
font-weight: 300;
|
|
|
|
font-size: 18px;
|
|
|
|
}
|
2021-09-24 11:53:07 +00:00
|
|
|
`
|
|
|
|
]
|
|
|
|
|
|
|
|
public render(): TemplateResult {
|
|
|
|
return html`
|
|
|
|
${domtools.elementBasic.styles}
|
|
|
|
<style>
|
|
|
|
|
2021-09-23 12:30:02 +00:00
|
|
|
</style>
|
|
|
|
<div class="mainbox">
|
|
|
|
<div class="actions">
|
2021-09-24 11:53:07 +00:00
|
|
|
<div class="actionButton" @click=${this.dispatchReportNewIncident}>report new incident</div>
|
|
|
|
<div class="actionButton" @click=${this.dispatchStatusSubscribe}>subscribe</div>
|
2021-09-23 12:30:02 +00:00
|
|
|
</div>
|
2021-09-24 11:53:07 +00:00
|
|
|
<h1>${this.pageTitle}</h1>
|
2021-09-23 12:30:02 +00:00
|
|
|
<h2>STATUS BOARD</h2>
|
|
|
|
</div>
|
|
|
|
`;
|
|
|
|
}
|
2021-09-24 11:53:07 +00:00
|
|
|
|
|
|
|
public dispatchReportNewIncident() {
|
|
|
|
this.dispatchEvent(new CustomEvent('reportNewIncident', {
|
|
|
|
|
|
|
|
}))
|
|
|
|
}
|
|
|
|
|
|
|
|
public dispatchStatusSubscribe() {
|
|
|
|
this.dispatchEvent(new CustomEvent('statusSubscribe', {
|
|
|
|
|
|
|
|
}))
|
|
|
|
}
|
2021-09-23 12:30:02 +00:00
|
|
|
}
|