update
This commit is contained in:
@@ -3,6 +3,7 @@ export * from './upl-statuspage-assetsselector.js';
|
||||
export * from './upl-statuspage-footer.js';
|
||||
export * from './upl-statuspage-header.js';
|
||||
export * from './upl-statuspage-incidents.js';
|
||||
export * from './upl-statuspage-pagetitle.js';
|
||||
export * from './upl-statuspage-statusbar.js';
|
||||
export * from './upl-statuspage-statusdetails.js';
|
||||
export * from './upl-statuspage-statusmonth.js';
|
||||
|
||||
@@ -24,15 +24,9 @@ export class UplStatuspageHeader extends DeesElement {
|
||||
@property({ type: Boolean })
|
||||
public showSubscribeButton: boolean = true;
|
||||
|
||||
@property({ type: String })
|
||||
public brandColor: string = '';
|
||||
|
||||
@property({ type: String })
|
||||
public logoUrl: string = '';
|
||||
|
||||
@property({ type: Boolean })
|
||||
public customStyles: boolean = false;
|
||||
|
||||
@property({ type: Boolean })
|
||||
public loading: boolean = false;
|
||||
|
||||
@@ -46,31 +40,44 @@ export class UplStatuspageHeader extends DeesElement {
|
||||
css`
|
||||
:host {
|
||||
display: block;
|
||||
background: transparent;
|
||||
background: ${cssManager.bdTheme('#ffffff', '#0a0a0a')};
|
||||
font-family: ${unsafeCSS(fonts.base)};
|
||||
color: ${cssManager.bdTheme('#0a0a0a', '#fafafa')};
|
||||
border-bottom: 1px solid ${cssManager.bdTheme('#e5e7eb', '#27272a')};
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 40;
|
||||
}
|
||||
|
||||
.mainbox {
|
||||
margin: auto;
|
||||
.header-container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 0 24px;
|
||||
}
|
||||
|
||||
.mainbox .actions {
|
||||
.header-nav {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 8px;
|
||||
padding: 24px 0;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 64px;
|
||||
}
|
||||
|
||||
.mainbox .actions .actionButton {
|
||||
background: ${cssManager.bdTheme('rgba(255, 255, 255, 0.8)', 'rgba(0, 0, 0, 0.6)')};
|
||||
backdrop-filter: blur(10px);
|
||||
.header-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
.header-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.actionButton {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
border: 1px solid ${cssManager.bdTheme('rgba(0, 0, 0, 0.08)', 'rgba(255, 255, 255, 0.08)')};
|
||||
padding: 8px 16px;
|
||||
padding: 8px 12px;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
@@ -78,82 +85,89 @@ export class UplStatuspageHeader extends DeesElement {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 36px;
|
||||
height: 36px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: ${cssManager.bdTheme('#0a0a0a', '#fafafa')};
|
||||
box-shadow: ${unsafeCSS(shadows.sm)};
|
||||
}
|
||||
|
||||
.mainbox .actions .actionButton:hover {
|
||||
background: ${cssManager.bdTheme('rgba(255, 255, 255, 0.95)', 'rgba(0, 0, 0, 0.8)')};
|
||||
border-color: ${cssManager.bdTheme('rgba(0, 0, 0, 0.12)', 'rgba(255, 255, 255, 0.12)')};
|
||||
transform: translateY(-1px);
|
||||
box-shadow: ${unsafeCSS(shadows.md)};
|
||||
.actionButton:hover {
|
||||
background: ${cssManager.bdTheme('#f4f4f5', '#27272a')};
|
||||
}
|
||||
|
||||
.mainbox .actions .actionButton:active {
|
||||
transform: translateY(0);
|
||||
.site-title {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
letter-spacing: -0.02em;
|
||||
color: ${cssManager.bdTheme('#0a0a0a', '#fafafa')};
|
||||
}
|
||||
|
||||
.header-content {
|
||||
padding: 64px 0 48px 0;
|
||||
text-align: center;
|
||||
.logo {
|
||||
height: 24px;
|
||||
width: auto;
|
||||
filter: ${cssManager.bdTheme('none', 'brightness(0) invert(1)')};
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
.page-info {
|
||||
padding: 48px 0 64px 0;
|
||||
}
|
||||
|
||||
.page-title {
|
||||
font-size: 48px;
|
||||
font-weight: 700;
|
||||
letter-spacing: -0.02em;
|
||||
line-height: 1.1;
|
||||
color: ${cssManager.bdTheme('#0a0a0a', '#fafafa')};
|
||||
margin: 0 0 16px 0;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
margin: 16px 0 0 0;
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
.page-subtitle {
|
||||
font-size: 20px;
|
||||
color: ${cssManager.bdTheme('#6b7280', '#a1a1aa')};
|
||||
letter-spacing: 0.02em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.logo {
|
||||
display: block;
|
||||
margin: 0 auto 32px;
|
||||
max-width: 180px;
|
||||
height: auto;
|
||||
filter: ${cssManager.bdTheme('none', 'brightness(0) invert(1)')};
|
||||
}
|
||||
|
||||
.loading-skeleton {
|
||||
height: 200px;
|
||||
background: ${cssManager.bdTheme(
|
||||
'linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%)',
|
||||
'linear-gradient(90deg, #1f1f1f 25%, #262626 50%, #1f1f1f 75%)'
|
||||
)};
|
||||
background-size: 200% 100%;
|
||||
animation: loading 1.5s infinite;
|
||||
border-radius: 6px;
|
||||
margin: 24px 0;
|
||||
}
|
||||
|
||||
@keyframes loading {
|
||||
0% { background-position: 200% 0; }
|
||||
100% { background-position: -200% 0; }
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* Primary button variant */
|
||||
.actionButton.primary {
|
||||
background: ${cssManager.bdTheme('#0a0a0a', '#fafafa')};
|
||||
color: ${cssManager.bdTheme('#ffffff', '#0a0a0a')};
|
||||
border-color: transparent;
|
||||
backdrop-filter: none;
|
||||
border: 1px solid ${cssManager.bdTheme('#0a0a0a', '#fafafa')};
|
||||
}
|
||||
|
||||
.actionButton.primary:hover {
|
||||
background: ${cssManager.bdTheme('#262626', '#e5e7eb')};
|
||||
transform: translateY(-1px);
|
||||
box-shadow: ${unsafeCSS(shadows.md)};
|
||||
border-color: ${cssManager.bdTheme('#262626', '#e5e7eb')};
|
||||
}
|
||||
|
||||
.loading-skeleton {
|
||||
height: 64px;
|
||||
background: ${cssManager.bdTheme('#f9fafb', '#0a0a0a')};
|
||||
border-bottom: 1px solid ${cssManager.bdTheme('#e5e7eb', '#27272a')};
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.header-nav {
|
||||
height: 56px;
|
||||
}
|
||||
|
||||
.site-title {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.actionButton {
|
||||
font-size: 13px;
|
||||
padding: 6px 10px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.page-title {
|
||||
font-size: 36px;
|
||||
}
|
||||
|
||||
.page-subtitle {
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
`
|
||||
]
|
||||
@@ -161,52 +175,35 @@ export class UplStatuspageHeader extends DeesElement {
|
||||
public render(): TemplateResult {
|
||||
if (this.loading) {
|
||||
return html`
|
||||
<div class="mainbox">
|
||||
<div class="loading-skeleton"></div>
|
||||
</div>
|
||||
<div class="loading-skeleton"></div>
|
||||
`;
|
||||
}
|
||||
|
||||
return html`
|
||||
${domtools.elementBasic.styles}
|
||||
<style>
|
||||
${this.customStyles && this.brandColor ? `
|
||||
.mainbox .actions .actionButton {
|
||||
border-color: ${this.brandColor};
|
||||
color: ${this.brandColor};
|
||||
}
|
||||
.mainbox .actions .actionButton:hover {
|
||||
background: ${this.brandColor}10;
|
||||
border-color: ${this.brandColor};
|
||||
}
|
||||
.mainbox .actions .actionButton.primary {
|
||||
background: ${this.brandColor};
|
||||
border-color: ${this.brandColor};
|
||||
color: white;
|
||||
}
|
||||
.mainbox .actions .actionButton.primary:hover {
|
||||
background: ${this.brandColor}dd;
|
||||
border-color: ${this.brandColor}dd;
|
||||
}
|
||||
` : ''}
|
||||
</style>
|
||||
<div class="mainbox">
|
||||
<div class="actions">
|
||||
${this.showReportButton ? html`
|
||||
<div class="actionButton" @click=${this.dispatchReportNewIncident}>Report Issue</div>
|
||||
` : ''}
|
||||
${this.showSubscribeButton ? html`
|
||||
<div class="actionButton primary" @click=${this.dispatchStatusSubscribe}>Subscribe</div>
|
||||
` : ''}
|
||||
<header>
|
||||
<div class="header-container">
|
||||
<nav class="header-nav">
|
||||
<div class="header-left">
|
||||
${this.logoUrl ? html`
|
||||
<img src="${this.logoUrl}" alt="${this.pageTitle}" class="logo">
|
||||
` : ''}
|
||||
<h1 class="site-title">${this.pageTitle}</h1>
|
||||
</div>
|
||||
<div class="header-actions">
|
||||
${this.showReportButton ? html`
|
||||
<button class="actionButton" @click=${this.dispatchReportNewIncident}>
|
||||
Report Issue
|
||||
</button>
|
||||
` : ''}
|
||||
${this.showSubscribeButton ? html`
|
||||
<button class="actionButton primary" @click=${this.dispatchStatusSubscribe}>
|
||||
Subscribe
|
||||
</button>
|
||||
` : ''}
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="header-content">
|
||||
${this.logoUrl ? html`
|
||||
<img src="${this.logoUrl}" alt="Logo" class="logo">
|
||||
` : ''}
|
||||
<h1>${this.pageTitle}</h1>
|
||||
<div class="subtitle">System Status</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
25
ts_web/elements/upl-statuspage-pagetitle.demo.ts
Normal file
25
ts_web/elements/upl-statuspage-pagetitle.demo.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { html } from '@design.estate/dees-element';
|
||||
|
||||
export const demoFunc = () => html`
|
||||
<style>
|
||||
.demo-container {
|
||||
background: #fafafa;
|
||||
padding: 40px 0;
|
||||
min-height: 400px;
|
||||
}
|
||||
</style>
|
||||
<div class="demo-container">
|
||||
<upl-statuspage-pagetitle
|
||||
.pageTitle=${'System Status'}
|
||||
.pageSubtitle=${'Real-time operational status and incident reports for all services'}
|
||||
></upl-statuspage-pagetitle>
|
||||
|
||||
<br>
|
||||
|
||||
<upl-statuspage-pagetitle
|
||||
.pageTitle=${'API Documentation'}
|
||||
.pageSubtitle=${'Comprehensive guides and references for integrating with our platform'}
|
||||
.centered=${true}
|
||||
></upl-statuspage-pagetitle>
|
||||
</div>
|
||||
`;
|
||||
89
ts_web/elements/upl-statuspage-pagetitle.ts
Normal file
89
ts_web/elements/upl-statuspage-pagetitle.ts
Normal file
@@ -0,0 +1,89 @@
|
||||
import { DeesElement, property, html, customElement, type TemplateResult, css, cssManager, unsafeCSS } from '@design.estate/dees-element';
|
||||
import * as domtools from '@design.estate/dees-domtools';
|
||||
import { fonts } from '../styles/shared.styles.js';
|
||||
import { demoFunc } from './upl-statuspage-pagetitle.demo.js';
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'upl-statuspage-pagetitle': UplStatuspagePagetitle;
|
||||
}
|
||||
}
|
||||
|
||||
@customElement('upl-statuspage-pagetitle')
|
||||
export class UplStatuspagePagetitle extends DeesElement {
|
||||
public static demo = demoFunc;
|
||||
|
||||
@property({ type: String })
|
||||
public pageTitle: string = 'System Status';
|
||||
|
||||
@property({ type: String })
|
||||
public pageSubtitle: string = '';
|
||||
|
||||
@property({ type: Boolean })
|
||||
public centered: boolean = false;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
public static styles = [
|
||||
domtools.elementBasic.staticStyles,
|
||||
css`
|
||||
:host {
|
||||
display: block;
|
||||
font-family: ${unsafeCSS(fonts.base)};
|
||||
}
|
||||
|
||||
.title-container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 48px 24px 24px 24px;
|
||||
}
|
||||
|
||||
.title-container.centered {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 48px;
|
||||
font-weight: 700;
|
||||
letter-spacing: -0.02em;
|
||||
line-height: 1.1;
|
||||
color: ${cssManager.bdTheme('#0a0a0a', '#fafafa')};
|
||||
margin: 0 0 16px 0;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 20px;
|
||||
color: ${cssManager.bdTheme('#6b7280', '#a1a1aa')};
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.title-container {
|
||||
padding: 32px 16px 20px 16px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 36px;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
`
|
||||
]
|
||||
|
||||
public render(): TemplateResult {
|
||||
return html`
|
||||
<div class="title-container ${this.centered ? 'centered' : ''}">
|
||||
<h1>${this.pageTitle}</h1>
|
||||
${this.pageSubtitle ? html`
|
||||
<p>${this.pageSubtitle}</p>
|
||||
` : ''}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
}
|
||||
@@ -46,7 +46,7 @@ export class UplStatuspageStatusbar extends DeesElement {
|
||||
.statusbar-container {
|
||||
margin: auto;
|
||||
max-width: 1200px;
|
||||
padding: 0 24px 24px 24px;
|
||||
padding: 24px 24px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@@ -157,6 +157,10 @@ export class UplStatuspageStatusbar extends DeesElement {
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.statusbar-container {
|
||||
padding: 16px 16px;
|
||||
}
|
||||
|
||||
.statusbar-inner {
|
||||
font-size: 13px;
|
||||
padding: 12px 16px;
|
||||
|
||||
@@ -45,12 +45,10 @@ export const statuspageAllgreen = () => html`
|
||||
const footer = wrapperElement.querySelector('upl-statuspage-footer') as any;
|
||||
|
||||
// Configure Header
|
||||
header.pageTitle = 'TechVault Services Status';
|
||||
header.pageTitle = 'TechVault';
|
||||
header.showReportButton = true;
|
||||
header.showSubscribeButton = true;
|
||||
header.logoUrl = 'https://via.placeholder.com/150x50/4CAF50/ffffff?text=TechVault';
|
||||
header.customStyles = true;
|
||||
header.brandColor = '#4CAF50';
|
||||
header.logoUrl = 'https://via.placeholder.com/150x50/4CAF50/ffffff?text=TV';
|
||||
|
||||
// Configure Overall Status - All Green
|
||||
statusBar.overallStatus = {
|
||||
|
||||
@@ -36,6 +36,7 @@ export const statuspageDemo = () => html`
|
||||
<dees-demowrapper
|
||||
.runAfterRender=${async (wrapperElement: any) => {
|
||||
const header = wrapperElement.querySelector('upl-statuspage-header') as any;
|
||||
const pageTitle = wrapperElement.querySelector('upl-statuspage-pagetitle') as any;
|
||||
const statusBar = wrapperElement.querySelector('upl-statuspage-statusbar') as any;
|
||||
const assetsSelector = wrapperElement.querySelector('upl-statuspage-assetsselector') as any;
|
||||
const statusDetails = wrapperElement.querySelector('upl-statuspage-statusdetails') as any;
|
||||
@@ -44,12 +45,14 @@ export const statuspageDemo = () => html`
|
||||
const footer = wrapperElement.querySelector('upl-statuspage-footer') as any;
|
||||
|
||||
// Configure Header
|
||||
header.pageTitle = 'CloudFlow Infrastructure Status';
|
||||
header.pageTitle = 'CloudFlow';
|
||||
header.showReportButton = true;
|
||||
header.showSubscribeButton = true;
|
||||
header.logoUrl = 'https://via.placeholder.com/150x50/2196F3/ffffff?text=CloudFlow';
|
||||
header.customStyles = true;
|
||||
header.brandColor = '#2196F3';
|
||||
header.logoUrl = 'https://via.placeholder.com/150x50/2196F3/ffffff?text=CF';
|
||||
|
||||
// Configure Page Title
|
||||
pageTitle.pageTitle = 'Service Status';
|
||||
pageTitle.pageSubtitle = 'Current operational status of CloudFlow Infrastructure services';
|
||||
|
||||
// Configure Overall Status
|
||||
statusBar.overallStatus = {
|
||||
@@ -639,6 +642,7 @@ export const statuspageDemo = () => html`
|
||||
}}
|
||||
>
|
||||
<upl-statuspage-header></upl-statuspage-header>
|
||||
<upl-statuspage-pagetitle></upl-statuspage-pagetitle>
|
||||
<upl-statuspage-statusbar></upl-statuspage-statusbar>
|
||||
<upl-statuspage-assetsselector></upl-statuspage-assetsselector>
|
||||
<upl-statuspage-statusdetails></upl-statuspage-statusdetails>
|
||||
|
||||
@@ -45,12 +45,10 @@ export const statuspageMaintenance = () => html`
|
||||
const footer = wrapperElement.querySelector('upl-statuspage-footer') as any;
|
||||
|
||||
// Configure Header
|
||||
header.pageTitle = 'SecureVault Infrastructure Status';
|
||||
header.pageTitle = 'SecureVault';
|
||||
header.showReportButton = true;
|
||||
header.showSubscribeButton = true;
|
||||
header.logoUrl = 'https://via.placeholder.com/150x50/2196F3/ffffff?text=SecureVault';
|
||||
header.customStyles = true;
|
||||
header.brandColor = '#2196F3';
|
||||
header.logoUrl = 'https://via.placeholder.com/150x50/2196F3/ffffff?text=SV';
|
||||
|
||||
// Configure Overall Status - Maintenance
|
||||
statusBar.overallStatus = {
|
||||
|
||||
@@ -45,12 +45,10 @@ export const statuspageOutage = () => html`
|
||||
const footer = wrapperElement.querySelector('upl-statuspage-footer') as any;
|
||||
|
||||
// Configure Header
|
||||
header.pageTitle = 'DataStream Platform Status';
|
||||
header.pageTitle = 'DataStream';
|
||||
header.showReportButton = true;
|
||||
header.showSubscribeButton = true;
|
||||
header.logoUrl = 'https://via.placeholder.com/150x50/F44336/ffffff?text=DataStream';
|
||||
header.customStyles = true;
|
||||
header.brandColor = '#F44336';
|
||||
header.logoUrl = 'https://via.placeholder.com/150x50/F44336/ffffff?text=DS';
|
||||
|
||||
// Configure Overall Status - Major Outage
|
||||
statusBar.overallStatus = {
|
||||
|
||||
Reference in New Issue
Block a user