/
Ormon
/
notebook-app
Обзор
Документация
Войти
/
Ormon
/
notebook-app
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
frontend/style.css
718 строк
13 KB
Sergey
новый проект
07 мар 2026, 22:26
07 мар 2026, 22:26
e6a8352
Код
Авторство
О чём код?
:root { --bg-color: #0f172a; --surface-color: rgba(30, 41, 59, 0.7); --surface-border: rgba(255, 255, 255, 0.1); --primary-color: #3b82f6; --primary-hover: #2563eb; --text-main: #f8fafc; --text-muted: #94a3b8; --danger-color: #ef4444; --tag-bg: rgba(59, 130, 246, 0.2); --tag-text: #60a5fa; --reminder-bg: rgba(245, 158, 11, 0.15); --reminder-text: #fbbf24; } * { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: 'Inter', sans-serif; background-color: var(--bg-color); color: var(--text-main); background-image: radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.12), transparent 25%), radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.12), transparent 25%); min-height: 100vh; overflow: hidden; padding-bottom: 0; transition: padding-bottom 0.3s ease; } #app { display: flex; flex-direction: column; height: 100vh; } /* Topbar */ .topbar { display: flex; justify-content: space-between; align-items: center; padding: 1rem 2rem; background: var(--surface-color); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--surface-border); z-index: 10; } .topbar h1 { font-size: 1.5rem; font-weight: 700; background: linear-gradient(to right, #60a5fa, #a78bfa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } /* Layout */ .layout { display: flex; flex: 1; overflow: hidden; } /* Sidebar */ .sidebar { width: 250px; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(8px); border-right: 1px solid var(--surface-border); padding: 1.5rem; overflow-y: auto; } .sidebar h3 { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 1rem; } .tag-list { list-style: none; } .tag-list li { padding: 0.5rem 0.75rem; border-radius: 6px; cursor: pointer; margin-bottom: 0.25rem; transition: all 0.2s ease; color: var(--text-muted); font-weight: 500; } .tag-list li:hover { background: rgba(255, 255, 255, 0.05); color: var(--text-main); } .tag-list li.active { background: var(--primary-color); color: white; } /* Right Column */ .right-column { width: 250px; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(8px); border-left: 1px solid var(--surface-border); padding: 1.5rem; overflow-y: auto; transition: all 0.3s ease; } .right-column.hidden { display: none !important; } .right-column h3 { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 1rem; } .reminders-list { display: flex; flex-direction: column; gap: 1rem; } .reminder-item { background: var(--surface-color); border: 1px solid var(--surface-border); border-radius: 10px; padding: 1rem; font-size: 0.9rem; cursor: pointer; transition: transform 0.2s ease; } .reminder-item:hover { transform: scale(1.02); border-color: var(--primary-color); } .reminder-item .time { color: var(--reminder-text); font-weight: 700; display: block; margin-bottom: 0.25rem; } .reminder-item .title { font-weight: 600; color: var(--text-main); } /* Marquee */ .marquee-container { height: 40px; background: rgba(15, 23, 42, 0.9); backdrop-filter: blur(10px); border-top: 1px solid var(--surface-border); position: fixed; bottom: 0; left: 0; right: 0; display: flex; align-items: center; overflow: hidden; z-index: 100; } .marquee-content { display: flex; white-space: nowrap; animation: marquee 40s linear infinite; padding-left: 100%; } .marquee-item { display: inline-flex; align-items: center; margin-right: 4rem; color: var(--text-main); font-weight: 500; font-size: 0.9rem; } .marquee-item .date-tag { background: var(--primary-color); color: white; padding: 2px 8px; border-radius: 4px; margin-right: 10px; font-size: 0.75rem; } @keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } } /* Main Content */ .content { flex: 1; padding: 2rem; overflow-y: auto; } .notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; } /* Note Card */ .note-card { background: var(--surface-color); border: 1px solid var(--surface-border); border-radius: 12px; padding: 1.5rem; transition: transform 0.2s ease, box-shadow 0.2s ease; position: relative; display: flex; flex-direction: column; backdrop-filter: blur(10px); } .note-card:hover { transform: translateY(-4px); box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.1); border-color: rgba(255, 255, 255, 0.2); } .note-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; padding-right: 2rem; } .note-card .date { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 1rem; } .note-card .body { font-size: 0.95rem; line-height: 1.5; color: #cbd5e1; flex: 1; margin-bottom: 1.5rem; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; } .note-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; } .tag-badge { background: var(--tag-bg); color: var(--tag-text); padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 500; } .reminder-badge { background: var(--reminder-bg); color: var(--reminder-text); padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; } .attachment-badge { display: inline-flex; align-items: center; font-size: 0.8rem; color: #818cf8; margin-top: 0.5rem; cursor: pointer; } .attachment-badge:hover { text-decoration: underline; } .delete-btn { position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: var(--text-muted); cursor: pointer; opacity: 0; transition: opacity 0.2s; font-size: 1.2rem; } .note-card:hover .delete-btn { opacity: 1; } .delete-btn:hover { color: var(--danger-color); } /* Skeletons */ .skeleton-note { height: 200px; background: linear-gradient(90deg, var(--surface-color) 25%, rgba(255, 255, 255, 0.05) 50%, var(--surface-color) 75%); background-size: 200% 100%; animation: skeleton-loading 1.5s infinite; border-radius: 12px; border: 1px solid var(--surface-border); } @keyframes skeleton-loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } } /* Buttons */ .primary-btn, #btn-edit-note, #btn-new-note { background: linear-gradient(135deg, #3b82f6, #2563eb); color: white; border: none; padding: 0.6rem 1.4rem; border-radius: 8px; font-weight: 700; font-family: inherit; cursor: pointer; transition: all 0.1s ease; box-shadow: 0 4px 0 #1d4ed8, 0 8px 15px rgba(0, 0, 0, 0.3); transform: translateY(-2px); text-transform: uppercase; letter-spacing: 0.05em; display: inline-flex; align-items: center; justify-content: center; gap: 8px; } #btn-edit-note { background: linear-gradient(135deg, #fbbf24, #f59e0b); box-shadow: 0 4px 0 #b45309, 0 8px 15px rgba(0, 0, 0, 0.3); color: #0f172a; } .primary-btn:hover, #btn-new-note:hover { background: linear-gradient(135deg, #60a5fa, #3b82f6); transform: translateY(-3px); box-shadow: 0 6px 0 #1d4ed8, 0 12px 20px rgba(0, 0, 0, 0.4); } #btn-edit-note:hover { background: linear-gradient(135deg, #fcd34d, #fbbf24); transform: translateY(-3px); box-shadow: 0 6px 0 #b45309, 0 12px 20px rgba(0, 0, 0, 0.4); } .primary-btn:active, #btn-new-note:active, #btn-edit-note:active { transform: translateY(1px); box-shadow: 0 1px 0 currentColor, 0 2px 5px rgba(0, 0, 0, 0.2); } #btn-edit-note:active { box-shadow: 0 1px 0 #b45309, 0 2px 5px rgba(0, 0, 0, 0.2); } .new-file-item { border-left: 3px solid #4CAF50; background: rgba(76, 175, 80, 0.05); } .new-file-item small { color: #4CAF50; margin-left: 5px; font-size: 0.8em; } .secondary-btn { background: transparent; color: var(--text-main); border: 1px solid var(--surface-border); padding: 0.6rem 1.2rem; border-radius: 8px; font-weight: 500; cursor: pointer; transition: background 0.2s; } .secondary-btn:hover { background: rgba(255, 255, 255, 0.05); } .icon-btn { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; } .icon-btn:hover { color: var(--text-main); } /* Search */ .search-container { display: flex; align-items: center; gap: 0.5rem; flex: 1; max-width: 500px; margin: 0 2rem; background: rgba(15, 23, 42, 0.4); padding: 0.25rem 0.5rem; border-radius: 999px; border: 1px solid var(--surface-border); transition: all 0.2s; } .search-container:focus-within { background: rgba(15, 23, 42, 0.6); border-color: var(--primary-color); box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2); } .search-type { background: transparent; border: none; color: var(--text-muted); font-size: 0.85rem; font-weight: 500; padding: 0.25rem 0.5rem; cursor: pointer; outline: none; border-right: 1px solid var(--surface-border); } .search-type option { background: #1e293b; color: var(--text-main); } #search-input { flex: 1; background: transparent; border: none; color: var(--text-main); padding: 0.4rem 0.5rem; font-size: 0.9rem; } #search-input:focus { outline: none; border: none; box-shadow: none; } /* Pagination */ .pagination-controls { display: flex; align-items: center; justify-content: center; gap: 1.5rem; margin-top: 3rem; padding: 1rem; } .pagination-controls.hidden { display: none; } #page-info { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; } .secondary-btn:disabled { opacity: 0.3; cursor: not-allowed; } /* Utility */ .hidden { display: none !important; } /* Modal */ .modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 50; opacity: 1; transition: opacity 0.3s ease; } .modal-overlay.hidden { opacity: 0; pointer-events: none; } .modal-content { background: #1e293b; border: 1px solid var(--surface-border); width: 100%; max-width: 500px; border-radius: 16px; padding: 2rem; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); transform: translateY(0) scale(1); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); } .modal-overlay.hidden .modal-content { transform: translateY(20px) scale(0.95); } .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; } .header-actions { display: flex; align-items: center; gap: 0.75rem; } /* Read Mode View */ .note-view { margin-bottom: 1.5rem; } .note-view .view-title { font-size: 1.75rem; margin-bottom: 0.5rem; color: var(--text-main); background: linear-gradient(to right, #60a5fa, #a78bfa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } .note-view .date { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1rem; } .note-view .note-reminders { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; } .note-view .body { font-size: 1rem; line-height: 1.6; color: #e2e8f0; margin-bottom: 1.5rem; white-space: pre-wrap; /* Preserve line breaks */ } .attachments-list { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--surface-border); } .attachments-list h4 { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.25rem; } /* Edit Form File List */ .edit-files-list { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.5rem; } .edit-file-item { display: flex; justify-content: space-between; align-items: center; background: rgba(255, 255, 255, 0.05); padding: 0.4rem 0.75rem; border-radius: 6px; font-size: 0.85rem; } .edit-file-item .remove-file { color: var(--danger-color); cursor: pointer; font-weight: bold; font-size: 1.1rem; padding-left: 10px; } .edit-file-item .remove-file:hover { color: #ff6b6b; } .form-group { margin-bottom: 1.2rem; } .form-group.row { display: flex; gap: 1rem; } .flex-1 { flex: 1; } label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--text-muted); margin-bottom: 0.5rem; } input[type="text"], textarea { width: 100%; background: rgba(15, 23, 42, 0.5); border: 1px solid var(--surface-border); color: var(--text-main); padding: 0.75rem; border-radius: 8px; font-family: inherit; font-size: 0.95rem; transition: border-color 0.2s, box-shadow 0.2s; } input[type="text"]:focus, textarea:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25); } .modal-actions { display: flex; justify-content: flex-end; gap: 1rem; margin-top: 2rem; } .file-upload-wrapper { display: flex; align-items: center; gap: 1rem; } .file-status { font-size: 0.85rem; color: var(--text-muted); }