NoteJS/public/style.css
Fovway 083ac11ab1 Добавлены функции для работы с многострочными списками и улучшено отображение дат заметок
- Реализована возможность создания нумерованных списков и улучшены функции для работы с многострочными списками.
- Обновлены фильтры для отображения заметок по дате, используя поле created_at вместо date.
- Оптимизировано отображение дат создания и изменения заметок в единой строке.
- Добавлены новые кнопки и обработчики событий для поддержки новых функций в интерфейсе редактирования заметок.
2025-10-22 12:56:43 +07:00

1713 lines
32 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

:root {
--accent-color: #007bff;
}
body {
font-family: "Open Sans", sans-serif;
padding: 0;
margin: 0;
background: #f5f5f5;
display: flex;
justify-content: center;
align-items: flex-start;
gap: 30px;
padding: 0 15px;
}
/*
ОБНОВЛЕНИЕ: Добавлены свойства переноса текста для всех элементов заметок
- word-wrap: break-word
- overflow-wrap: break-word
- word-break: break-word
Это устраняет проблему, когда длинный текст без пробелов выходил за границы блока.
Теперь длинные слова и текст корректно переносятся на следующую строку.
*/
/* Стили для Iconify иконок */
.iconify {
font-size: 16px;
vertical-align: middle;
display: inline-block;
width: 1em;
height: 1em;
}
iconify-icon {
font-size: 16px;
vertical-align: middle;
display: inline-block;
width: 1em;
height: 1em;
}
/* Стили для иконок в заголовках */
header .iconify {
font-size: 20px;
margin-right: 8px;
}
/* Стили для иконок в кнопках */
.logout-btn .iconify {
font-size: 14px;
margin-right: 6px;
}
/* Стили для иконок в секциях */
.search-title .iconify,
.tags-title .iconify {
font-size: 14px;
margin-right: 6px;
}
/* Цветные иконки */
/* Иконка поиска - синий */
.search-title .iconify[data-icon="mdi:magnify"] {
color: #2196f3;
}
/* Иконка тегов - зеленый */
.tags-title .iconify[data-icon="mdi:tag"] {
color: #4caf50;
}
/* Иконка заметок - оранжевый */
header .iconify[data-icon="mdi:note-text"] {
color: #ff9800;
}
/* Иконка пользователя - фиолетовый */
header .iconify[data-icon="mdi:account"],
.username-clickable .iconify[data-icon="mdi:account"] {
color: #9c27b0;
}
/* Иконка выхода - красный */
.logout-btn .iconify[data-icon="mdi:logout"] {
color: #f44336;
}
/* Иконка входа - синий */
header .iconify[data-icon="mdi:login"] {
color: #2196f3;
}
/* Иконка регистрации - зеленый */
header .iconify[data-icon="mdi:account-plus"] {
color: #4caf50;
}
/* Markdown кнопки - разные цвета */
.btnMarkdown .iconify[data-icon="mdi:format-bold"] {
color: #424242;
}
.btnMarkdown .iconify[data-icon="mdi:format-italic"] {
color: #757575;
}
.btnMarkdown .iconify[data-icon="mdi:palette"] {
color: #e91e63;
}
.btnMarkdown .iconify[data-icon="mdi:format-header-1"] {
color: #1976d2;
}
.btnMarkdown .iconify[data-icon="mdi:format-list-bulleted"] {
color: #388e3c;
}
.btnMarkdown .iconify[data-icon="mdi:format-quote-close"] {
color: #f57c00;
}
.btnMarkdown .iconify[data-icon="mdi:code-tags"] {
color: #7b1fa2;
}
.btnMarkdown .iconify[data-icon="mdi:link"] {
color: #0288d1;
}
header {
font-size: 20px;
font-weight: bold;
margin-bottom: 20px;
}
.notes-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
}
.notes-header-left {
display: flex;
flex-direction: column;
align-items: flex-start;
}
/* Стили для секции поиска в левой панели */
.search-section {
margin-top: 15px;
padding-top: 15px;
border-top: 1px solid #e0e0e0;
}
.search-header {
margin-bottom: 10px;
}
.search-title {
font-size: 12px;
font-weight: bold;
color: #333;
}
.search-container {
position: relative;
width: 100%;
}
.search-input {
width: 100%;
padding: 6px 30px 6px 10px;
border: 1px solid #ddd;
border-radius: 15px;
font-size: 12px;
background-color: #f8f9fa;
transition: all 0.3s ease;
box-sizing: border-box;
}
.search-input:focus {
outline: none;
border-color: var(--accent-color, #007bff);
background-color: white;
box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}
.clear-search-btn {
position: absolute;
right: 6px;
top: 50%;
transform: translateY(-50%);
background: none;
border: none;
color: #999;
cursor: pointer;
font-size: 14px;
padding: 2px 4px;
border-radius: 50%;
transition: all 0.2s ease;
}
.clear-search-btn:hover {
background-color: #e9ecef;
color: #666;
}
.filter-indicator {
display: inline-block;
margin-top: 5px;
padding: 4px 10px;
background-color: #e7f3ff;
border: 1px solid var(--accent-color, #007bff);
border-radius: 15px;
font-size: 12px;
color: var(--accent-color, #007bff);
font-weight: 500;
}
.filter-indicator button {
background: none;
border: none;
color: #dc3545;
cursor: pointer;
margin-left: 8px;
font-weight: bold;
padding: 0;
font-size: 14px;
}
.filter-indicator button:hover {
color: #a71d2a;
}
.user-info {
display: flex;
align-items: center;
gap: 15px;
}
.user-info span {
font-size: 14px;
color: #666;
font-weight: 500;
}
.logout-btn {
padding: 8px 16px;
cursor: pointer;
border: 1px solid #ddd;
background-color: #f8f9fa;
border-radius: 5px;
font-size: 14px;
color: #dc3545;
transition: all 0.3s ease;
}
.logout-btn:hover {
background-color: #dc3545;
color: white;
}
.auth-link {
text-align: center;
margin-top: 15px;
font-size: 14px;
}
.auth-link a {
color: var(--accent-color, #007bff);
text-decoration: none;
font-weight: 500;
}
.auth-link a:hover {
text-decoration: underline;
}
.container {
width: 90%;
max-width: 600px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
border-radius: 8px;
padding: 15px;
margin-top: 20px;
background: white;
box-sizing: border-box;
word-wrap: break-word;
overflow-wrap: break-word;
overflow: hidden;
}
.login-form {
margin-top: 20px;
}
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: block;
margin-bottom: 5px;
font-weight: bold;
}
.form-group input {
width: 100%;
padding: 10px;
border: 1px solid #ddd;
border-radius: 5px;
font-size: 16px;
box-sizing: border-box;
}
.form-group input:focus {
outline: none;
border-color: var(--accent-color, #007bff);
}
.error-message {
color: #dc3545;
margin-top: 10px;
padding: 10px;
background-color: #f8d7da;
border: 1px solid #f5c6cb;
border-radius: 5px;
}
textarea {
width: 100%;
min-height: 50px;
resize: none;
border: none;
background: white;
margin-bottom: 5px;
overflow-y: hidden;
}
textarea:focus {
outline: none;
}
.save-button-container {
display: flex;
align-items: center;
gap: 10px;
}
.save-hint {
font-size: 12px;
color: #999;
font-style: italic;
}
.btnSave {
padding: 10px 20px;
cursor: pointer;
border-width: 1px;
background: white;
border-radius: 5px;
font-family: "Open Sans", sans-serif;
transition: all 0.3s ease;
font-size: 16px;
}
.btnSave:hover {
background-color: var(--accent-color, #007bff);
color: white;
border-color: var(--accent-color, #007bff);
}
.date {
font-size: 11px;
color: grey;
white-space: nowrap;
display: flex;
align-items: center;
gap: 10px;
flex-wrap: nowrap;
}
.date .date-text {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
}
.notesHeaderBtn {
display: inline-block;
cursor: pointer;
color: black;
font-weight: bold;
white-space: nowrap;
}
.textNote {
margin-top: 10px;
white-space: pre-wrap;
position: relative;
transition: max-height 0.3s ease;
word-wrap: break-word;
overflow-wrap: break-word;
word-break: break-word;
}
.textNote.collapsed {
max-height: 300px;
overflow: hidden;
}
.textNote.collapsed::after {
content: "";
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 80px;
background: linear-gradient(to bottom, transparent, white);
pointer-events: none;
}
.show-more-btn {
display: block;
width: 100%;
margin-top: 10px;
padding: 8px;
background-color: #f8f9fa;
border: 1px solid #ddd;
border-radius: 5px;
color: var(--accent-color, #007bff);
font-size: 14px;
cursor: pointer;
transition: all 0.3s ease;
text-align: center;
}
.show-more-btn:hover {
background-color: var(--accent-color, #007bff);
color: white;
border-color: var(--accent-color, #007bff);
}
/* Убираем стандартные отступы для абзацев */
.textNote p {
margin: 0;
padding: 0;
word-wrap: break-word;
overflow-wrap: break-word;
}
/* Убираем маргины у заголовков */
.textNote h1,
.textNote h2,
.textNote h3,
.textNote h4,
.textNote h5,
.textNote h6 {
margin: 0;
padding: 0;
word-wrap: break-word;
overflow-wrap: break-word;
word-break: break-word;
}
/* Убираем отступы у списков */
.textNote ul,
.textNote ol {
margin: 0;
padding-left: 20px;
word-wrap: break-word;
overflow-wrap: break-word;
line-height: 0.5;
}
/* Убираем маргины у элементов списка */
.textNote li {
margin: 0;
padding: 0;
line-height: 1;
word-wrap: break-word;
overflow-wrap: break-word;
}
/* Стили для ссылок */
.textNote a {
color: var(--accent-color, #007bff);
text-decoration: none;
word-wrap: break-word;
overflow-wrap: break-word;
}
.textNote a:hover {
text-decoration: underline;
}
/* Стили для цитат */
.textNote blockquote {
border-left: 4px solid var(--accent-color, #007bff);
padding-left: 16px;
margin: 10px 0;
color: #555;
font-style: italic;
background-color: #f8f9fa;
padding: 10px 16px;
border-radius: 0 4px 4px 0;
word-wrap: break-word;
overflow-wrap: break-word;
}
.textNote blockquote p {
margin: 0;
}
/* Стили для кода */
.textNote pre {
background-color: #f5f5f5;
padding: 10px;
border-radius: 5px;
font-size: 14px;
overflow-x: auto;
word-wrap: break-word;
overflow-wrap: break-word;
white-space: pre-wrap;
}
.textNote code {
background-color: #f5f5f5;
padding: 2px 4px;
border-radius: 5px;
font-size: 14px;
word-wrap: break-word;
overflow-wrap: break-word;
word-break: break-word;
}
/* Стили для чекбоксов (to-do списков) */
.textNote input[type="checkbox"] {
cursor: pointer;
margin-right: 8px;
width: 18px;
height: 18px;
accent-color: var(--accent-color, #007bff);
vertical-align: middle;
position: relative;
top: -1px;
}
/* Стили для элементов списка с чекбоксами (task-list-item создается marked.js) */
.textNote .task-list-item {
list-style-type: none;
margin-left: -20px;
padding: 0;
line-height: 1.5;
transition: all 0.3s ease;
}
/* Перечеркивание текста для выполненных задач */
.textNote .task-list-item:has(input[type="checkbox"]:checked) {
opacity: 0.65;
}
.textNote .task-list-item input[type="checkbox"]:checked ~ * {
text-decoration: line-through;
color: #999;
}
/* Альтернативный вариант для перечеркивания всего текста в элементе */
.textNote input[type="checkbox"]:checked {
text-decoration: none;
}
.textNote input[type="checkbox"]:checked + * {
text-decoration: line-through;
color: #999;
}
/* Hover эффект для чекбоксов */
.textNote .task-list-item:hover {
background-color: rgba(0, 123, 255, 0.05);
border-radius: 4px;
padding-left: 4px;
margin-left: -24px;
}
/* Если marked.js не добавляет класс task-list-item, используем :has селектор */
.textNote li:has(input[type="checkbox"]) {
list-style-type: none;
margin-left: -20px;
padding: 0;
line-height: 1.5;
transition: all 0.3s ease;
}
.textNote li:has(input[type="checkbox"]:checked) {
opacity: 0.65;
}
.textNote li:has(input[type="checkbox"]) input[type="checkbox"]:checked {
text-decoration: none;
}
.textNote li:has(input[type="checkbox"]:checked) label,
.textNote li:has(input[type="checkbox"]:checked) span,
.textNote li:has(input[type="checkbox"]:checked) p {
text-decoration: line-through;
color: #999;
}
.textNote li:has(input[type="checkbox"]):hover {
background-color: rgba(0, 123, 255, 0.05);
border-radius: 4px;
padding-left: 4px;
margin-left: -24px;
}
.notes-container {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
padding-bottom: 60px; /* Отступ снизу для footer */
word-wrap: break-word;
overflow-wrap: break-word;
}
#notesList {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
.markdown-buttons {
margin-top: 10px;
margin-bottom: 10px;
}
.markdown-buttons .btnMarkdown {
padding: 5px 10px;
margin-right: 5px;
cursor: pointer;
border: 1px solid #ddd;
background-color: #f0f0f0;
border-radius: 5px;
font-size: 14px;
/* Улучшения для мобильных устройств */
touch-action: manipulation;
-webkit-tap-highlight-color: transparent;
user-select: none;
-webkit-user-select: none;
min-height: 44px; /* Минимальная высота для touch */
display: inline-flex;
align-items: center;
justify-content: center;
}
.markdown-buttons .btnMarkdown:hover {
background-color: #e0e0e0;
}
.footer {
text-align: center;
font-size: 12px;
color: #999;
position: fixed;
bottom: 0;
width: 100%;
padding: 10px 0;
}
.footer span {
font-weight: bold;
}
/* Стили для личного кабинета */
.profile-container {
margin-top: 20px;
}
.avatar-section {
text-align: center;
padding: 20px;
border-bottom: 1px solid #e0e0e0;
margin-bottom: 20px;
}
.avatar-wrapper {
margin-bottom: 15px;
display: flex;
justify-content: center;
align-items: center;
}
.avatar-preview {
width: 150px;
height: 150px;
border-radius: 50%;
object-fit: cover;
border: 3px solid var(--accent-color, #007bff);
}
.avatar-placeholder {
width: 150px;
height: 150px;
border-radius: 50%;
background-color: #e0e0e0;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 64px;
color: #999;
}
.avatar-buttons {
display: flex;
justify-content: center;
gap: 10px;
margin-top: 15px;
}
.btn-upload,
.btn-delete {
padding: 8px 16px;
cursor: pointer;
border: 1px solid #ddd;
background-color: #f8f9fa;
border-radius: 5px;
font-size: 14px;
transition: all 0.3s ease;
display: inline-block;
}
.btn-upload:hover {
background-color: var(--accent-color, #007bff);
color: white;
border-color: var(--accent-color, #007bff);
}
.btn-delete {
color: #dc3545;
}
.btn-delete:hover {
background-color: #dc3545;
color: white;
border-color: #dc3545;
}
.avatar-hint {
font-size: 12px;
color: #999;
margin-top: 10px;
}
.profile-form {
padding: 0 10px;
margin-bottom: 80px; /* Отступ снизу для последнего элемента */
}
.profile-form h3 {
margin-bottom: 15px;
color: #333;
}
.separator {
margin: 30px 0;
border: none;
border-top: 1px solid #e0e0e0;
}
.message-container {
margin-top: 20px;
margin-bottom: 80px; /* Отступ снизу, чтобы контент не обрезался футером */
padding: 10px;
border-radius: 5px;
text-align: center;
display: none;
}
.message-container.success {
background-color: #d4edda;
color: #155724;
border: 1px solid #c3e6cb;
display: block;
}
.message-container.error {
background-color: #f8d7da;
color: #721c24;
border: 1px solid #f5c6cb;
display: block;
}
.back-btn {
padding: 8px 16px;
border: 1px solid #ddd;
background-color: #f8f9fa;
border-radius: 5px;
font-size: 14px;
color: var(--accent-color, #007bff);
text-decoration: none;
transition: all 0.3s ease;
display: inline-block;
}
.back-btn:hover {
background-color: var(--accent-color, #007bff);
color: white;
border-color: var(--accent-color, #007bff);
}
.username-clickable {
cursor: pointer;
transition: color 0.3s ease;
}
.username-clickable:hover {
color: var(--accent-color, #007bff);
text-decoration: underline;
}
.center {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
width: 600px;
height: 100%;
}
.container-leftside {
width: 200px;
height: auto;
max-width: 200px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
border-radius: 8px;
padding: 12px;
margin-top: 20px;
background: white;
}
/* Мини-календарь */
.mini-calendar {
width: 100%;
}
.calendar-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
}
.calendar-month-year {
font-size: 13px;
font-weight: bold;
color: #333;
}
.calendar-nav {
background: none;
border: none;
font-size: 18px;
cursor: pointer;
color: var(--accent-color, #007bff);
padding: 0 3px;
transition: color 0.3s ease;
}
.calendar-nav:hover {
color: #0056b3;
}
.calendar-weekdays {
display: grid;
grid-template-columns: repeat(7, 1fr);
gap: 1px;
margin-bottom: 3px;
}
.calendar-weekday {
text-align: center;
font-size: 9px;
font-weight: bold;
color: #666;
padding: 3px 0;
}
.calendar-days {
display: grid;
grid-template-columns: repeat(7, 1fr);
gap: 1px;
}
.calendar-day {
aspect-ratio: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 11px;
cursor: pointer;
border-radius: 3px;
transition: all 0.2s ease;
color: #333;
padding: 1px;
font-weight: 500;
position: relative;
}
.calendar-day:hover {
background-color: #e7f3ff;
}
.calendar-day.today {
background-color: var(--accent-color, #007bff);
color: white;
font-weight: bold;
}
.calendar-day.other-month {
color: #ccc;
}
.calendar-day.selected {
background-color: #0056b3;
color: white;
font-weight: bold;
}
/* Индикатор для дней с заметками */
.calendar-day.has-notes::after {
content: "";
position: absolute;
bottom: 2px;
left: 50%;
transform: translateX(-50%);
width: 4px;
height: 4px;
background-color: #28a745;
border-radius: 50%;
}
/* Индикатор для выбранного дня с заметками */
.calendar-day.selected.has-notes::after {
background-color: #fff;
}
/* Индикатор для сегодняшнего дня с заметками */
.calendar-day.today.has-notes::after {
background-color: #fff;
}
/* Стили для секции тегов */
.tags-section {
margin-top: 15px;
padding-top: 15px;
border-top: 1px solid #e0e0e0;
}
.tags-header {
margin-bottom: 10px;
}
.tags-title {
font-size: 12px;
font-weight: bold;
color: #333;
}
.tags-container {
display: flex;
flex-wrap: wrap;
gap: 5px;
}
.tag {
display: inline-block;
padding: 4px 8px;
background-color: #ffffff;
color: var(--accent-color, #007bff);
border: 1px solid var(--accent-color, #007bff);
border-radius: 12px;
font-size: 10px;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
user-select: none;
}
.tag:hover {
background-color: var(--accent-color, #007bff);
color: white;
}
.tag.active {
background-color: var(--accent-color, #007bff);
color: white;
font-weight: bold;
}
.tag-count {
margin-left: 4px;
font-size: 9px;
opacity: 0.8;
}
/* Стили для тегов в заметках */
.textNote .tag-in-note {
display: inline-block;
padding: 2px 6px;
background-color: #ffffff;
color: var(--accent-color, #007bff);
border: 1px solid var(--accent-color, #007bff);
border-radius: 8px;
font-size: 12px;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
text-decoration: none;
margin: 0 2px;
word-wrap: break-word;
overflow-wrap: break-word;
}
.textNote .tag-in-note:hover {
background-color: var(--accent-color, #007bff);
color: white;
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}
/* Стили для подсветки результатов поиска */
.search-highlight {
background-color: #fff3cd;
padding: 1px 2px;
border-radius: 2px;
font-weight: 500;
}
.search-highlight.current {
background-color: #ffc107;
color: #000;
}
/* Стили для мобильного меню и слайдера */
.mobile-menu-btn {
display: none;
position: fixed;
top: 15px;
left: 15px;
z-index: 999;
background: white;
border: 1px solid #ddd;
border-radius: 8px;
padding: 10px 12px;
cursor: pointer;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
transition: all 0.3s ease;
}
.mobile-menu-btn:hover {
background: #f8f9fa;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.mobile-menu-btn .iconify {
font-size: 24px;
color: #333;
}
/* Мобильный слайдер */
.mobile-sidebar {
display: flex;
position: fixed;
top: 0;
left: -85vw;
width: 85vw;
max-width: 320px;
height: 100vh;
background: white;
box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
z-index: 1000;
overflow-y: auto;
transition: left 0.3s ease;
flex-direction: column;
padding: 0;
}
.mobile-sidebar.open {
left: 0;
}
.sidebar-close-btn {
display: flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
padding: 0;
margin: 10px 10px 10px auto;
background: #f8f9fa;
border: 1px solid #ddd;
border-radius: 8px;
cursor: pointer;
transition: all 0.2s ease;
flex-shrink: 0;
}
.sidebar-close-btn:hover {
background: #e9ecef;
}
.sidebar-close-btn .iconify {
font-size: 20px;
color: #333;
}
.sidebar-content {
padding: 10px 12px;
overflow-y: auto;
flex: 1;
}
/* Правильные стили для календаря в слайдере */
.mobile-sidebar .mini-calendar {
width: 100%;
margin-bottom: 15px;
}
.mobile-sidebar .calendar-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
gap: 4px;
}
.mobile-sidebar .calendar-month-year {
font-size: 12px;
font-weight: bold;
color: #333;
text-align: center;
flex: 1;
}
.mobile-sidebar .calendar-nav {
background: none;
border: none;
font-size: 16px;
cursor: pointer;
color: var(--accent-color, #007bff);
padding: 0 3px;
transition: color 0.3s ease;
}
.mobile-sidebar .calendar-nav:hover {
color: #0056b3;
}
/* Календарь дней в слайдере */
.mobile-sidebar .calendar-days {
display: grid;
grid-template-columns: repeat(7, 1fr);
gap: 1px;
margin-bottom: 15px;
}
.mobile-sidebar .calendar-day {
aspect-ratio: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 9px;
cursor: pointer;
border-radius: 3px;
transition: all 0.2s ease;
color: #333;
padding: 1px;
font-weight: 500;
position: relative;
background-color: #f8f9fa;
}
.mobile-sidebar .calendar-day:hover {
background-color: #e7f3ff;
}
.mobile-sidebar .calendar-day.today {
background-color: var(--accent-color, #007bff);
color: white;
font-weight: bold;
}
.mobile-sidebar .calendar-day.selected {
background-color: #0056b3;
color: white;
font-weight: bold;
}
.mobile-sidebar .calendar-day.other-month {
color: #ccc;
background-color: #fafafa;
}
/* Поиск в слайдере */
.mobile-sidebar .search-section {
margin-bottom: 15px;
padding-bottom: 15px;
border-bottom: 1px solid #e0e0e0;
}
.mobile-sidebar .search-title {
font-size: 11px;
font-weight: bold;
color: #333;
display: block;
margin-bottom: 8px;
}
.mobile-sidebar .search-input {
width: 100%;
padding: 6px 10px;
border: 1px solid #ddd;
border-radius: 15px;
font-size: 11px;
background-color: #f8f9fa;
transition: all 0.3s ease;
box-sizing: border-box;
}
.mobile-sidebar .search-input:focus {
outline: none;
border-color: var(--accent-color, #007bff);
background-color: white;
box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}
/* Теги в слайдере */
.mobile-sidebar .tags-section {
margin-top: 0;
padding-top: 0;
border-top: none;
}
.mobile-sidebar .tags-title {
font-size: 11px;
font-weight: bold;
color: #333;
display: block;
margin-bottom: 8px;
}
.mobile-sidebar .tags-container {
display: flex;
flex-wrap: wrap;
gap: 5px;
}
.mobile-sidebar .tag {
display: inline-block;
padding: 4px 8px;
color: var(--accent-color, #007bff);
border: 1px solid var(--accent-color, #007bff);
border-radius: 12px;
font-size: 9px;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
user-select: none;
white-space: nowrap;
}
.mobile-sidebar .tag:hover {
background-color: var(--accent-color, #007bff);
color: white;
}
.mobile-sidebar .tag.active {
background-color: var(--accent-color, #007bff);
color: white;
font-weight: bold;
}
.mobile-sidebar .tag-count {
margin-left: 3px;
font-size: 8px;
opacity: 0.8;
}
/* Оверлей для закрытия слайдера */
.mobile-sidebar-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 999;
opacity: 0;
transition: opacity 0.3s ease;
}
.mobile-sidebar-overlay.open {
display: block;
opacity: 1;
}
/* Мобильная адаптация */
@media (max-width: 768px) {
/* Показываем мобильное меню */
.mobile-menu-btn {
display: flex;
align-items: center;
justify-content: center;
}
/* Скрываем левый блок с календарем, поиском и тегами */
.container-leftside {
display: none !important;
}
/* На мобильных устройствах меняем направление flex и центрируем */
body {
flex-direction: column;
gap: 0;
padding: 0 10px;
justify-content: flex-start;
align-items: center;
}
/* Центральный контейнер занимает всю ширину, но центрируется */
.center {
width: 100%;
max-width: 600px;
margin: 0 auto;
margin-top: 60px;
}
/* Адаптируем контейнер заметок */
.container {
width: 100%;
max-width: none;
margin-top: 10px;
padding: 10px;
box-sizing: border-box;
}
/* Адаптируем заголовок заметок */
.notes-header {
flex-direction: column;
align-items: flex-start;
gap: 10px;
width: 100%;
}
.notes-header-left {
width: 100%;
}
.user-info {
width: 100%;
justify-content: space-between;
flex-wrap: wrap;
gap: 10px;
}
/* Адаптируем кнопки markdown */
.markdown-buttons {
display: flex;
flex-wrap: wrap;
gap: 5px;
width: 100%;
justify-content: flex-start;
}
.markdown-buttons .btnMarkdown {
flex: 0 1 auto;
min-width: auto;
margin-right: 0;
padding: 8px 12px;
font-size: 14px;
}
/* Адаптируем textarea */
textarea {
min-height: 100px;
}
/* Адаптируем кнопку сохранения */
.save-button-container {
width: 100%;
flex-direction: column;
}
.btnSave {
width: 100%;
}
/* Адаптируем footer */
.footer {
position: relative;
margin-top: 20px;
}
}
/* Стили для загрузки изображений */
.image-preview-container {
margin: 15px 0;
padding: 15px;
background: #f8f9fa;
border: 2px dashed #dee2e6;
border-radius: 8px;
/* Улучшения для мобильных устройств */
touch-action: manipulation;
-webkit-tap-highlight-color: transparent;
}
.image-preview-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
font-weight: 600;
color: #495057;
}
.clear-images-btn {
background: #dc3545;
color: white;
border: none;
padding: 4px 8px;
border-radius: 4px;
cursor: pointer;
font-size: 12px;
transition: background-color 0.3s ease;
}
.clear-images-btn:hover {
background: #c82333;
}
.image-preview-list {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.image-preview-item {
position: relative;
border: 1px solid #dee2e6;
border-radius: 6px;
overflow: hidden;
background: white;
}
.image-preview-item img {
width: 100px;
height: 100px;
object-fit: cover;
display: block;
}
.image-preview-item .remove-image-btn {
position: absolute;
top: 2px;
right: 2px;
background: rgba(220, 53, 69, 0.8);
color: white;
border: none;
border-radius: 50%;
width: 24px; /* Увеличиваем размер для touch */
height: 24px; /* Увеличиваем размер для touch */
cursor: pointer;
font-size: 14px; /* Увеличиваем размер шрифта */
display: flex;
align-items: center;
justify-content: center;
transition: background-color 0.3s ease;
/* Улучшения для мобильных устройств */
touch-action: manipulation;
-webkit-tap-highlight-color: transparent;
user-select: none;
-webkit-user-select: none;
}
.image-preview-item .remove-image-btn:hover {
background: rgba(220, 53, 69, 1);
}
.image-preview-item .image-info {
padding: 4px 6px;
font-size: 10px;
color: #6c757d;
background: #f8f9fa;
word-break: break-all;
}
/* Стили для изображений в заметках */
.note-image {
width: 150px;
height: 150px;
object-fit: cover;
border-radius: 6px;
margin: 10px 0;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
cursor: pointer;
transition: transform 0.2s ease;
}
.note-image:hover {
transform: scale(1.02);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.note-image::after {
content: "🔍";
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: rgba(0, 0, 0, 0.7);
color: white;
padding: 8px;
border-radius: 50%;
font-size: 16px;
opacity: 0;
transition: opacity 0.2s ease;
pointer-events: none;
}
.note-image:hover::after {
opacity: 1;
}
.note-images-container {
margin: 10px 0;
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.note-image-item {
position: relative;
display: inline-block;
}
.note-image-item .note-image {
position: relative;
}
.note-image-item .remove-note-image-btn {
position: absolute;
top: 5px;
right: 5px;
background: rgba(220, 53, 69, 0.8);
color: white;
border: none;
border-radius: 50%;
width: 24px;
height: 24px;
cursor: pointer;
font-size: 14px;
display: flex;
align-items: center;
justify-content: center;
transition: background-color 0.3s ease;
opacity: 0;
}
.note-image-item:hover .remove-note-image-btn {
opacity: 1;
}
.note-image-item .remove-note-image-btn:hover {
background: rgba(220, 53, 69, 1);
}
/* Модальное окно для просмотра изображений */
.image-modal {
display: none;
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.9);
cursor: pointer;
}
.image-modal-content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
max-width: 90%;
max-height: 90%;
object-fit: contain;
}
.image-modal-close {
position: absolute;
top: 15px;
right: 35px;
color: #f1f1f1;
font-size: 40px;
font-weight: bold;
cursor: pointer;
}
.image-modal-close:hover {
color: #bbb;
}
/* Адаптивность для изображений */
@media (max-width: 768px) {
.image-preview-list {
justify-content: center;
}
.note-images-container {
justify-content: center;
}
.image-preview-item img {
width: 80px;
height: 80px;
}
/* Улучшения для мобильных устройств */
.markdown-buttons .btnMarkdown {
min-height: 48px; /* Увеличиваем высоту для touch */
padding: 8px 12px;
margin: 2px;
}
.image-preview-item .remove-image-btn {
width: 28px; /* Еще больше для мобильных */
height: 28px;
font-size: 16px;
}
.clear-images-btn {
min-height: 44px; /* Минимальная высота для touch */
padding: 8px 16px;
font-size: 14px;
}
.note-image {
width: 120px;
height: 120px;
}
}
/* Стили для выбора цветового акцента */
.accent-color-picker {
display: flex;
gap: 10px;
margin-bottom: 10px;
flex-wrap: wrap;
}
.color-option {
width: 40px;
height: 40px;
border-radius: 50%;
cursor: pointer;
border: 3px solid transparent;
transition: all 0.3s ease;
position: relative;
}
.color-option:hover {
transform: scale(1.1);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.color-option.selected {
border-color: #333;
transform: scale(1.1);
box-shadow: 0 0 0 2px white, 0 0 0 4px #333;
}
.color-option::after {
content: "✓";
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: white;
font-weight: bold;
font-size: 18px;
opacity: 0;
transition: opacity 0.2s ease;
}
.color-option.selected::after {
opacity: 1;
}
#accentColor {
width: 60px;
height: 40px;
border: none;
border-radius: 5px;
cursor: pointer;
}