statuspage/ts_web/elements/upl-statuspage-statusdetails.ts

96 lines
2.2 KiB
TypeScript
Raw Permalink Normal View History

2022-03-24 15:07:15 +00:00
import * as plugins from '../plugins.js';
2021-09-26 22:45:17 +00:00
import {
DeesElement,
property,
html,
customElement,
type TemplateResult,
2021-09-26 22:45:17 +00:00
css,
cssManager,
} from '@design.estate/dees-element';
2021-09-23 12:30:02 +00:00
2022-03-24 15:07:15 +00:00
import './internal/uplinternal-miniheading.js';
2021-09-23 12:30:02 +00:00
declare global {
interface HTMLElementTagNameMap {
'upl-statuspage-statusdetails': UplStatuspageStatusdetails;
}
}
@customElement('upl-statuspage-statusdetails')
export class UplStatuspageStatusdetails extends DeesElement {
2021-09-26 22:45:17 +00:00
public static demo = () => html` <upl-statuspage-statusdetails></upl-statuspage-statusdetails> `;
2021-09-23 12:30:02 +00:00
constructor() {
super();
}
2021-09-26 22:45:17 +00:00
public static styles = [
plugins.domtools.elementBasic.staticStyles,
css`
:host {
position: relative;
padding: 0px 0px 15px 0px;
display: block;
2023-01-05 12:37:28 +00:00
background: ${cssManager.bdTheme('#eeeeeb', '#222222')};;
font-family: Inter;
2021-09-26 22:45:17 +00:00
color: #fff;
}
.mainbox {
margin: auto;
max-width: 900px;
text-align: right;
2023-01-05 12:37:28 +00:00
background: ${cssManager.bdTheme('#ffffff', '#333333')};;
2021-09-26 22:45:17 +00:00
line-height: 50px;
border-radius: 3px;
}
2021-09-23 12:30:02 +00:00
2021-09-26 22:45:17 +00:00
.mainbox .barContainer {
position: relative;
display: flex;
padding: 6px;
overflow: hidden;
}
2021-09-23 12:30:02 +00:00
2021-09-26 22:45:17 +00:00
.mainbox .barContainer .bar {
margin: 4px;
width: 11px;
border-radius: 3px;
height: 40px;
background: #2deb51;
}
.timeIndicator {
position: absolute;
width: 11px;
height: 11px;
background: #FF9800;
top: 56px;
left: 400px;
transform: rotate(45deg);
}
`,
];
2021-09-23 12:30:02 +00:00
2021-09-26 22:45:17 +00:00
public render(): TemplateResult {
return html`
<style></style>
2021-09-23 12:30:02 +00:00
<uplinternal-miniheading>Yesterday & Today</uplinternal-miniheading>
<div class="mainbox">
<div class="barContainer">
${(() => {
let counter = 0;
const returnArray: TemplateResult[] = [];
while (counter < 48) {
counter++;
returnArray.push(html` <div class="bar"></div> `);
}
return returnArray;
})()}
2021-09-26 22:45:17 +00:00
<div class="timeIndicator"></div>
2021-09-23 12:30:02 +00:00
</div>
</div>
`;
}
2021-09-26 22:45:17 +00:00
}