NoteJS/public/style.css
Fovway 7def129e14 refactor: Redesign calendar as compact sidebar box with improved layout
- Changed calendar from full sidebar to compact containerized box
- Reduced calendar size (190px width) to minimize space usage
- Increased main container max-width from 600px to 850px for two-column layout
- Added proper styling for .main element (white background, shadow, padding)
- Improved visual hierarchy with matching design patterns
- Updated CSS version for cache busting
2025-10-18 00:39:21 +07:00

597 lines
9.5 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.

body {
font-family: "Open Sans", sans-serif;
padding: 0;
margin: 0;
display: flex;
flex-wrap: wrap;
justify-content: center;
background: #f5f5f5;
}
header {
font-size: 20px;
font-weight: bold;
margin-bottom: 20px;
}
.notes-header {
display: flex;
justify-content: space-between;
align-items: center;
}
.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: #007bff;
text-decoration: none;
font-weight: 500;
}
.auth-link a:hover {
text-decoration: underline;
}
.container {
width: 90%;
max-width: 850px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
border-radius: 8px;
padding: 15px;
margin-top: 20px;
background: white;
}
.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: #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: #007bff;
color: white;
border-color: #007bff;
}
.date {
font-size: 11px;
color: grey;
}
.notesHeaderBtn {
display: inline-block;
cursor: pointer;
color: black;
font-weight: bold;
margin-left: 10px;
}
.textNote {
margin-top: 10px;
white-space: pre-wrap;
}
/* Убираем стандартные отступы для абзацев */
.textNote p {
margin: 0;
padding: 0;
}
/* Убираем маргины у заголовков */
.textNote h1,
.textNote h2,
.textNote h3,
.textNote h4,
.textNote h5,
.textNote h6 {
margin: 0;
padding: 0;
}
/* Убираем отступы у списков */
.textNote ul,
.textNote ol {
margin: 0;
padding-left: 20px;
}
/* Убираем маргины у элементов списка */
.textNote li {
margin: 0;
padding: 0;
}
/* Стили для ссылок */
.textNote a {
color: #007bff;
text-decoration: none;
}
.textNote a:hover {
text-decoration: underline;
}
/* Стили для цитат */
.textNote blockquote {
border-left: 4px solid #007bff;
padding-left: 16px;
margin: 10px 0;
color: #555;
font-style: italic;
background-color: #f8f9fa;
padding: 10px 16px;
border-radius: 0 4px 4px 0;
}
.textNote blockquote p {
margin: 0;
}
/* Стили для кода */
.textNote pre {
background-color: #f5f5f5;
padding: 10px;
border-radius: 5px;
font-size: 14px;
overflow-x: auto;
}
.textNote code {
background-color: #f5f5f5;
padding: 2px 4px;
border-radius: 5px;
font-size: 14px;
}
.notes-container {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
padding-bottom: 60px; /* Отступ снизу для footer */
}
#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;
}
.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;
padding-bottom: 80px; /* Отступ снизу, чтобы контент не обрезался футером */
}
.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 #007bff;
}
.avatar-placeholder {
width: 150px;
height: 150px;
border-radius: 50%;
background-color: #e0e0e0;
display: 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: #007bff;
color: white;
border-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: #007bff;
text-decoration: none;
transition: all 0.3s ease;
display: inline-block;
}
.back-btn:hover {
background-color: #007bff;
color: white;
border-color: #007bff;
}
.username-clickable {
cursor: pointer;
transition: color 0.3s ease;
}
.username-clickable:hover {
color: #007bff;
text-decoration: underline;
}
/* ========== Стили для компактного календаря ========== */
.main-wrapper {
display: flex;
gap: 15px;
align-items: flex-start;
width: 100%;
}
.calendar-box {
flex-shrink: 0;
width: 190px;
background: white;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
border-radius: 8px;
padding: 10px;
}
.calendar-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
gap: 4px;
}
.calendar-header h3 {
margin: 0;
font-size: 11px;
font-weight: 600;
color: #333;
min-width: 75px;
text-align: center;
flex: 1;
}
.calendar-nav-btn {
background: #f0f0f0;
border: 1px solid #ddd;
border-radius: 3px;
padding: 2px 5px;
cursor: pointer;
font-size: 11px;
color: #333;
transition: all 0.2s ease;
}
.calendar-nav-btn:hover {
background: #007bff;
color: white;
border-color: #007bff;
}
.calendar-weekdays {
display: grid;
grid-template-columns: repeat(7, 1fr);
gap: 1px;
margin-bottom: 5px;
}
.weekday {
text-align: center;
font-size: 8px;
font-weight: 600;
color: #666;
padding: 1px 0;
text-transform: uppercase;
}
.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: 10px;
border-radius: 3px;
cursor: pointer;
background: #f8f9fa;
color: #666;
border: 1px solid transparent;
transition: all 0.2s ease;
position: relative;
}
.calendar-day:hover {
background: #e8f4f8;
border-color: #007bff;
}
.calendar-day.other-month {
color: #ccc;
background: #fafafa;
}
.calendar-day.today {
background: #007bff;
color: white;
font-weight: 600;
border-color: #0056cc;
}
.calendar-day.today:hover {
background: #0056cc;
}
.calendar-day.selected {
background: #28a745;
color: white;
font-weight: 600;
border-color: #1e7e34;
}
.calendar-day.selected:hover {
background: #1e7e34;
}
.main {
flex: 1;
min-width: 300px;
}
/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
.main-wrapper {
flex-direction: column;
}
.calendar-box {
width: 100%;
}
.main {
min-width: auto;
}
.container {
max-width: 100%;
}
}
/* Стиль для основного блока заметок */
.main {
background: white;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
border-radius: 8px;
padding: 15px;
}