update
This commit is contained in:
@@ -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;
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.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; }
|
||||
}
|
||||
|
||||
/* 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>
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user