Refactor admin pages to use shared head and navigation components
- Created `admin-head.php` for consistent <head> markup across admin pages. - Created `admin-nav.php` for shared navigation bar, reducing duplication. - Updated all admin pages (account, hours, index, login, menu, users) to utilize the new components. - Added security headers to `auth.php` and `index.php` for improved security. - Introduced `security-headers.php` to manage security headers across the application. - Moved inline styles from admin pages to SCSS files to comply with Content Security Policy (CSP). - Normalized file permissions during build process to prevent permission issues on deployment.
This commit is contained in:
1 parent
3286bce6b1
commit
c7b836bcf2
21 files changed
+447
-231
No files matched your search
@@ -0,0 +1,29 @@
|
||||
/* ---------- admin: announcements ---------- */
|
||||
/* Formerly inline style="" attributes on admin/index.php — moved here so
|
||||
the CSP can forbid inline styles. */
|
||||
.ann-summary {
|
||||
font-size: 0.82rem;
|
||||
margin-top: 0.2rem;
|
||||
max-width: 32ch;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.ann-schedule {
|
||||
font-size: 0.8rem;
|
||||
color: var(--ink-muted);
|
||||
}
|
||||
|
||||
.ann-placements {
|
||||
font-size: 0.82rem;
|
||||
color: var(--ink-muted);
|
||||
}
|
||||
|
||||
.ann-field-hint {
|
||||
font-size: 0.78rem;
|
||||
}
|
||||
|
||||
.inline-form {
|
||||
display: inline;
|
||||
}
|
||||
@@ -141,3 +141,12 @@
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
/* Formerly inline style="" attributes on admin/hours.php. */
|
||||
.hours-note {
|
||||
margin-top: 1.25rem;
|
||||
}
|
||||
|
||||
.hours-preview-intro {
|
||||
margin-bottom: 1.25rem;
|
||||
}
|
||||
@@ -94,5 +94,61 @@
|
||||
}
|
||||
|
||||
.menu-page-content {
|
||||
padding-top: 0;
|
||||
padding-bottom: 5.5rem;
|
||||
}
|
||||
|
||||
/* Formerly inline style="" attributes on menu.php — moved here so the
|
||||
CSP can forbid inline styles. */
|
||||
.menu-hero {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.menu-hero-title {
|
||||
font-size: clamp(2.4rem, 5vw, 3.8rem);
|
||||
color: var(--gold-bright);
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
.menu-hero-rule {
|
||||
margin-top: 1.5rem;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.menu-hero-intro {
|
||||
max-width: 52ch;
|
||||
margin: 0 auto;
|
||||
font-size: 1.05rem;
|
||||
}
|
||||
|
||||
.menu-page-container {
|
||||
max-width: 62rem;
|
||||
}
|
||||
|
||||
.menu-grid-flush {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.menu-empty {
|
||||
text-align: center;
|
||||
padding: 3rem 1.5rem;
|
||||
}
|
||||
|
||||
.menu-disclaimer {
|
||||
margin-top: 3.5rem;
|
||||
text-align: center;
|
||||
padding-top: 2rem;
|
||||
border-top: 1px solid var(--rule);
|
||||
}
|
||||
|
||||
.menu-disclaimer-text {
|
||||
font-size: 0.8rem;
|
||||
line-height: 1.6;
|
||||
max-width: 68ch;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.menu-disclaimer-ctas {
|
||||
margin-top: 2rem;
|
||||
justify-content: center;
|
||||
}
|
||||
@@ -31,4 +31,5 @@
|
||||
@use "pages/admin-login";
|
||||
@use "pages/admin-menu";
|
||||
@use "pages/admin-hours";
|
||||
@use "pages/admin-announcements";
|
||||
@use "pages/admin-account";
|
||||
Reference in new issue
Block a user