Change CSS framework from PicoCSS to Bootstrap 5.3

This commit is contained in:
2025-11-27 14:46:51 +08:00
parent e51768622f
commit 39cda7814f
245 changed files with 678223 additions and 2750 deletions
-41
View File
@@ -1,41 +0,0 @@
/* Увеличиваем специфичность для кнопок Quill */
.ql-toolbar .ql-picker-label,
.ql-toolbar button,
.ql-toolbar [role="button"] {
all: unset; /* Сбрасываем все стили Pico (background, border, padding и т.д.) */
display: inline-block; /* Восстанавливаем базовые стили Quill */
cursor: pointer;
padding: 0; /* Quill кнопки не имеют padding */
margin: 0;
border: none;
background: none;
color: inherit; /* Наследуем цвет от Quill */
font-size: inherit;
line-height: inherit;
text-decoration: none; /* Убираем подчёркивание, если это <a> */
}
/* Восстанавливаем hover/active стили Quill (если они сломались) */
.ql-toolbar button:hover,
.ql-toolbar [role="button"]:hover {
color: #06c; /* Пример из Quill snow theme; адаптируйте */
background: none; /* Без фона */
}
.ql-toolbar button.ql-active,
.ql-toolbar [role="button"].ql-active {
color: #06c;
background: none;
}
/* Для иконок (SVG в Quill) */
.ql-toolbar .ql-icon {
fill: currentColor; /* Убедимся, что иконки наследуют цвет */
}
/* Если Quill использует <span> для кнопок */
.ql-toolbar .ql-picker-item,
.ql-toolbar .ql-picker-options [role="button"] {
all: unset;
cursor: pointer;
}
+9 -895
View File
@@ -1,907 +1,21 @@
/* ===== БАЗОВЫЕ СТИЛИ ===== */
h1, h2, h3, h4, h5, h6 {
margin-top: 0;
margin-bottom: 1rem;
color: var(--color);
font-weight: var(--font-weight);
font-size: var(--font-size);
font-family: var(--font-family);
}
article{
margin-top: 0em;
}
article > header {
margin-top: calc(var(--block-spacing-vertical) * -1);
margin-bottom: calc(var(--block-spacing-vertical)-1);
border-bottom: var(--border-width) solid var(--card-border-color);
border-top-right-radius: var(--border-radius);
border-top-left-radius: var(--border-radius);
padding-bottom: 0.5em;
}
article > footer {
margin-top: calc(var(--block-spacing-vertical)-1);
margin-bottom: calc(var(--block-spacing-vertical) * -1);
border-top: var(--border-width) solid var(--card-border-color);
border-bottom-right-radius: var(--border-radius);
border-bottom-left-radius: var(--border-radius);
padding-top: 0.5em;
}
/* Центрирование контейнера */
main.container {
margin: 1rem auto;
padding: 1rem 0;
max-width: 100%;
}
/* Центрируем основной контент */
.container {
width: 60%;
margin-right: 10rem;
margin-left: 10rem;
}
/* Для больших экранов - ограничиваем ширину */
@media (min-width: 768px) {
.container {
max-width: 1200px;
padding: 0 1rem;
}
}
/* ===== КОМПОНЕНТЫ ===== */
/* Уведомления */
.alert {
padding: 1rem;
margin: 1rem 0;
border-radius: 5px;
}
.alert-error {
background: #ffebee;
color: #c62828;
border: 1px solid #ffcdd2;
}
.alert-success {
background: #e8f5e8;
color: #2e7d32;
border: 1px solid #c8e6c9;
}
.alert-info {
background: #d1ecf1;
color: #0c5460;
border: 1px solid #bee5eb;
}
.alert-warning {
background: #fff3cd;
color: #856404;
border: 1px solid #ffeaa7;
}
/* Кнопки */
.button-group {
display: flex;
gap: 5px;
margin-bottom: 1rem;
}
.button-group button,
.button-group a[role="button"] {
flex: 1;
padding: 0.5rem;
height: 38px;
display: flex;
align-items: center;
justify-content: center;
text-decoration: none;
box-sizing: border-box;
}
.compact-button {
padding: 3px 8px;
font-size: 0.85rem;
text-decoration: none;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 4px;
cursor: pointer;
height: 28px;
box-sizing: border-box;
line-height: 1;
}
.action-button {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0.75rem 1.5rem;
font-size: 0.9rem;
text-decoration: none;
border-radius: 4px;
cursor: pointer;
height: 44px;
min-width: 140px;
white-space: nowrap;
transition: opacity 0.3s ease;
text-align: center;
}
/* Цвета кнопок */
.button-group .delete-btn,
.action-button.delete {
background: #ff4444;
border-color: #ff4444;
color: white;
}
.button-group .delete-btn:hover,
.action-button.delete:hover {
background: #dd3333;
border-color: #dd3333;
}
.green-btn {
background: #449944;
border-color: #449944;
color: white;
}
.green-btn:hover {
background: #44bb44;
border-color: #44bb44;
}
.primary-btn {
background: var(--primary);
border-color: var(--primary);
color: var(--primary-inverse);
}
.secondary-btn {
background: var(--secondary);
border-color: var(--secondary);
color: var(--secondary-inverse);
}
.red-btn {
background: #ff4444;
border-color: #ff4444;
color: white;
}
.red-btn:hover {
background: #dd3333;
border-color: #dd3333;
color: white;
}
/* ===== КНИГИ И КОНТЕНТ ===== */
.book-content {
line-height: 1.7;
font-family: Georgia, serif;
max-width: 100%;
}
.book-content h1 {
font-size: 2em;
margin: 2rem 0 1rem;
border-bottom: 2px solid #eee;
padding-bottom: 0.5rem;
}
.book-content h2 {
font-size: 1.6em;
margin: 1.5rem 0 1rem;
border-bottom: 1px solid #eee;
padding-bottom: 0.3rem;
}
.book-content h3 {
font-size: 1.3em;
margin: 1.2rem 0 0.8rem;
}
.book-content p {
margin-bottom: 1rem;
text-align: justify;
}
.book-content blockquote {
border-left: 4px solid #007bff;
padding-left: 1.5rem;
margin: 1rem 0;
color: #555;
font-style: italic;
background: #f8f9fa;
padding: 1rem;
border-radius: 0 5px 5px 0;
}
.book-content code {
background: #f5f5f5;
padding: 2px 6px;
border-radius: 3px;
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
font-size: 0.9em;
}
.book-content pre {
background: #2d2d2d;
color: #f8f8f2;
padding: 1rem;
border-radius: 5px;
overflow-x: auto;
}
.book-content pre code {
background: none;
padding: 0;
}
.book-content ul, .book-content ol {
margin-bottom: 1rem;
padding-left: 2rem;
}
.book-content table {
width: 100%;
border-collapse: collapse;
margin-bottom: 1rem;
}
.book-content th, .book-content td {
border: 1px solid #ddd;
padding: 10px 12px;
}
/* Центрируем таблицы в книжном контенте */
.book-content table {
margin-left: auto;
margin-right: auto;
}
/* ===== МЕДИА ===== */
.book-cover {
transition: transform 0.3s ease;
display: block;
margin: 0 auto;
}
.book-cover:hover {
transform: scale(1.05);
}
.cover-placeholder {
width: 120px;
height: 160px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 2rem;
margin: 0 auto 1rem;
}
.avatar-container {
text-align: center;
margin-bottom: 1.5rem;
}
.avatar {
width: 150px;
height: 150px;
border-radius: 50%;
border: 3px solid #007bff;
object-fit: cover;
display: block;
margin: 0 auto;
}
.avatar-placeholder {
width: 150px;
height: 150px;
border-radius: 50%;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 3rem;
margin: 0 auto;
}
/* Центрируем статистику */
.author-stats {
display: flex;
justify-content: center;
gap: 2rem;
flex-wrap: wrap;
margin: 1rem 0;
}
.stat-item {
text-align: center;
}
/* ===== QUILL РЕДАКТОР ===== */
.writer-editor-container {
margin: 10px 0;
width: 100%;
}
.writer-editor-container .ql-editor {
min-height: 400px;
font-family: 'Georgia', serif;
line-height: 1.6;
}
/* ===== DASHBOARD ===== */
.dashboard-buttons {
display: flex;
gap: 10px;
margin-top: 1rem;
justify-content: center;
}
.dashboard-button {
text-align: center;
padding: 0.75rem 0.5rem;
text-decoration: none;
border-radius: 4px;
font-size: 0.9rem;
/* Дополнительные стили для тем */
.theme-switcher {
transition: all 0.3s ease;
min-height: 44px;
display: flex;
align-items: center;
justify-content: center;
}
.dashboard-item {
transition: transform 0.2s ease, box-shadow 0.2s ease;
border: 1px solid #e0e0e0;
padding: 1rem;
text-align: center;
}
.dashboard-item:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
/* Центрируем welcome сообщение */
.welcome-message {
text-align: center;
padding: 3rem;
background: #f9f9f9;
border-radius: 8px;
margin: 2rem auto;
max-width: 800px;
}
.welcome-buttons {
display: flex;
gap: 1rem;
justify-content: center;
flex-wrap: wrap;
margin-top: 1.5rem;
}
/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
.container {
padding: 0 0.5rem;
}
.button-group {
flex-direction: column;
}
.dashboard-buttons {
flex-direction: column;
align-items: center;
}
.book-content {
font-size: 16px;
padding: 0 0.5rem;
}
.book-content h1 {
font-size: 1.6em;
}
.book-content h2 {
font-size: 1.4em;
}
.avatar, .avatar-placeholder {
width: 120px;
height: 120px;
}
.action-button {
min-width: 120px;
padding: 0.6rem 1rem;
}
.welcome-message {
padding: 2rem 1rem;
margin: 1rem 0.5rem;
}
}
@media (max-width: 480px) {
.book-content h1 {
font-size: 1.4em;
}
.avatar, .avatar-placeholder {
width: 100px;
height: 100px;
}
.action-button {
width: 100%;
min-width: auto;
}
.author-stats {
flex-direction: column;
gap: 1rem;
}
}
/* Стили для управления сериями */
.books-list {
border: 1px solid #e0e0e0;
border-radius: 4px;
background: #fafafa;
}
.book-item {
display: flex;
align-items: center;
padding: 12px;
border-bottom: 1px solid #e0e0e0;
background: white;
.theme-option {
transition: all 0.2s ease;
border-radius: 4px;
}
.book-item:last-child {
border-bottom: none;
}
.book-item:hover {
background: #f8f9fa;
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.book-item.sortable-ghost {
opacity: 0.6;
background: #e3f2fd;
}
.book-item.sortable-chosen {
background: #e3f2fd;
box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.book-drag-handle {
padding: 0 12px;
color: #666;
font-size: 1.2rem;
cursor: move;
user-select: none;
}
.book-drag-handle:hover {
color: #007bff;
}
.book-info {
flex: 1;
padding: 0 12px;
}
.book-info strong {
display: block;
margin-bottom: 4px;
color: #333;
}
.book-info small {
color: #666;
font-size: 0.8rem;
}
.book-actions {
display: flex;
gap: 8px;
.theme-option:hover {
transform: translateX(5px);
}
/* Адаптивность для мобильных */
@media (max-width: 768px) {
.book-item {
flex-direction: column;
align-items: flex-start;
gap: 10px;
.theme-preview {
width: 16px;
height: 16px;
}
.book-drag-handle {
align-self: flex-start;
}
.book-actions {
align-self: stretch;
justify-content: space-between;
}
.book-actions .compact-button {
flex: 1;
text-align: center;
}
}
.series-grid {
display: grid;
gap: 1.5rem;
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}
.series-card {
background: white;
border: 1px solid #e0e0e0;
border-radius: 8px;
padding: 1.5rem;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
.series-card:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(0,0,0,0.1);
border-color: #007bff;
}
.series-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 4px;
height: 100%;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.series-header {
margin-bottom: 1rem;
}
.series-title {
font-size: 1.3rem;
font-weight: bold;
margin-bottom: 0.5rem;
color: #333;
}
.series-title a {
text-decoration: none;
color: inherit;
}
.series-title a:hover {
color: #007bff;
}
.series-meta {
color: #666;
font-size: 0.9rem;
}
.series-description {
color: #555;
line-height: 1.5;
margin-bottom: 1.5rem;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}
.series-stats-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 0.5rem;
margin-bottom: 1.5rem;
text-align: center;
}
.series-stat {
padding: 0.5rem;
}
.series-stat-number {
font-size: 1.4rem;
font-weight: bold;
color: #6f42c1;
display: block;
}
.series-stat-label {
font-size: 0.8rem;
color: #666;
display: block;
}
.series-actions {
display: flex;
gap: 0.5rem;
flex-wrap: wrap;
}
/* Пустое состояние */
.series-empty-state {
text-align: center;
padding: 3rem 2rem;
background: #f8f9fa;
border-radius: 8px;
border: 2px dashed #dee2e6;
}
.series-empty-icon {
font-size: 3rem;
margin-bottom: 1rem;
opacity: 0.5;
}
/* Адаптивность для серий */
@media (max-width: 768px) {
.series-grid {
grid-template-columns: 1fr;
}
.series-stats-grid {
grid-template-columns: repeat(3, 1fr);
}
.series-actions {
flex-direction: column;
}
.series-actions .compact-button {
width: 100%;
text-align: center;
}
}
@media (max-width: 480px) {
.series-card {
padding: 1rem;
}
.series-stats-grid {
grid-template-columns: 1fr;
gap: 0.25rem;
}
.series-stat {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.25rem 0;
}
.series-stat-number {
font-size: 1.1rem;
}
}
/* ===== СТИЛИ ДЛЯ СПИСКА КНИГ ===== */
.books-grid {
display: grid;
gap: 1.5rem;
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}
.book-card {
background: white;
border: 1px solid #e0e0e0;
border-radius: 8px;
overflow: hidden;
transition: all 0.3s ease;
position: relative;
}
.book-card:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(0,0,0,0.1);
border-color: #007bff;
}
.book-cover-container {
position: relative;
height: 200px;
overflow: hidden;
background: #f8f9fa;
}
.book-cover {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.3s ease;
}
.book-card:hover .book-cover {
transform: scale(1.05);
}
.cover-placeholder {
width: 100%;
height: 100%;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 3rem;
}
.book-status {
position: absolute;
top: 10px;
right: 10px;
background: rgba(255, 255, 255, 0.9);
border-radius: 50%;
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.8rem;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.book-status.published {
background: rgba(40, 167, 69, 0.9);
color: white;
}
.book-info {
padding: 1.5rem;
}
.book-title {
margin: 0 0 0.5rem 0;
font-size: 1.2rem;
line-height: 1.3;
}
.book-title a {
text-decoration: none;
color: inherit;
}
.book-title a:hover {
color: #007bff;
}
.book-genre {
margin: 0 0 0.5rem 0;
color: #666;
font-style: italic;
font-size: 0.9rem;
}
.book-description {
margin: 0 0 1rem 0;
color: #555;
line-height: 1.4;
font-size: 0.9rem;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}
.book-stats {
display: flex;
gap: 1rem;
margin-bottom: 1rem;
padding: 0.75rem;
background: #f8f9fa;
border-radius: 4px;
font-size: 0.85rem;
}
.stat-item {
text-align: center;
flex: 1;
}
.stat-item strong {
display: block;
font-size: 1.1rem;
color: #6f42c1;
}
.book-actions {
display:grid;
gap: 0.5rem;
flex-wrap: nowrap;
}
.book-actions .compact-button {
flex: 1;
min-width: 0;
text-align: center;
white-space: nowrap;
}
/* Пустое состояние */
.books-empty-state {
text-align: center;
padding: 3rem 2rem;
background: #f8f9fa;
border-radius: 8px;
border: 2px dashed #dee2e6;
}
.books-empty-icon {
font-size: 4rem;
margin-bottom: 1rem;
opacity: 0.5;
}
/* Футер со статистикой */
.books-stats-footer {
margin-top: 2rem;
padding: 1rem;
background: #f8f9fa;
border-radius: 5px;
text-align: center;
color: #666;
}
/* Адаптивность */
@media (max-width: 768px) {
.books-grid {
grid-template-columns: 1fr;
}
.book-stats {
flex-direction: column;
gap: 0.5rem;
}
.book-actions {
flex-direction: column;
}
.book-actions .compact-button {
width: 100%;
}
}
@media (max-width: 480px) {
.book-info {
padding: 1rem;
}
.book-cover-container {
height: 160px;
}
.cover-placeholder {
font-size: 2rem;
}
}
.ql-editor p {
display: block !important;
}