web_writer/assets/css/style.css

660 lines
14 KiB
CSS
Executable File
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.

/* style.css */
h1, h2, h3, h4, h5, h6 {
margin-bottom: 1rem;
}
article, textarea, main.container {
margin-top: 1rem;
margin-bottom: 1rem;
padding-top: 1rem;
padding-bottom: 1rem;
}
article > header, article > footer {
margin-top: 0.1rem;
margin-bottom: 0.1rem;
padding-top: 0.2rem;
padding-bottom: 0.2rem;
}
input:not([type="checkbox"], [type="radio"]), select {
padding: 4px;
height: 2em;
}
.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;
}
.compact-button {
padding: 3px 8px !important;
font-size: 0.85rem;
text-decoration: none;
display: inline-flex !important;
align-items: center;
justify-content: center;
border: 1px solid var(--secondary);
border-radius: 4px;
background: var(--secondary);
color: var(--secondary-inverse);
cursor: pointer;
height: 28px !important;
box-sizing: border-box;
line-height: 1 !important;
vertical-align: middle;
}
.compact-button:hover {
opacity: 0.9;
}
.compact-table {
width: 100%;
font-size: 0.9rem;
border-collapse: collapse;
}
.compact-table th,
.compact-table td {
padding: 6px 8px;
border-bottom: 1px solid #eee;
}
.compact-table th {
background: #f5f5f5;
font-weight: bold;
}
.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;
}
.button-group .delete-btn {
background: #ff4444 !important;
border-color: #ff4444 !important;
color: white !important;
}
.green-btn {
background: #449944 !important;
border-color: #449944 !important;
color: white !important;
}
.green-btn:hover {
background: #44bb44 !important;
border-color: #44bb44 !important;
color: white !important;
}
.profile-buttons {
display: flex;
gap: 10px;
align-items: stretch;
}
.profile-button {
flex: 1;
padding: 0.75rem;
display: flex;
align-items: center;
justify-content: center;
text-decoration: none;
border: 1px solid;
border-radius: 4px;
font-size: 1rem;
cursor: pointer;
box-sizing: border-box;
height: 62px;
min-height: 44px;
}
.profile-button.primary {
background: var(--primary);
border-color: var(--primary);
color: var(--primary-inverse);
}
.profile-button.secondary {
background: var(--secondary);
border-color: var(--secondary);
color: var(--secondary-inverse);
}
.adaptive-button {
padding: 8px 12px !important;
font-size: 0.85rem;
text-decoration: none;
display: inline-flex;
align-items: center;
justify-content: center;
border: 1px solid var(--secondary);
border-radius: 4px;
background: var(--secondary);
color: var(--secondary-inverse);
cursor: pointer;
box-sizing: border-box;
text-align: center;
white-space: normal;
word-break: break-word;
min-height: 44px;
flex: 1;
min-width: 120px;
margin: 2px;
}
.adaptive-button:hover {
opacity: 0.9;
}
.primary.adaptive-button {
background: var(--primary);
border-color: var(--primary);
color: var(--primary-inverse);
}
@media (max-width: 768px) {
.adaptive-button {
flex: 1 1 calc(50% - 10px);
min-width: calc(50% - 10px);
font-size: 0.8rem;
padding: 10px 8px !important;
}
}
@media (max-width: 480px) {
.adaptive-button {
flex: 1 1 100%;
min-width: 100%;
}
}
/* Стили для Markdown редактора */
#content {
transition: all 0.3s ease;
border: 1px solid #ddd;
border-radius: 4px;
padding: 12px;
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
font-size: 14px;
line-height: 1.5;
min-height: 400px;
color: #111;
background-color: #fff;
resize: vertical;
}
#content:focus {
border-color: #007bff;
box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
outline: none;
color: #111;
background-color: #fff;
}
/* Стили для полноэкранного режима */
.editor-controls {
position: sticky !important;
top: 10px !important;
right: 10px !important;
z-index: 100 !important;
display: flex;
gap: 5px;
justify-content: flex-end;
margin-bottom: 10px;
}
.editor-controls button {
width: 40px !important;
height: 40px !important;
border-radius: 50% !important;
border: 1px solid #ddd !important;
background: white !important;
cursor: pointer !important;
font-size: 16px !important;
display: flex !important;
align-items: center !important;
justify-content: center !important;
box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
transition: all 0.3s ease !important;
color: #333333 !important;
}
.editor-controls button:hover {
transform: scale(1.1) !important;
background-color: #f8f9fa !important;
box-shadow: 0 4px 8px rgba(0,0,0,0.3) !important;
}
/* Стили для полноэкранных кнопок */
#fullscreen-controls {
position: fixed !important;
top: 15px !important;
right: 15px !important;
z-index: 9999 !important;
display: flex !important;
gap: 5px !important;
}
#fullscreen-controls button {
width: 45px !important;
height: 45px !important;
border-radius: 50% !important;
border: 1px solid #ddd !important;
background: white !important;
cursor: pointer !important;
font-size: 18px !important;
display: flex !important;
align-items: center !important;
justify-content: center !important;
box-shadow: 0 2px 5px rgba(0,0,0,0.3) !important;
transition: all 0.3s ease !important;
color: #333333 !important;
}
#fullscreen-controls button:hover {
transform: scale(1.1) !important;
background-color: #f8f9fa !important;
box-shadow: 0 4px 8px rgba(0,0,0,0.4) !important;
}
/* Стили для полноэкранного режима - упрощенные для мобильных */
#content.mobile-fullscreen {
position: fixed !important;
top: 50px !important;
left: 0 !important;
width: 100vw !important;
height: calc(100vh - 100px) !important; /* Оставляем место для клавиатуры */
z-index: 9998 !important;
background-color: white !important;
border: 2px solid #007bff !important;
border-radius: 0 !important;
font-size: 18px !important;
padding: 15px !important;
margin: 0 !important;
box-sizing: border-box !important;
resize: none !important;
box-shadow: none !important;
overflow-y: auto !important;
-webkit-overflow-scrolling: touch !important;
}
/* Стили для ПК в полноэкранном режиме */
#content.desktop-fullscreen {
position: fixed !important;
top: 5vh !important;
left: 5vw !important;
width: 90vw !important;
height: 90vh !important;
z-index: 9998 !important;
background-color: white !important;
border: 2px solid #007bff !important;
border-radius: 8px !important;
font-size: 16px !important;
padding: 20px !important;
margin: 0 !important;
box-sizing: border-box !important;
resize: none !important;
box-shadow: 0 0 20px rgba(0,0,0,0.3) !important;
}
/* Улучшенные стили для кнопок в полноэкранном режиме */
#fullscreen-controls {
position: fixed !important;
z-index: 9999 !important;
display: flex !important;
gap: 5px !important;
}
/* Для мобильных устройств */
@media (max-width: 768px) {
#fullscreen-controls {
top: 10px !important;
right: 10px !important;
}
#fullscreen-controls button {
width: 60px !important;
height: 60px !important;
font-size: 24px !important;
border: 2px solid #ddd !important;
}
.editor-controls button {
width: 50px !important;
height: 50px !important;
font-size: 20px !important;
}
/* Улучшенный полноэкранный режим для мобильных с учетом клавиатуры */
#content.mobile-fullscreen {
padding: 15px !important;
font-size: 16px !important;
}
/* Дополнительные стили для очень маленьких экранов */
@media (max-width: 480px) {
#fullscreen-controls button {
width: 55px !important;
height: 55px !important;
font-size: 22px !important;
}
#content.mobile-fullscreen {
padding: 10px !important;
font-size: 16px !important;
}
}
}
/* Для десктопов */
@media (min-width: 769px) {
#fullscreen-controls {
top: 15px !important;
right: 15px !important;
}
#fullscreen-controls button {
width: 50px !important;
height: 50px !important;
font-size: 20px !important;
}
}
/* Кастомный скроллбар */
#content::-webkit-scrollbar {
width: 8px;
}
#content::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 4px;
}
#content::-webkit-scrollbar-thumb {
background: #c1c1c1;
border-radius: 4px;
}
#content::-webkit-scrollbar-thumb:hover {
background: #a8a8a8;
}
/* Для Firefox */
#content {
scrollbar-width: thin;
scrollbar-color: #c1c1c1 #f1f1f1;
}
.book-content {
line-height: 1.7;
font-family: Georgia, serif;
}
.book-content h1 {
font-size: 2em;
margin-top: 2rem;
margin-bottom: 1rem;
border-bottom: 2px solid #eee;
padding-bottom: 0.5rem;
}
.book-content h2 {
font-size: 1.6em;
margin-top: 1.5rem;
margin-bottom: 1rem;
border-bottom: 1px solid #eee;
padding-bottom: 0.3rem;
}
.book-content h3 {
font-size: 1.3em;
margin-top: 1.2rem;
margin-bottom: 0.8rem;
}
.book-content p {
margin-bottom: 1rem;
text-align: justify;
}
.book-content blockquote {
border-left: 4px solid #007bff;
padding-left: 1.5rem;
margin-left: 0;
margin-right: 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;
border-left: 4px solid #007bff;
}
.book-content pre code {
background: none;
padding: 0;
color: inherit;
}
.book-content ul, .book-content ol {
margin-bottom: 1rem;
padding-left: 2rem;
}
.book-content li {
margin-bottom: 0.3rem;
}
.book-content table {
width: 100%;
border-collapse: collapse;
margin-bottom: 1rem;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.book-content th, .book-content td {
border: 1px solid #ddd;
padding: 10px 12px;
text-align: left;
}
.book-content th {
background: #f5f5f5;
font-weight: bold;
}
.book-content tr:nth-child(even) {
background: #f9f9f9;
}
/* Стили для диалогов */
.dialogue {
margin-left: 2rem;
font-style: italic;
color: #2c5aa0;
}
/* Адаптивность для мобильных */
@media (max-width: 768px) {
.book-content {
font-size: 16px;
line-height: 1.6;
}
.book-content h1 {
font-size: 1.6em;
}
.book-content h2 {
font-size: 1.4em;
}
.book-content h3 {
font-size: 1.2em;
}
.book-content pre {
font-size: 14px;
}
}
/* Стили для кнопок действий */
.action-button {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0.75rem 1.5rem;
font-size: 0.9rem;
text-decoration: none;
border: 1px solid;
border-radius: 4px;
cursor: pointer;
box-sizing: border-box;
height: 44px;
min-width: 140px;
white-space: nowrap;
transition: all 0.3s ease;
text-align: center;
}
.action-button.primary {
background: #007bff;
border-color: #007bff;
color: #fff;
}
.action-button.primary:hover {
opacity: 0.9;
}
.action-button.delete {
margin-top: 1rem;
background: #ff4444;
border-color: #ff4444;
color: white;
}
.action-button.delete:hover {
background: #dd3333;
border-color: #dd3333;
color: white;
}
/* Адаптивность для мобильных */
@media (max-width: 768px) {
.action-button {
padding: 0.6rem 1rem;
font-size: 0.85rem;
min-width: 120px;
height: 42px;
}
}
@media (max-width: 480px) {
.action-button {
padding: 0.5rem 0.8rem;
font-size: 0.8rem;
min-width: 110px;
height: 40px;
}
/* На очень маленьких экранах делаем кнопки блочными */
.action-buttons-container {
flex-direction: column;
width: 100%;
}
.action-buttons-container .action-button {
width: 100%;
min-width: auto;
}
}
/* assets/css/style.css - добавить */
.book-cover {
transition: transform 0.3s ease;
}
.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;
}
/* Стили для страницы автора */
.author-books .book-cover {
transition: transform 0.3s ease;
}
.author-books .book-cover:hover {
transform: scale(1.05);
}
/* Адаптивность для страницы автора */
@media (max-width: 768px) {
.author-books article {
flex-direction: column;
}
.author-books .book-cover {
align-self: center;
}
}