iamfebin's picture
feat(security): implement strict CSP security headers middleware and externalize inline scripts
e3d939d
Raw History Blame Contribute Delete
3.2 kB
/* Critical skeleton loader stylesheet loaded externally for strict CSP compliance */
*, *::before, *::after {
box-sizing: border-box;
}
html, body {
margin: 0 !important;
padding: 0 !important;
width: 100% !important;
height: 100% !important;
overflow: hidden !important;
background: #0f172a;
}
#root {
width: 100%;
height: 100%;
overflow: hidden;
}
#app-loader {
position: fixed;
inset: 0;
width: 100%;
height: 100%;
overflow: hidden;
z-index: 9999;
}
.skel-container {
position: fixed;
inset: 0;
width: 100%;
height: 100%;
overflow: hidden;
background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
font-family: 'Be Vietnam Pro', system-ui, sans-serif;
user-select: none;
}
.skel-bg {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
background-size: cover;
background-position: center;
z-index: 0;
filter: saturate(1.5) contrast(1.25);
}
.skel-spinner-container {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
z-index: 10;
gap: 1rem;
}
.skel-spinner {
width: 3rem;
height: 3rem;
border: 4px solid rgba(255, 255, 255, 0.2);
border-top-color: white;
border-radius: 50%;
animation: skel-spin 1s linear infinite;
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
@keyframes skel-spin {
100% {
transform: rotate(360deg);
}
}
.skel-text {
color: white;
font-family: 'Courier Prime', monospace;
font-size: 0.875rem;
letter-spacing: 0.05em;
opacity: 0.9;
background: rgba(0, 0, 0, 0.3);
padding: 0.25rem 0.75rem;
border-radius: 0.25rem;
min-height: 1.75rem;
}
/* Matching App.tsx retro taskbar styling */
.skel-taskbar {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 3.5rem;
background: #0ea5e9;
border-top: 4px solid #1E293B;
display: flex;
align-items: center;
justify-content: space-between;
z-index: 50;
box-shadow: 0 -4px 0 0 rgba(30, 41, 59, 0.1);
}
.skel-start-btn {
height: 100%;
min-width: 7.5rem;
padding: 0 1.5rem;
display: flex;
align-items: center;
gap: 0.5rem;
background: #39ff14;
border-right: 4px solid #1E293B;
color: #1E293B;
font-family: 'Bricolage Grotesque', sans-serif;
font-weight: bold;
font-style: italic;
font-size: 1.125rem;
box-shadow: inset -3px -3px 0px rgba(0, 0, 0, 0.2), inset 3px 3px 0px rgba(255, 255, 255, 0.5);
}
.skel-start-icon {
display: inline-block;
width: 24px;
height: 24px;
line-height: 24px;
overflow: hidden;
text-align: center;
font-variation-settings: 'FILL' 1;
font-size: 24px;
}
.skel-clock {
height: 100%;
padding: 0 1rem;
border-left: 4px solid #1E293B;
background: #0369a1;
display: flex;
align-items: center;
justify-content: center;
gap: 1rem;
box-shadow: inset 3px 3px 0px rgba(0, 0, 0, 0.2);
}
.skel-pulse {
height: 0.5rem;
background: rgba(255, 255, 255, 0.3);
border-radius: 0.125rem;
animation: skel-pulse-anim 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.skel-pulse-sm {
width: 1rem;
}
.skel-pulse-md {
width: 2rem;
}
@keyframes skel-pulse-anim {
0%, 100% {
opacity: 1;
}
50% {
opacity: 0.4;
}
}