/
denispirit
/
otbor
Обзор
Документация
Войти
/
denispirit
/
otbor
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
public/css/style.css
391 строка
7 KB
denispirit
Final наверное
14 фев 2025, 14:13
14 фев 2025, 14:13
5b40404
Код
Авторство
О чём код?
/* Общие стили */ body { font-family: Arial, sans-serif; line-height: 1.6; margin: 0; padding: 0; background-color: #f5f5f5; } .container { max-width: 1200px; margin: 0 auto; padding: 20px; } /* Навигация */ .navbar { background-color: white; box-shadow: 0 2px 4px rgba(0,0,0,0.1); margin-bottom: 30px; } .navbar-container { display: flex; justify-content: space-between; align-items: center; padding: 15px; } .navbar-brand { font-size: 20px; font-weight: bold; color: #333; text-decoration: none; } .navbar-menu { display: flex; gap: 20px; align-items: center; } /* Кнопки */ .btn { padding: 8px 16px; border-radius: 4px; border: none; cursor: pointer; text-decoration: none; display: inline-block; } .btn-primary { background-color: #3490dc; color: white; } .btn-success { background-color: #38c172; color: white; } .btn-danger { background-color: #e3342f; color: white; } /* Карточки объявлений */ .ads-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; padding: 20px; } .ad-card { background: #fff; border-radius: 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); padding: 15px; transition: transform 0.2s; } .ad-card:hover { box-shadow: 0 4px 8px rgba(0,0,0,0.2); } .ad-title { font-size: 18px; font-weight: bold; margin-bottom: 10px; color: #2d3748; } .ad-description { color: #4a5568; margin-bottom: 15px; } .ad-email { color: #718096; font-size: 14px; } /* Формы */ .form-group { margin-bottom: 15px; } .form-control { width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; } .form-label { display: block; margin-bottom: 5px; color: #4a5568; } /* Модальные окна */ .modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); } .modal.show { display: flex; align-items: center; justify-content: center; } .modal-content { background: white; padding: 20px; border-radius: 8px; width: 100%; max-width: 500px; margin: 20px; } /* Детальная страница объявления */ .ad-detail { background: white; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); padding: 30px; max-width: 800px; margin: 0 auto; } .ad-card img { width: 100px; height: 100px; object-fit: cover; /* Сохраняет пропорции и обрезает изображение */ object-position: center; /* Центрирует изображение в контейнере */ border-radius: 4px; /* Опционально: добавляет скругление углов */ } .back-link { display: inline-flex; align-items: center; color: #3490dc; text-decoration: none; margin-bottom: 20px; } .back-link:hover { text-decoration: underline; } /* Утилиты */ .text-right { text-align: right; } .mb-20 { margin-bottom: 20px; } /* Дополнительные стили для my.blade.php */ .alert { background-color: #fff3cd; border-left: 4px solid #ffc107; color: #856404; padding: 20px; margin-bottom: 20px; border-radius: 4px; } .ad-status { margin-top: 10px; font-size: 14px; color: #718096; } .text-success { color: #38c172; } .text-danger { color: #e3342f; } .ad-info { margin-top: 15px; padding-top: 15px; border-top: 1px solid #edf2f7; } .image-container { width: 300px; height: 300px; overflow: hidden; /* Обрезает части изображения, выходящие за границы */ border-radius: 4px; /* Опционально */ } .image-container img { width: 100%; height: 100%; object-fit: cover; } .pagination { margin-top: 10px; display: flex; justify-content: center; gap: 5px; } .pagination > nav { display: flex; justify-content: center; } .pagination .flex-1 { display: none; } .pagination > nav > div:last-child { display: flex; gap: 5px; } .pagination .relative { padding: 8px 12px; border-radius: 4px; color: #3490dc; text-decoration: none; background: white; border: 1px solid #e2e8f0; } .pagination .relative:hover { background: #f8fafc; } .pagination .relative.cursor-default { color: #a0aec0; pointer-events: none; background: #f8fafc; } .pagination span[aria-current="page"] .relative { background: #3490dc; color: white; border-color: #3490dc; } .pagination svg { width: 16px; height: 16px; } .mt-4 { margin-top: 20px; } /* Стили для формы создания объявления */ .form-container { background: white; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); padding: 30px; max-width: 600px; margin: 0 auto; } .ad-form { margin-top: 20px; } textarea.form-control { min-height: 100px; resize: vertical; } .form-actions { margin-top: 30px; display: flex; gap: 10px; } .btn-secondary { background-color: #6c757d; color: white; } .btn-secondary:hover { background-color: #5a6268; } .is-invalid { border-color: #e3342f; } .invalid-feedback { color: #e3342f; font-size: 14px; margin-top: 5px; } /* Дополнительные стили для select */ select.form-control { appearance: none; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23333' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; } /* Стили при наведении для всех элементов формы */ .form-control:hover { border-color: #3490dc; } .form-control:focus { outline: none; border-color: #3490dc; box-shadow: 0 0 0 2px rgba(52,144,220,0.25); } /* Мобильная версия */ @media (max-width: 768px) { .ads-grid { grid-template-columns: 1fr; gap: 15px; padding: 10px; } .ad-title { font-size: 1.2rem; margin-bottom: 8px; } .ad-description { font-size: 0.9rem; line-height: 1.4; margin-bottom: 10px; } .image-container { width: 100%; height: 200px; margin: 0 auto 10px; } .btn { padding: 8px 16px; font-size: 0.9rem; } /* Специфические стили для формы админа */ form[action*="toggle-status"] { text-align: center; margin-top: 10px; } } /* Планшеты и маленькие экраны */ @media (min-width: 769px) and (max-width: 1024px) { .ads-grid { grid-template-columns: repeat(2, 1fr); } }