/
F1lya
/
Modal_Window
Обзор
Документация
Войти
/
F1lya
/
Modal_Window
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
ImageEditor.css
287 строк
5 KB
F1lya
upload files
20 окт 2025, 14:17
20 окт 2025, 14:17
f9aac0b
Код
Авторство
О чём код?
.image-editor { max-width: 1200px; margin: 0 auto; padding: 20px; } .image-editor__upload-section { text-align: center; margin-bottom: 40px; } .image-editor__upload-button { display: inline-block; padding: 16px 32px; background: #3b82f6; color: white; border-radius: 8px; cursor: pointer; font-size: 16px; font-weight: 600; transition: background-color 0.2s; border: none; } .image-editor__upload-button:hover { background: #2563eb; } .image-editor__loading { margin-top: 16px; color: #6b7280; font-size: 14px; } .image-editor__error { margin-top: 16px; color: #dc2626; background: #fef2f2; padding: 12px 16px; border-radius: 6px; font-size: 14px; } .image-editor__workspace { display: flex; gap: 40px; align-items: flex-start; justify-content: center; flex-wrap: wrap; } .image-editor__main-content { display: flex; flex-direction: column; gap: 24px; } .image-editor__instructions { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 20px; max-width: 600px; } .image-editor__instructions h3 { margin: 0 0 12px 0; font-size: 16px; color: #1e293b; } .image-editor__instructions ul { margin: 0; padding-left: 20px; color: #475569; } .image-editor__instructions li { margin-bottom: 6px; } .image-editor__editor-area { display: flex; flex-direction: column; gap: 20px; } .image-editor__container { position: relative; border: 2px solid #e2e8f0; border-radius: 8px; background: linear-gradient(45deg, #f1f5f9 25%, transparent 25%), linear-gradient(-45deg, #f1f5f9 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f1f5f9 75%), linear-gradient(-45deg, transparent 75%, #f1f5f9 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0px; overflow: hidden; margin: 0 auto; } .image-editor__image { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; pointer-events: none; } .image-editor__frame { position: absolute; border: 2px solid #3b82f6; background: rgba(59, 130, 246, 0.1); cursor: move; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.4); transition: all 0.1s ease; } .image-editor__frame--dragging { cursor: grabbing; border-color: #1d4ed8; border-style: dashed; } .image-editor__controls { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 16px; background: white; border: 1px solid #e2e8f0; border-radius: 8px; } .image-editor__frame-info { display: flex; gap: 20px; font-size: 14px; color: #475569; font-weight: 500; } .image-editor__actions { display: flex; gap: 12px; } .image-editor__button { padding: 10px 20px; border: none; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; } .image-editor__button:disabled { opacity: 0.6; cursor: not-allowed; } .image-editor__button--primary { background: #10b981; color: white; } .image-editor__button--primary:hover:not(:disabled) { background: #059669; } .image-editor__button--secondary { background: #6b7280; color: white; } .image-editor__button--secondary:hover:not(:disabled) { background: #4b5563; } .image-editor__thumbnail { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); border: 1px solid #e5e7eb; min-width: 250px; } .thumbnail__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #f3f4f6; } .thumbnail__header h3 { margin: 0; font-size: 16px; font-weight: 600; color: #111827; } .thumbnail__dimensions { font-size: 14px; font-weight: 500; color: #6b7280; background: #f3f4f6; padding: 4px 8px; border-radius: 6px; } .thumbnail__preview { width: 200px; height: 200px; border: 2px solid #e5e7eb; border-radius: 8px; display: flex; align-items: center; justify-content: center; margin: 0 auto; overflow: hidden; background: #f9fafb; } .thumbnail__image { width: 100%; height: 100%; object-fit: cover; } .thumbnail__placeholder { color: #9ca3af; text-align: center; padding: 20px; } .thumbnail__footer { margin-top: 16px; padding-top: 12px; border-top: 1px solid #f3f4f6; font-size: 12px; color: #6b7280; text-align: center; } /* Responsive design */ @media (max-width: 1024px) { .image-editor__workspace { flex-direction: column; align-items: center; } } @media (max-width: 768px) { .image-editor { padding: 16px; } .image-editor__workspace { gap: 24px; } .image-editor__controls { flex-direction: column; align-items: stretch; gap: 16px; } .image-editor__frame-info { justify-content: space-around; text-align: center; } .image-editor__actions { justify-content: center; } .image-editor__container { max-width: 100%; } }