- Extract duplicated theme-toggle styles into shared mixin (theme-toggle-styles) - Remove duplicate CSS across privacy.scss, admin.scss, index.scss, and main.scss - Apply mixin consistently to .theme-toggle, .theme-toggle-admin classes - Update git repository references from GitHub to git.deco.sh - Update README.md, privacy.html, and deploy script URLs - Build optimized CSS with consolidated styles
310 lines
4.9 KiB
SCSS
310 lines
4.9 KiB
SCSS
// Import variables and mixins
|
|
@use '../variables' as *;
|
|
@use '../mixins' as *;
|
|
|
|
// Admin Page Styles
|
|
.admin-container {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
padding: $spacing-lg;
|
|
}
|
|
|
|
.login-section {
|
|
@include card($spacing-xl);
|
|
max-width: 400px;
|
|
margin: 50px auto;
|
|
|
|
.login-header {
|
|
@include flex-between;
|
|
align-items: center;
|
|
margin-bottom: $spacing-lg;
|
|
|
|
h2 {
|
|
margin: 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
.admin-section {
|
|
display: none;
|
|
}
|
|
|
|
// Admin Header
|
|
.admin-header {
|
|
@include flex-between;
|
|
margin-bottom: $spacing-lg;
|
|
}
|
|
|
|
.header-buttons {
|
|
display: flex;
|
|
gap: $spacing-sm;
|
|
align-items: center;
|
|
}
|
|
|
|
.header-btn {
|
|
@include button($bg-color: #6c757d);
|
|
|
|
&.btn-refresh {
|
|
@include button($bg-color: $primary-color);
|
|
}
|
|
|
|
&.btn-home {
|
|
@include button($bg-color: $success-color);
|
|
}
|
|
|
|
&.btn-logout {
|
|
@include button($bg-color: $danger-color);
|
|
}
|
|
}
|
|
|
|
.theme-toggle-admin {
|
|
@include theme-toggle-styles;
|
|
background: var(--card-bg) !important;
|
|
color: var(--text-color) !important;
|
|
padding: 0 !important;
|
|
}
|
|
|
|
// Stats Cards
|
|
.stats {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
gap: $spacing-lg;
|
|
margin-bottom: $spacing-lg;
|
|
}
|
|
|
|
.stat-card {
|
|
@include card;
|
|
text-align: center;
|
|
}
|
|
|
|
.stat-number {
|
|
font-size: 2em;
|
|
font-weight: bold;
|
|
color: $primary-color;
|
|
}
|
|
|
|
// Tables
|
|
.locations-table {
|
|
@include table-base;
|
|
margin-top: $spacing-lg;
|
|
}
|
|
|
|
// Buttons
|
|
.action-buttons {
|
|
display: flex;
|
|
gap: 5px;
|
|
}
|
|
|
|
.btn {
|
|
@include button($size: sm);
|
|
|
|
&-edit {
|
|
@include button($bg-color: $primary-color, $size: sm);
|
|
}
|
|
|
|
&-delete {
|
|
@include button($bg-color: $danger-color, $size: sm);
|
|
}
|
|
|
|
&-save {
|
|
@include button($bg-color: $success-color, $size: sm);
|
|
}
|
|
|
|
&-cancel {
|
|
@include button($bg-color: #6c757d, $size: sm);
|
|
}
|
|
}
|
|
|
|
// Edit State
|
|
.edit-row {
|
|
background-color: #fff3cd !important;
|
|
}
|
|
|
|
.edit-input {
|
|
@include input-base;
|
|
width: 100%;
|
|
font-size: $font-size-sm;
|
|
}
|
|
|
|
// Status Indicators
|
|
.status-indicator {
|
|
@include status-indicator(transparent, inherit);
|
|
}
|
|
|
|
.status-active {
|
|
@include status-indicator(#d4edda, #155724);
|
|
}
|
|
|
|
.status-expired {
|
|
@include status-indicator(#f8d7da, #721c24);
|
|
}
|
|
|
|
// Tabs
|
|
.tab-navigation {
|
|
display: flex;
|
|
margin-bottom: $spacing-lg;
|
|
border-bottom: 2px solid var(--border-color);
|
|
}
|
|
|
|
.tab-btn {
|
|
@include button($bg-color: transparent, $text-color: var(--text-color));
|
|
border-bottom: 3px solid transparent;
|
|
border-radius: 0;
|
|
|
|
&.active {
|
|
border-bottom-color: $primary-color;
|
|
color: $primary-color;
|
|
}
|
|
|
|
&:hover {
|
|
background-color: var(--table-hover);
|
|
transform: none;
|
|
}
|
|
}
|
|
|
|
.tab-content {
|
|
display: none;
|
|
|
|
&.active {
|
|
display: block;
|
|
}
|
|
}
|
|
|
|
// Profanity Management
|
|
.profanity-management {
|
|
.management-section {
|
|
@include card;
|
|
margin-bottom: $spacing-lg;
|
|
|
|
h4 {
|
|
margin-top: 0;
|
|
color: $primary-color;
|
|
}
|
|
}
|
|
|
|
.profanity-form {
|
|
display: grid;
|
|
grid-template-columns: 2fr 1fr 1fr auto;
|
|
gap: $spacing-sm;
|
|
align-items: end;
|
|
margin-bottom: $spacing-lg;
|
|
|
|
input, select {
|
|
@include input-base;
|
|
}
|
|
}
|
|
|
|
.test-section {
|
|
.test-form {
|
|
display: grid;
|
|
grid-template-columns: 1fr auto;
|
|
gap: $spacing-sm;
|
|
align-items: end;
|
|
|
|
textarea {
|
|
@include input-base;
|
|
resize: vertical;
|
|
min-height: 60px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.test-results {
|
|
margin-top: $spacing-md;
|
|
padding: $spacing-md;
|
|
border-radius: $border-radius-sm;
|
|
|
|
&.profane {
|
|
background-color: #f8d7da;
|
|
color: #721c24;
|
|
border: 1px solid #f5c6cb;
|
|
}
|
|
|
|
&.clean {
|
|
background-color: #d4edda;
|
|
color: #155724;
|
|
border: 1px solid #c3e6cb;
|
|
}
|
|
|
|
&.empty {
|
|
background-color: #f8f9fa;
|
|
color: #6c757d;
|
|
border: 1px solid #dee2e6;
|
|
}
|
|
}
|
|
|
|
.severity-low {
|
|
@include status-indicator(#d1ecf1, #0c5460);
|
|
}
|
|
|
|
.severity-medium {
|
|
@include status-indicator(#fff3cd, #856404);
|
|
}
|
|
|
|
.severity-high {
|
|
@include status-indicator(#f8d7da, #721c24);
|
|
}
|
|
|
|
.action-btn {
|
|
@include button($size: sm);
|
|
|
|
&.danger {
|
|
@include button($bg-color: $danger-color, $size: sm);
|
|
}
|
|
}
|
|
|
|
// Persistent Toggle
|
|
.persistent-toggle {
|
|
&.active {
|
|
@include button($bg-color: $warning-color, $text-color: #000);
|
|
}
|
|
|
|
&.inactive {
|
|
@include button($bg-color: #6c757d);
|
|
}
|
|
}
|
|
|
|
// Responsive Design
|
|
@include mobile {
|
|
.admin-container {
|
|
padding: $spacing-md;
|
|
}
|
|
|
|
.admin-header {
|
|
flex-direction: column;
|
|
gap: $spacing-md;
|
|
align-items: stretch;
|
|
}
|
|
|
|
.header-buttons {
|
|
justify-content: center;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.stats {
|
|
grid-template-columns: 1fr 1fr;
|
|
}
|
|
|
|
.locations-table {
|
|
font-size: $font-size-sm;
|
|
|
|
th, td {
|
|
padding: $spacing-xs $spacing-xs;
|
|
}
|
|
|
|
.address-cell {
|
|
max-width: 100px;
|
|
}
|
|
}
|
|
|
|
.btn {
|
|
padding: 3px 4px;
|
|
font-size: 9px;
|
|
}
|
|
|
|
.profanity-form {
|
|
grid-template-columns: 1fr;
|
|
gap: $spacing-sm;
|
|
}
|
|
}
|