Shaarli_bm_theme/shaarli-pro/css/custom_views.css

643 lines
13 KiB
CSS

/* =========================================
Special Views for Todos and Notes
========================================= */
/* Theme tokens for custom views */
:root {
--special-view-panel-bg: var(--bg-card);
--special-view-panel-alt: color-mix(in srgb, var(--bg-card) 85%, var(--bg-body));
--special-view-border: var(--border);
--special-view-divider: var(--border-light);
--special-view-shadow: var(--shadow-md);
--special-view-muted: var(--text-secondary);
--special-view-strong: var(--text-main);
--special-view-chip-bg: color-mix(in srgb, var(--primary) 12%, transparent);
--special-view-chip-hover: color-mix(in srgb, var(--primary) 22%, transparent);
--special-view-chip-text: var(--text-main);
}
/* --- Layout Wrapper (injected by JS) --- */
.special-view-wrapper {
display: flex;
flex-direction: row;
width: 100%;
min-height: calc(100vh - 60px);
/* Adjust for header */
}
/* --- TODO VIEW --- */
body.view-todo .content-container {
padding: 2rem;
background-color: var(--bg-body);
min-height: 100vh;
/* Adjust for header */
}
body.view-todo #linklist {
display: block;
/* Show default list when wrapper is not active */
}
.create-task-btn:hover {
background-color: var(--primary-dark, #1d4ed8);
transform: translateY(-1px);
}
.todo-list-item {
padding: 0.75rem 1rem;
margin-bottom: 0.25rem;
border-radius: 0.5rem;
cursor: pointer;
color: var(--special-view-strong);
display: flex;
align-items: center;
gap: 0.75rem;
transition: background-color 0.2s;
}
.todo-list-item:hover {
background-color: color-mix(in srgb, var(--special-view-strong) 8%, transparent);
}
.todo-list-item.active {
background-color: rgba(37, 99, 235, 0.1);
color: var(--primary-color, #2563eb);
font-weight: 600;
margin: 0;
}
/* Todo Item */
.todo-item {
padding: 1rem;
border-bottom: 1px solid var(--special-view-divider);
display: flex;
align-items: center;
gap: 1rem;
transition: background-color 0.2s;
}
.todo-item:hover {
background-color: color-mix(in srgb, var(--special-view-strong) 5%, transparent);
}
.todo-checkbox {
width: 20px;
height: 20px;
border: 2px solid var(--special-view-muted);
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.todo-checkbox.checked {
background-color: var(--primary);
border-color: var(--primary);
color: white;
}
.todo-content {
flex: 1;
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.todo-title {
font-size: 1rem;
color: var(--special-view-strong);
font-weight: 400;
}
.todo-item.completed .todo-title {
text-decoration: line-through;
color: var(--text-light, #94a3b8);
}
.todo-meta {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.75rem;
color: var(--special-view-muted);
}
.todo-badge {
padding: 0.125rem 0.5rem;
border-radius: 1rem;
background-color: var(--special-view-chip-bg);
font-size: 0.7rem;
}
.due-date {
display: flex;
align-items: center;
gap: 0.25rem;
}
/* --- NOTES VIEW --- */
/* Wrapper */
body.view-notes .content-container,
body.view-archive .content-container {
padding: 2rem;
background-color: var(--bg-body);
min-height: 100vh;
}
/* Tool Bar / Input Area */
.notes-top-bar {
display: flex;
justify-content: center;
align-items: flex-start;
margin-bottom: 2rem;
position: relative;
padding-right: 0;
}
.note-input-container {
width: 800px;
max-width: 100%;
background-color: var(--special-view-panel-bg);
border-radius: 12px;
border: 1px solid var(--special-view-border);
box-shadow: var(--special-view-shadow);
transition: box-shadow 0.2s;
overflow: hidden;
}
.note-input-container.is-editing {
max-height: 72vh;
}
.note-input-collapsed {
display: flex;
align-items: center;
padding: 12px 16px;
cursor: text;
color: var(--special-view-muted);
font-weight: 500;
font-size: 1rem;
}
.note-input-container.is-editing {
cursor: default;
}
.icon-btn:hover {
background-color: rgba(136, 136, 136, 0.1);
}
.icon-btn.active {
color: var(--primary);
background-color: var(--special-view-chip-bg);
}
.notes-masonry {
column-count: 4;
column-gap: 16px;
width: 100%;
}
.notes-masonry .note-card {
display: inline-block;
width: 100%;
margin: 0 0 16px;
break-inside: avoid;
-webkit-column-break-inside: avoid;
page-break-inside: avoid;
column-span: none;
border-radius: 14px;
overflow: hidden;
border: 1px solid var(--special-view-border);
background: var(--special-view-panel-bg);
box-shadow: var(--special-view-shadow);
}
.note-card {
border-radius: 14px;
overflow: hidden;
border: 1px solid var(--special-view-border);
background: var(--special-view-panel-bg);
}
.note-card .note-inner {
position: relative;
padding: 14px 16px 12px;
padding-right: 58px;
}
.note-modal-overlay.open {
display: flex;
}
.note-modal {
width: min(720px, 92vw);
max-height: 86vh;
overflow: hidden;
border-radius: 14px;
background: var(--special-view-panel-bg);
border: 1px solid var(--special-view-border);
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
color: inherit;
display: flex;
flex-direction: column;
}
.note-modal-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
padding: 18px 20px 10px;
flex-shrink: 0;
}
.note-modal-tags.is-empty {
display: none;
}
.note-modal-tags .note-tag {
display: inline-flex;
align-items: center;
gap: 0.25rem;
background: var(--special-view-chip-bg);
color: var(--special-view-chip-text);
border-radius: 999px;
padding: 0.25rem 0.5rem;
font-size: 0.75rem;
font-weight: 500;
}
.note-modal-tags .note-tag-text {
line-height: 1.2;
}
.note-modal-tags .note-tag-remove-btn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 1.1rem;
height: 1.1rem;
border: none;
border-radius: 999px;
background: var(--special-view-chip-hover);
color: currentColor;
cursor: pointer;
padding: 0;
line-height: 1;
font-size: 0.8rem;
}
.note-modal-actions {
display: flex;
align-items: center;
justify-content: space-between;
gap: 6px;
padding: 8px 16px 16px;
background: transparent;
flex-shrink: 0;
flex-wrap: wrap;
}
.note-modal-pin-toggle:hover,
.note-modal-pin-toggle.active {
background-color: rgba(255, 255, 255, 0.14);
}
.note-body {
font-size: 0.875rem;
line-height: 1.4;
color: var(--special-view-strong);
word-wrap: break-word;
display: block;
overflow: hidden;
max-height: 360px;
}
.note-body p,
.note-modal-content p {
margin: 0 0 0.5rem;
}
.bookmark-palette>button:hover {
background: var(--primary-light);
color: var(--primary);
}
.palette-popup {
display: none;
position: absolute;
left: 0;
bottom: calc(100% + 8px);
background: var(--special-view-panel-bg);
border: 1px solid var(--special-view-border);
border-radius: 12px;
padding: 12px;
box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
z-index: 50;
width: max-content;
max-width: min(340px, calc(100vw - 32px));
max-height: min(320px, calc(100vh - 140px));
overflow: auto;
overscroll-behavior: contain;
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
}
.palette-popup.open {
display: block;
}
.note-card .note-hover-actions button,
.note-card .note-hover-actions a {
color: inherit;
}
.note-card[class*="note-color-"] {
color: var(--note-card-fg, var(--special-view-strong));
border: 1px solid var(--special-view-border);
}
/* Ensure archive view uses same background as notes view */
body.view-archive .content-container {
background-color: var(--bg-body) !important;
}
/* Archive Title */
.archive-title-container {
text-align: center;
margin-bottom: 1rem;
}
.archive-title {
font-size: 1.75rem;
font-weight: 600;
color: var(--special-view-strong);
margin: 0;
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
}
.archive-title i {
font-size: 1.5rem;
color: var(--primary);
}
.archive-subtitle {
font-size: 0.875rem;
color: var(--special-view-muted);
margin: 0.25rem 0 0 0;
}
/* Archive top bar adjustments */
.archive-top-bar {
flex-direction: column;
align-items: center;
padding-right: 0;
gap: 1rem;
position: relative;
}
.archive-top-bar .notes-tools {
position: absolute;
right: 1rem;
top: 50%;
transform: translateY(-50%);
}
body.view-todo .note-card.todo-card .note-body {
padding-top: 0.25rem;
}
body.view-todo .note-card.todo-card .todo-checklist-preview-wrap {
display: block;
-webkit-line-clamp: initial;
line-clamp: initial;
-webkit-box-orient: initial;
overflow: hidden;
max-height: 360px;
padding-top: 0.25rem;
}
.todo-checklist-preview {
list-style: none;
padding: 0;
margin: 0;
display: flex;
flex-direction: column;
gap: 0.35rem;
}
.todo-checklist-preview-item {
display: flex;
align-items: flex-start;
gap: 0.6rem;
font-size: 0.95rem;
line-height: 1.35;
}
.todo-checklist-preview-box {
width: 16px;
height: 16px;
border-radius: 4px;
border: 2px solid currentColor;
display: inline-flex;
align-items: center;
justify-content: center;
flex: 0 0 auto;
opacity: 0.7;
margin-top: 2px;
}
.todo-checklist-preview-box i {
font-size: 14px;
opacity: 0;
}
.todo-checklist-preview-text {
flex: 1;
min-width: 0;
overflow-wrap: break-word;
word-wrap: break-word;
word-break: break-word;
}
.todo-checklist-preview-item.is-checked {
opacity: 0.7;
}
.todo-checklist-preview-item.is-checked .todo-checklist-preview-box i {
opacity: 1;
}
.todo-checklist-preview-item.is-checked .todo-checklist-preview-text {
text-decoration: line-through;
}
.todo-checklist-preview-more {
opacity: 0.7;
}
.todo-modal .note-modal-content {
padding-top: 6px;
}
.todo-checklist {
display: flex;
flex-direction: column;
gap: 6px;
padding-bottom: 6px;
}
.todo-checklist-row {
display: grid;
grid-template-columns: 26px 26px minmax(0, 1fr) 34px;
align-items: center;
gap: 8px;
padding: 6px 2px;
border-radius: 8px;
}
.todo-checklist-row.is-checked {
opacity: 0.75;
}
.todo-checklist-row.is-dragging {
opacity: 0.6;
}
.todo-drag-handle {
width: 26px;
height: 26px;
border: none;
background: none;
color: inherit;
opacity: 0.7;
cursor: grab;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0;
}
.todo-drag-handle:active {
cursor: grabbing;
}
.todo-drag-handle i {
font-size: 18px;
}
.todo-checklist-box {
width: 26px;
height: 26px;
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
.todo-checklist-box input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.todo-checklist-box-ui {
width: 16px;
height: 16px;
border-radius: 4px;
border: 2px solid currentColor;
display: inline-block;
opacity: 0.75;
}
.todo-item-checkbox:checked+.todo-checklist-box-ui {
background: currentColor;
box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.22);
}
[data-theme="dark"] .todo-item-checkbox:checked+.todo-checklist-box-ui {
box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.35);
}
.todo-item-text {
width: 100%;
border: none;
background: transparent;
color: inherit;
font-size: 1rem;
line-height: 1.4;
padding: 6px 6px;
border-radius: 6px;
outline: none;
min-width: 0;
}
.todo-checklist-row.is-checked .todo-item-text {
text-decoration: line-through;
}
.todo-item-text:focus {
background: rgba(0, 0, 0, 0.06);
}
[data-theme="dark"] .todo-item-text:focus {
background: rgba(255, 255, 255, 0.08);
}
.todo-item-delete {
width: 34px;
height: 34px;
border: none;
background: none;
color: inherit;
opacity: 0.7;
cursor: pointer;
border-radius: 50%;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0;
}
.todo-item-delete:hover {
opacity: 1;
background: rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] .todo-item-delete:hover {
background: rgba(255, 255, 255, 0.12);
}
.todo-item-delete i {
font-size: 20px;
}
.todo-add-item-btn {
border: none;
background: none;
color: inherit;
opacity: 0.8;
cursor: pointer;
display: inline-flex;
align-items: center;
gap: 10px;
padding: 8px 0;
font-size: 1rem;
justify-content: flex-start;
width: 100%;
}
.todo-add-item-btn i {
font-size: 18px;
}
.todo-add-item-btn:hover {
opacity: 1;
}