Files
bDS/src/renderer/components/Editor/Editor.css
2026-02-22 15:08:09 +01:00

1035 lines
19 KiB
CSS

.editor {
flex: 1;
display: flex;
flex-direction: column;
background-color: var(--vscode-editor-background);
overflow: hidden;
}
.editor-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 12px;
height: 35px;
background-color: var(--vscode-tab-activeBackground);
border-bottom: 1px solid var(--vscode-panel-border);
}
.editor-tabs {
display: flex;
align-items: center;
gap: 2px;
}
.editor-tab {
display: flex;
align-items: center;
gap: 6px;
padding: 6px 12px;
background-color: var(--vscode-tab-inactiveBackground);
color: var(--vscode-tab-inactiveForeground);
font-size: 13px;
border-radius: 4px 4px 0 0;
}
.editor-tab.active {
background-color: var(--vscode-tab-activeBackground);
color: var(--vscode-tab-activeForeground);
}
.editor-tab-dirty {
color: var(--vscode-notificationsWarningIcon-foreground);
font-size: 10px;
}
.editor-actions {
display: flex;
align-items: center;
gap: 8px;
}
.status-badge {
padding: 2px 8px;
border-radius: 10px;
font-size: 11px;
font-weight: 500;
text-transform: uppercase;
}
.status-badge.status-draft {
background-color: rgba(204, 167, 0, 0.2);
color: var(--vscode-notificationsWarningIcon-foreground);
}
.status-badge.status-published {
background-color: rgba(115, 201, 145, 0.2);
color: var(--vscode-testing-iconPassed);
}
.status-badge.status-archived {
background-color: rgba(133, 133, 133, 0.2);
color: var(--vscode-descriptionForeground);
}
.status-badge.status-unsaved {
background-color: rgba(245, 158, 11, 0.2);
color: #f59e0b;
}
.editor-tab-badge {
padding: 1px 5px;
border-radius: 8px;
font-size: 9px;
font-weight: 600;
text-transform: uppercase;
margin-left: 6px;
}
.editor-tab-badge.new {
background-color: rgba(59, 130, 246, 0.2);
color: #3b82f6;
}
.editor-actions button {
padding: 4px 10px;
font-size: 12px;
}
.editor-actions button.danger:hover {
background-color: var(--vscode-notificationsErrorIcon-foreground);
}
.auto-save-indicator {
font-size: 11px;
color: var(--vscode-descriptionForeground);
font-style: italic;
}
.editor-content {
flex: 1;
display: flex;
flex-direction: column;
padding: 16px;
overflow-y: auto;
gap: 16px;
}
.editor-header-row {
display: flex;
gap: 16px;
align-items: flex-start;
}
.editor-meta {
display: flex;
flex-direction: column;
gap: 8px;
flex: 1;
min-width: 0;
}
.editor-media-panel {
width: 200px;
flex-shrink: 0;
}
.editor-field {
display: flex;
flex-direction: column;
gap: 4px;
flex: 1;
min-width: 200px;
}
.editor-field label {
font-size: 11px;
font-weight: 500;
color: var(--vscode-descriptionForeground);
text-transform: uppercase;
letter-spacing: 0.5px;
}
.editor-field input,
.editor-field textarea {
padding: 8px 10px;
border-radius: 4px;
}
.editor-field input.disabled {
opacity: 0.6;
cursor: not-allowed;
}
.editor-field-row {
display: flex;
gap: 12px;
}
.editor-body {
flex: 1;
display: flex;
flex-direction: column;
gap: 4px;
min-height: 300px;
}
.editor-body label {
font-size: 11px;
font-weight: 500;
color: var(--vscode-descriptionForeground);
text-transform: uppercase;
letter-spacing: 0.5px;
}
.editor-body textarea {
flex: 1;
resize: none;
font-family: var(--vscode-editor-font-family);
font-size: var(--vscode-editor-font-size);
line-height: 1.5;
padding: 12px;
border-radius: 4px;
}
.editor-toolbar {
display: grid;
grid-template-columns: 1fr auto 1fr;
align-items: center;
gap: 8px;
margin-bottom: 8px;
}
.editor-toolbar-left {
display: flex;
align-items: center;
justify-content: flex-start;
}
.editor-toolbar-center {
display: flex;
align-items: center;
justify-content: center;
}
.editor-toolbar-right {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 6px;
min-width: 0;
}
.editor-mode-toggle {
display: flex;
gap: 4px;
}
.editor-mode-toggle button {
padding: 4px 12px;
font-size: 12px;
border-radius: 4px;
background-color: var(--vscode-button-secondaryBackground);
color: var(--vscode-button-secondaryForeground);
border: none;
cursor: pointer;
transition: background-color 0.15s;
}
.editor-mode-toggle button:hover {
background-color: var(--vscode-button-secondaryHoverBackground);
}
.editor-mode-toggle button.active {
background-color: var(--vscode-button-background);
color: var(--vscode-button-foreground);
}
.gallery-button {
padding: 4px 12px;
font-size: 12px;
border-radius: 4px;
background-color: var(--vscode-button-secondaryBackground);
color: var(--vscode-button-secondaryForeground);
border: none;
cursor: pointer;
transition: background-color 0.15s;
}
.gallery-button:hover {
background-color: var(--vscode-button-secondaryHoverBackground);
}
.insert-post-link-button,
.insert-media-button {
padding: 4px 8px;
font-size: 14px;
border-radius: 4px;
background-color: var(--vscode-button-secondaryBackground);
color: var(--vscode-button-secondaryForeground);
border: none;
cursor: pointer;
transition: background-color 0.15s;
}
.insert-post-link-button:hover,
.insert-media-button:hover {
background-color: var(--vscode-button-secondaryHoverBackground);
}
.editor-preview {
flex: 1;
background-color: var(--vscode-input-background);
border-radius: 4px;
overflow: hidden;
position: relative;
}
.editor-preview-frame {
width: 100%;
height: 100%;
border: none;
background: var(--vscode-editor-background);
}
.editor-preview-loading {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
color: var(--vscode-descriptionForeground);
}
.editor-field-row {
display: flex;
gap: 12px;
width: 100%;
}
.editor-field-row .editor-field {
flex: 1;
}
.editor-footer {
display: flex;
align-items: center;
gap: 16px;
padding: 8px 16px;
border-top: 1px solid var(--vscode-panel-border);
background-color: var(--vscode-sideBar-background);
}
/* Media Editor */
.media-editor {
flex-direction: row;
gap: 24px;
}
.media-preview {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
background-color: var(--vscode-input-background);
border-radius: 8px;
min-height: 300px;
}
.media-preview-placeholder {
display: flex;
flex-direction: column;
align-items: center;
gap: 12px;
color: var(--vscode-descriptionForeground);
}
.media-preview-image {
max-width: 100%;
max-height: 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 16px;
}
.media-preview-image img {
max-width: 100%;
max-height: 100%;
object-fit: contain;
border-radius: 4px;
}
.media-preview-image.has-error::after {
content: 'Image not found';
color: var(--vscode-descriptionForeground);
font-size: 14px;
}
.media-details {
width: 320px;
display: flex;
flex-direction: column;
gap: 12px;
}
.media-details textarea {
resize: vertical;
}
/* Empty State / Dashboard */
.editor-empty {
flex: 1;
display: flex;
align-items: flex-start;
justify-content: center;
background-color: var(--vscode-editor-background);
overflow-y: auto;
padding: 40px 20px;
}
.dashboard-content {
max-width: 720px;
width: 100%;
}
.dashboard-content h1 {
font-size: 24px;
font-weight: 400;
margin-bottom: 4px;
color: var(--vscode-editor-foreground);
}
.dashboard-content > .text-muted {
margin-bottom: 24px;
display: block;
}
/* Stat cards */
.dashboard-stats {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 12px;
margin-bottom: 24px;
}
.stat-card {
padding: 16px;
background-color: var(--vscode-sideBar-background);
border-radius: 6px;
}
.stat-number {
font-size: 32px;
font-weight: 600;
color: var(--vscode-editor-foreground);
line-height: 1;
margin-bottom: 4px;
}
.stat-label {
font-size: 12px;
color: var(--vscode-descriptionForeground);
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 10px;
}
.stat-breakdown {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.stat-tag {
font-size: 11px;
padding: 2px 8px;
border-radius: 3px;
background-color: var(--vscode-input-background);
color: var(--vscode-descriptionForeground);
}
.stat-published {
color: var(--vscode-testing-iconPassed, #73c991);
}
.stat-draft {
color: var(--vscode-editorWarning-foreground, #cca700);
}
.stat-archived {
color: var(--vscode-descriptionForeground);
}
/* Dashboard sections */
.dashboard-section {
background-color: var(--vscode-sideBar-background);
border-radius: 6px;
padding: 16px;
margin-bottom: 12px;
}
.dashboard-section h4 {
font-size: 11px;
font-weight: 600;
color: var(--vscode-descriptionForeground);
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 12px;
}
/* Timeline chart */
.timeline-chart {
display: flex;
align-items: flex-end;
gap: 4px;
height: 100px;
}
.timeline-bar-container {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
height: 100%;
}
.timeline-bar {
width: 100%;
max-width: 40px;
background-color: var(--vscode-button-background);
border-radius: 3px 3px 0 0;
margin-top: auto;
min-height: 4px;
position: relative;
transition: opacity 0.15s;
}
.timeline-bar:hover {
opacity: 0.8;
}
.timeline-bar-count {
position: absolute;
top: -16px;
left: 50%;
transform: translateX(-50%);
font-size: 10px;
color: var(--vscode-descriptionForeground);
}
.timeline-bar-label {
display: flex;
flex-direction: column;
align-items: center;
font-size: 9px;
color: var(--vscode-descriptionForeground);
margin-top: 4px;
line-height: 1.15;
}
.timeline-bar-label-month {
white-space: nowrap;
}
.timeline-bar-label-year {
font-size: 8px;
}
/* Tag cloud */
.tag-cloud {
display: flex;
flex-wrap: wrap;
gap: 6px 10px;
align-items: baseline;
line-height: 1.6;
}
.dashboard-tag {
padding: 2px 8px;
border-radius: 10px;
background-color: var(--vscode-input-background);
color: var(--vscode-editor-foreground);
cursor: default;
transition: opacity 0.15s;
white-space: nowrap;
}
.dashboard-tag:hover {
opacity: 0.75;
}
.dashboard-tag.has-color {
border-radius: 12px;
}
.dashboard-tag.has-color:hover {
opacity: 0.85;
}
.tag-cloud-more {
font-size: 11px;
}
.tag-count {
font-size: 10px;
opacity: 0.5;
margin-left: 2px;
}
.dashboard-category {
font-size: 12px;
border: 1px solid var(--vscode-input-border);
}
/* Recent posts */
.recent-posts-list {
display: flex;
flex-direction: column;
}
.recent-post-item {
display: flex;
align-items: center;
gap: 10px;
padding: 6px 8px;
border-radius: 4px;
cursor: pointer;
font-size: 12px;
}
.recent-post-item:hover {
background-color: var(--vscode-list-hoverBackground);
}
.recent-post-title {
flex: 1;
color: var(--vscode-editor-foreground);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.recent-post-status {
font-size: 10px;
padding: 1px 6px;
border-radius: 3px;
background-color: var(--vscode-input-background);
text-transform: uppercase;
letter-spacing: 0.3px;
}
.recent-post-status.status-published {
color: var(--vscode-testing-iconPassed, #73c991);
}
.recent-post-status.status-draft {
color: var(--vscode-editorWarning-foreground, #cca700);
}
.recent-post-date {
color: var(--vscode-descriptionForeground);
font-size: 11px;
white-space: nowrap;
}
/* Linked Posts Section in Media Editor */
.linked-posts-section label {
display: flex;
justify-content: space-between;
align-items: center;
}
.add-link-btn {
background: var(--vscode-button-secondaryBackground);
border: none;
color: var(--vscode-button-secondaryForeground);
padding: 2px 8px;
border-radius: 3px;
cursor: pointer;
font-size: 11px;
}
.add-link-btn:hover {
background: var(--vscode-button-secondaryHoverBackground);
}
.post-picker {
background: var(--vscode-dropdown-background);
border: 1px solid var(--vscode-dropdown-border);
border-radius: 4px;
margin-top: 8px;
max-height: 250px;
overflow-y: auto;
}
.post-picker-search {
padding: 8px;
border-bottom: 1px solid var(--vscode-dropdown-border);
position: sticky;
top: 0;
background: var(--vscode-dropdown-background);
}
.post-picker-search input {
width: 100%;
padding: 6px 10px;
background: var(--vscode-input-background);
border: 1px solid var(--vscode-input-border);
border-radius: 3px;
color: var(--vscode-input-foreground);
font-size: 12px;
}
.post-picker-search input:focus {
outline: none;
border-color: var(--vscode-focusBorder);
}
.post-picker-list {
padding: 4px;
}
.post-picker-item {
padding: 6px 8px;
cursor: pointer;
border-radius: 3px;
font-size: 12px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.post-picker-item:hover {
background: var(--vscode-list-hoverBackground);
}
.post-picker-more {
padding: 6px 8px;
color: var(--vscode-descriptionForeground);
font-size: 11px;
font-style: italic;
}
.no-posts,
.no-linked-posts {
padding: 12px 8px;
color: var(--vscode-descriptionForeground);
font-size: 12px;
font-style: italic;
}
.linked-posts-list {
margin-top: 8px;
display: flex;
flex-direction: column;
gap: 4px;
}
.linked-post-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 6px 8px;
background: var(--vscode-sideBar-background);
border-radius: 4px;
}
.linked-post-title {
cursor: pointer;
font-size: 12px;
flex: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.linked-post-title:hover {
color: var(--vscode-textLink-foreground);
text-decoration: underline;
}
.linked-post-item .unlink-btn {
background: none;
border: none;
color: var(--vscode-descriptionForeground);
cursor: pointer;
padding: 0 4px;
font-size: 14px;
opacity: 0;
transition: opacity 0.1s;
}
.linked-post-item:hover .unlink-btn {
opacity: 1;
}
.linked-post-item .unlink-btn:hover {
color: var(--vscode-errorForeground);
}
/* Gallery Macro Styles for Preview */
.macro-gallery {
margin: 16px 0;
}
.gallery-container {
display: grid;
gap: 8px;
}
.macro-gallery.gallery-cols-1 .gallery-container { grid-template-columns: 1fr; }
.macro-gallery.gallery-cols-2 .gallery-container { grid-template-columns: repeat(2, 1fr); }
.macro-gallery.gallery-cols-3 .gallery-container { grid-template-columns: repeat(3, 1fr); }
.macro-gallery.gallery-cols-4 .gallery-container { grid-template-columns: repeat(4, 1fr); }
.macro-gallery.gallery-cols-5 .gallery-container { grid-template-columns: repeat(5, 1fr); }
.macro-gallery.gallery-cols-6 .gallery-container { grid-template-columns: repeat(6, 1fr); }
.gallery-item {
aspect-ratio: 1;
overflow: hidden;
border-radius: 4px;
cursor: pointer;
background: var(--vscode-input-background);
transition: transform 0.1s, box-shadow 0.1s;
}
.gallery-item:hover {
transform: scale(1.02);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.gallery-item img {
width: 100%;
height: 100%;
object-fit: cover;
}
.gallery-loading,
.gallery-empty,
.gallery-error {
padding: 24px;
text-align: center;
color: var(--vscode-descriptionForeground);
font-style: italic;
background: var(--vscode-input-background);
border-radius: 4px;
}
.gallery-error {
color: var(--vscode-errorForeground);
}
.gallery-caption {
margin-top: 8px;
text-align: center;
color: var(--vscode-descriptionForeground);
font-size: 13px;
font-style: italic;
}
.macro-error {
color: var(--vscode-errorForeground);
background: var(--vscode-inputValidation-errorBackground);
padding: 4px 8px;
border-radius: 3px;
}
.macro-loading {
color: var(--vscode-descriptionForeground);
font-style: italic;
}
/* Photo Archive Macro Styles */
.macro-photo-archive {
margin: 16px 0;
}
.photo-archive-container {
display: flex;
flex-direction: column;
gap: 24px;
}
.photo-archive-month-wrapper {
border-bottom: 1px solid var(--vscode-panel-border);
padding-bottom: 24px;
}
.photo-archive-month-wrapper:last-child {
border-bottom: none;
padding-bottom: 0;
}
.photo-archive-month {
display: flex;
gap: 16px;
}
.photo-archive-month-label {
display: flex;
align-items: center;
justify-content: center;
width: 32px;
min-width: 32px;
background: var(--vscode-button-secondaryBackground);
border-radius: 4px;
padding: 8px 0;
}
.photo-archive-month-label span {
writing-mode: vertical-rl;
text-orientation: mixed;
transform: rotate(180deg);
font-weight: 600;
font-size: 14px;
color: var(--vscode-button-secondaryForeground);
letter-spacing: 1px;
text-transform: uppercase;
}
.photo-archive-gallery {
flex: 1;
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 8px;
}
.photo-archive-item {
aspect-ratio: 1;
overflow: hidden;
border-radius: 4px;
cursor: pointer;
background: var(--vscode-input-background);
transition: transform 0.1s, box-shadow 0.1s;
}
.photo-archive-item:hover {
transform: scale(1.02);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.photo-archive-item img {
width: 100%;
height: 100%;
object-fit: cover;
}
.photo-archive-loading,
.photo-archive-empty,
.photo-archive-error {
padding: 24px;
text-align: center;
color: var(--vscode-descriptionForeground);
font-style: italic;
background: var(--vscode-input-background);
border-radius: 4px;
}
.photo-archive-error {
color: var(--vscode-errorForeground);
}
/* Single month view - slightly different layout */
.photo-archive-single-month .photo-archive-gallery {
grid-template-columns: repeat(5, 1fr);
}
/* Responsive adjustments */
@media (max-width: 800px) {
.photo-archive-gallery {
grid-template-columns: repeat(3, 1fr);
}
.photo-archive-single-month .photo-archive-gallery {
grid-template-columns: repeat(4, 1fr);
}
}
@media (max-width: 600px) {
.photo-archive-gallery {
grid-template-columns: repeat(2, 1fr);
}
.photo-archive-single-month .photo-archive-gallery {
grid-template-columns: repeat(3, 1fr);
}
}
/* Quick Actions Dropdown */
.quick-actions-wrapper {
position: relative;
display: inline-block;
}
.quick-actions-btn {
display: flex;
align-items: center;
gap: 4px;
white-space: nowrap;
}
.quick-actions-btn:disabled {
opacity: 0.7;
cursor: wait;
}
.quick-actions-menu {
position: absolute;
top: 100%;
right: 0;
margin-top: 4px;
min-width: 280px;
background: var(--vscode-dropdown-background, #3c3c3c);
border: 1px solid var(--vscode-dropdown-border, #454545);
border-radius: 6px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
z-index: 1000;
overflow: hidden;
}
.quick-action-item {
display: flex;
align-items: flex-start;
gap: 10px;
width: 100%;
padding: 10px 12px;
background: none;
border: none;
color: var(--vscode-dropdown-foreground, #ccc);
cursor: pointer;
text-align: left;
transition: background 0.1s;
}
.quick-action-item:hover:not(:disabled) {
background: var(--vscode-list-hoverBackground, #2a2d2e);
}
.quick-action-item:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.quick-action-icon {
font-size: 16px;
flex-shrink: 0;
margin-top: 2px;
}
.quick-action-text {
display: flex;
flex-direction: column;
gap: 2px;
}
.quick-action-text strong {
font-size: 13px;
font-weight: 500;
}
.quick-action-text small {
font-size: 11px;
opacity: 0.7;
}