- Add production Norwegian sales training website demo - Create placeholder CSS files for Hugo @import statements - Update .gitignore to exclude *_enhanced/ directories - Fix CSS MIME type issues for extensionless files in /css/ paths
663 lines
18 KiB
CSS
663 lines
18 KiB
CSS
/**
|
|
* Insertr - The Tailwind of CMS
|
|
* Unified CSS Styles with Cascade Layer Architecture
|
|
*/
|
|
|
|
@layer insertr {
|
|
/* =================================================================
|
|
CSS CUSTOM PROPERTIES - MODERN THEMING SYSTEM
|
|
================================================================= */
|
|
|
|
:root {
|
|
/* Color System */
|
|
--insertr-primary: #4f46e5;
|
|
--insertr-primary-hover: #4338ca;
|
|
--insertr-primary-active: #3730a3;
|
|
|
|
--insertr-success: #10b981;
|
|
--insertr-success-hover: #059669;
|
|
|
|
--insertr-danger: #dc2626;
|
|
--insertr-danger-hover: #b91c1c;
|
|
|
|
--insertr-warning: #f59e0b;
|
|
--insertr-warning-hover: #d97706;
|
|
|
|
--insertr-info: #3b82f6;
|
|
--insertr-info-hover: #2563eb;
|
|
|
|
--insertr-purple: #6f42c1;
|
|
--insertr-purple-hover: #5a359a;
|
|
|
|
/* Text Colors */
|
|
--insertr-text-primary: #1f2937;
|
|
--insertr-text-secondary: #374151;
|
|
--insertr-text-muted: #6b7280;
|
|
--insertr-text-inverse: #ffffff;
|
|
|
|
/* Background Colors */
|
|
--insertr-bg-primary: #ffffff;
|
|
--insertr-bg-secondary: #f8fafc;
|
|
--insertr-bg-muted: #f3f4f6;
|
|
--insertr-bg-overlay: rgba(0, 0, 0, 0.5);
|
|
|
|
/* Border Colors */
|
|
--insertr-border-light: #e5e7eb;
|
|
--insertr-border-medium: #d1d5db;
|
|
--insertr-border-dark: #374151;
|
|
|
|
/* Component Colors */
|
|
--insertr-form-border: var(--insertr-border-medium);
|
|
--insertr-form-border-focus: var(--insertr-info);
|
|
|
|
/* Shadows */
|
|
--insertr-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
--insertr-shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
|
|
--insertr-shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.15);
|
|
--insertr-shadow-xl: 0 10px 25px rgba(0, 0, 0, 0.2);
|
|
|
|
/* Spacing */
|
|
--insertr-radius-sm: 4px;
|
|
--insertr-radius-md: 6px;
|
|
--insertr-radius-lg: 8px;
|
|
|
|
/* Z-Index Scale */
|
|
--insertr-z-tooltip: 1000;
|
|
--insertr-z-overlay: 9999;
|
|
--insertr-z-modal: 10000;
|
|
--insertr-z-modal-backdrop: 10001;
|
|
}
|
|
|
|
/* Dark Theme Override (when parent site uses dark theme) */
|
|
[data-theme="dark"] {
|
|
--insertr-text-primary: #f9fafb;
|
|
--insertr-text-secondary: #e5e7eb;
|
|
--insertr-text-muted: #9ca3af;
|
|
--insertr-bg-primary: #1f2937;
|
|
--insertr-bg-secondary: #374151;
|
|
--insertr-bg-muted: #4b5563;
|
|
--insertr-border-light: #4b5563;
|
|
--insertr-border-medium: #6b7280;
|
|
}
|
|
|
|
/* =================================================================
|
|
FOUNDATION & SPECIFIC TARGETING
|
|
=================================================================
|
|
|
|
HYBRID CSS ARCHITECTURE:
|
|
|
|
This CSS uses a hybrid approach for maximum browser compatibility:
|
|
|
|
1. MODERN BROWSERS: @layer insertr provides cascade layer isolation
|
|
- Layered styles automatically win over unlayered styles
|
|
- Clean separation regardless of specificity
|
|
- Future-proof CSS architecture
|
|
|
|
2. LEGACY BROWSERS: Higher specificity fallback selectors
|
|
- html body .insertr-* selectors (0,0,3,0) beat universal * (0,0,0,1)
|
|
- Works in all browsers back to IE6
|
|
- Ensures consistent behavior across environments
|
|
|
|
This ensures our form elements maintain proper spacing and styling
|
|
even on sites with aggressive CSS resets like "* {margin:0; padding:0}"
|
|
================================================================= */
|
|
|
|
/* Minimal gate foundation */
|
|
.insertr-gate {
|
|
cursor: pointer;
|
|
user-select: none;
|
|
}
|
|
|
|
/* UI component protection - specific targeting only */
|
|
.insertr-edit-form,
|
|
.insertr-edit-form * {
|
|
color: var(--insertr-text-primary);
|
|
}
|
|
|
|
.insertr-auth-controls,
|
|
.insertr-auth-controls * {
|
|
color: var(--insertr-text-primary);
|
|
}
|
|
|
|
.insertr-version-modal,
|
|
.insertr-version-modal * {
|
|
color: var(--insertr-text-primary);
|
|
}
|
|
|
|
/* Component-specific color overrides */
|
|
.insertr-btn-save,
|
|
.insertr-btn-cancel,
|
|
.insertr-btn-history,
|
|
.insertr-auth-btn {
|
|
color: var(--insertr-text-inverse);
|
|
}
|
|
|
|
.insertr-form-help {
|
|
color: var(--insertr-text-muted);
|
|
}
|
|
|
|
.insertr-status-text {
|
|
color: var(--insertr-text-secondary);
|
|
}
|
|
|
|
/* =================================================================
|
|
AUTHENTICATION CONTROLS
|
|
================================================================= */
|
|
|
|
.insertr-auth-controls {
|
|
position: fixed;
|
|
bottom: 20px;
|
|
right: 20px;
|
|
z-index: var(--insertr-z-overlay);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
}
|
|
|
|
.insertr-auth-btn {
|
|
background: var(--insertr-primary);
|
|
color: var(--insertr-text-inverse);
|
|
border: none;
|
|
padding: 8px 16px;
|
|
border-radius: var(--insertr-radius-md);
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
box-shadow: var(--insertr-shadow-sm);
|
|
}
|
|
|
|
.insertr-auth-btn:hover {
|
|
background: var(--insertr-primary-hover);
|
|
transform: translateY(-1px);
|
|
box-shadow: var(--insertr-shadow-md);
|
|
}
|
|
|
|
.insertr-auth-btn.insertr-authenticated {
|
|
background: var(--insertr-success);
|
|
}
|
|
|
|
.insertr-auth-btn.insertr-authenticated:hover {
|
|
background: var(--insertr-success-hover);
|
|
}
|
|
|
|
.insertr-auth-btn.insertr-edit-active {
|
|
background: var(--insertr-danger);
|
|
}
|
|
|
|
.insertr-auth-btn.insertr-edit-active:hover {
|
|
background: var(--insertr-danger-hover);
|
|
}
|
|
|
|
.insertr-status-controls {
|
|
position: fixed;
|
|
bottom: 20px;
|
|
left: 20px;
|
|
z-index: var(--insertr-z-overlay);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
}
|
|
|
|
.insertr-status {
|
|
background: var(--insertr-bg-primary);
|
|
border: 1px solid var(--insertr-border-light);
|
|
border-radius: var(--insertr-radius-lg);
|
|
padding: 8px 12px;
|
|
box-shadow: var(--insertr-shadow-md);
|
|
max-width: 200px;
|
|
}
|
|
|
|
.insertr-status-content {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.insertr-status-text {
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
color: var(--insertr-text-secondary);
|
|
}
|
|
|
|
.insertr-status-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
background: var(--insertr-text-muted);
|
|
}
|
|
|
|
.insertr-status-dot.insertr-status-visitor {
|
|
background: var(--insertr-text-muted);
|
|
}
|
|
|
|
.insertr-status-dot.insertr-status-authenticated {
|
|
background: var(--insertr-success);
|
|
}
|
|
|
|
.insertr-status-dot.insertr-status-editing {
|
|
background: var(--insertr-danger);
|
|
animation: insertr-pulse 2s infinite;
|
|
}
|
|
|
|
@keyframes insertr-pulse {
|
|
|
|
0%,
|
|
100% {
|
|
opacity: 1;
|
|
}
|
|
|
|
50% {
|
|
opacity: 0.5;
|
|
}
|
|
}
|
|
|
|
.insertr-authenticated.insertr-edit-mode .insertr {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.insertr-authenticated.insertr-edit-mode .insertr:hover {
|
|
outline: 2px dashed #007cba !important;
|
|
outline-offset: 2px !important;
|
|
background-color: rgba(0, 124, 186, 0.05) !important;
|
|
}
|
|
|
|
/* =================================================================
|
|
EDITOR STYLES
|
|
================================================================= */
|
|
|
|
.insertr-editing-hover {
|
|
outline: 2px dashed var(--insertr-info) !important;
|
|
outline-offset: 2px !important;
|
|
background-color: color-mix(in srgb, var(--insertr-info) 5%, transparent) !important;
|
|
}
|
|
|
|
.insertr:hover::after {
|
|
content: "✏️ " attr(data-content-type);
|
|
position: absolute;
|
|
top: -25px;
|
|
left: 0;
|
|
background: #007cba;
|
|
color: white;
|
|
padding: 2px 6px;
|
|
font-size: 11px;
|
|
border-radius: 3px;
|
|
white-space: nowrap;
|
|
z-index: 1000;
|
|
font-family: monospace;
|
|
}
|
|
|
|
/* =================================================================
|
|
MODAL AND FORM STYLES
|
|
================================================================= */
|
|
|
|
/* Overlay and Form Container */
|
|
.insertr-form-overlay {
|
|
position: absolute;
|
|
z-index: 10000;
|
|
}
|
|
|
|
.insertr-edit-form {
|
|
background: var(--insertr-bg-primary);
|
|
border: 2px solid var(--insertr-info);
|
|
border-radius: var(--insertr-radius-lg);
|
|
padding: 1rem;
|
|
box-shadow: var(--insertr-shadow-lg);
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
min-width: 600px;
|
|
max-width: 800px;
|
|
color: #1f2937;
|
|
}
|
|
|
|
/* Form Header */
|
|
.insertr-edit-form .insertr-form-header {
|
|
font-weight: 600;
|
|
color: var(--insertr-text-primary);
|
|
margin-bottom: 1rem;
|
|
padding-bottom: 0.5rem;
|
|
border-bottom: 1px solid var(--insertr-border-light);
|
|
font-size: 0.875rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
/* Form Groups and Fields */
|
|
.insertr-edit-form .insertr-form-group {
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.insertr-edit-form .insertr-form-group:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
/* Higher specificity fallback for browsers without cascade layer support */
|
|
html body .insertr-edit-form .insertr-form-group {
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
html body .insertr-edit-form .insertr-form-group:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.insertr-form-label {
|
|
display: block;
|
|
font-weight: 600;
|
|
color: var(--insertr-text-secondary);
|
|
margin-bottom: 0.5rem;
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.insertr-edit-form .insertr-form-input,
|
|
.insertr-edit-form .insertr-form-textarea {
|
|
width: 100%;
|
|
padding: 0.75rem;
|
|
border: 1px solid var(--insertr-form-border);
|
|
border-radius: var(--insertr-radius-md);
|
|
font-family: inherit;
|
|
font-size: 1rem;
|
|
color: var(--insertr-text-primary);
|
|
background-color: var(--insertr-bg-primary);
|
|
transition: border-color 0.2s, box-shadow 0.2s;
|
|
box-sizing: border-box;
|
|
margin: 0;
|
|
}
|
|
|
|
/* Higher specificity fallback for browsers without cascade layer support */
|
|
html body .insertr-edit-form .insertr-form-input,
|
|
html body .insertr-edit-form .insertr-form-textarea {
|
|
padding: 0.75rem;
|
|
margin: 0;
|
|
}
|
|
|
|
.insertr-form-input:focus,
|
|
.insertr-form-textarea:focus {
|
|
outline: none;
|
|
border-color: var(--insertr-form-border-focus);
|
|
box-shadow: 0 0 0 3px color-mix(in srgb, var(--insertr-info) 10%, transparent);
|
|
}
|
|
|
|
/* Markdown Editor Styling */
|
|
.insertr-form-textarea {
|
|
min-height: 120px;
|
|
resize: vertical;
|
|
font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
|
|
}
|
|
|
|
.insertr-markdown-editor {
|
|
min-height: 200px;
|
|
font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
|
|
font-size: 0.9rem;
|
|
line-height: 1.5;
|
|
color: var(--insertr-text-primary);
|
|
background-color: var(--insertr-bg-secondary);
|
|
}
|
|
|
|
/* Form Actions */
|
|
.insertr-edit-form .insertr-form-actions {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
justify-content: flex-end;
|
|
margin-top: 1rem;
|
|
padding-top: 1rem;
|
|
border-top: 1px solid var(--insertr-border-light);
|
|
}
|
|
|
|
/* Higher specificity fallback for browsers without cascade layer support */
|
|
html body .insertr-edit-form .insertr-form-actions {
|
|
margin-top: 1rem;
|
|
padding-top: 1rem;
|
|
}
|
|
|
|
.insertr-edit-form .insertr-btn-save {
|
|
background: var(--insertr-success);
|
|
color: var(--insertr-text-inverse);
|
|
border: none;
|
|
padding: 0.5rem 1rem;
|
|
margin: 0;
|
|
border-radius: var(--insertr-radius-md);
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
/* Higher specificity fallback for browsers without cascade layer support */
|
|
html body .insertr-edit-form .insertr-btn-save {
|
|
padding: 0.5rem 1rem;
|
|
margin: 0;
|
|
}
|
|
|
|
.insertr-btn-save:hover {
|
|
background: var(--insertr-success-hover);
|
|
transform: translateY(-1px);
|
|
box-shadow: var(--insertr-shadow-sm);
|
|
}
|
|
|
|
.insertr-edit-form .insertr-btn-cancel {
|
|
background: var(--insertr-text-muted);
|
|
color: var(--insertr-text-inverse);
|
|
border: none;
|
|
padding: 0.5rem 1rem;
|
|
margin: 0;
|
|
border-radius: var(--insertr-radius-md);
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
/* Higher specificity fallback for browsers without cascade layer support */
|
|
html body .insertr-edit-form .insertr-btn-cancel {
|
|
padding: 0.5rem 1rem;
|
|
margin: 0;
|
|
}
|
|
|
|
.insertr-btn-cancel:hover {
|
|
background: var(--insertr-text-secondary);
|
|
transform: translateY(-1px);
|
|
box-shadow: var(--insertr-shadow-sm);
|
|
}
|
|
|
|
/* Preview Styling */
|
|
.insertr-preview-active {
|
|
background-color: rgba(16, 185, 129, 0.1) !important;
|
|
border: 1px dashed #10b981 !important;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
/* Form Help Text */
|
|
.insertr-form-help {
|
|
font-size: 0.75rem;
|
|
color: #6b7280;
|
|
margin-top: 0.25rem;
|
|
font-style: italic;
|
|
}
|
|
|
|
/* Responsive Design */
|
|
@media (max-width: 768px) {
|
|
.insertr-edit-form {
|
|
min-width: 300px;
|
|
max-width: calc(100vw - 40px);
|
|
}
|
|
}
|
|
|
|
/* =================================================================
|
|
VERSION HISTORY MODAL STYLES
|
|
================================================================= */
|
|
|
|
.insertr-version-modal {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
z-index: 10001;
|
|
}
|
|
|
|
.insertr-version-backdrop {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 20px;
|
|
}
|
|
|
|
.insertr-version-content-modal {
|
|
background: white;
|
|
border-radius: 8px;
|
|
max-width: 600px;
|
|
width: 100%;
|
|
max-height: 80vh;
|
|
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.insertr-version-header {
|
|
padding: 20px 20px 0;
|
|
border-bottom: 1px solid #eee;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.insertr-version-header h3 {
|
|
margin: 0 0 20px;
|
|
color: #333;
|
|
font-size: 18px;
|
|
}
|
|
|
|
.insertr-btn-close {
|
|
background: none;
|
|
border: none;
|
|
font-size: 24px;
|
|
cursor: pointer;
|
|
color: #666;
|
|
padding: 0;
|
|
width: 30px;
|
|
height: 30px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.insertr-btn-close:hover {
|
|
color: #333;
|
|
}
|
|
|
|
.insertr-version-list {
|
|
overflow-y: auto;
|
|
padding: 20px;
|
|
flex: 1;
|
|
}
|
|
|
|
.insertr-version-item {
|
|
border: 1px solid #e1e5e9;
|
|
border-radius: 6px;
|
|
padding: 16px;
|
|
margin-bottom: 12px;
|
|
background: #f8f9fa;
|
|
}
|
|
|
|
.insertr-version-meta {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
margin-bottom: 8px;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.insertr-version-label {
|
|
font-weight: 600;
|
|
color: #0969da;
|
|
}
|
|
|
|
.insertr-version-date {
|
|
color: #656d76;
|
|
}
|
|
|
|
.insertr-version-user {
|
|
color: #656d76;
|
|
}
|
|
|
|
.insertr-version-content {
|
|
margin-bottom: 12px;
|
|
padding: 8px;
|
|
background: white;
|
|
border-radius: 4px;
|
|
font-family: monospace;
|
|
font-size: 14px;
|
|
color: #24292f;
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
.insertr-version-actions {
|
|
display: flex;
|
|
gap: 8px;
|
|
}
|
|
|
|
.insertr-btn-restore {
|
|
background: #0969da;
|
|
color: white;
|
|
border: none;
|
|
padding: 6px 12px;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.insertr-btn-restore:hover {
|
|
background: #0860ca;
|
|
}
|
|
|
|
.insertr-btn-view-diff {
|
|
background: #f6f8fa;
|
|
color: #24292f;
|
|
border: 1px solid #d1d9e0;
|
|
padding: 6px 12px;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.insertr-btn-view-diff:hover {
|
|
background: #f3f4f6;
|
|
}
|
|
|
|
.insertr-version-empty {
|
|
text-align: center;
|
|
color: #656d76;
|
|
font-style: italic;
|
|
padding: 40px 20px;
|
|
}
|
|
|
|
/* History Button in Form */
|
|
.insertr-btn-history {
|
|
background: #6f42c1;
|
|
color: white;
|
|
border: none;
|
|
padding: 8px 16px;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
margin-left: auto;
|
|
}
|
|
|
|
.insertr-btn-history:hover {
|
|
background: #5a359a;
|
|
}
|
|
}
|