правка верстки в профиле

This commit is contained in:
107 2025-05-23 13:52:20 +07:00
parent c884b65208
commit 8f1d47f9bd

View File

@ -214,9 +214,9 @@
</div>
</div>
</div> <!-- Photos Section -->
<div class="info-card" id="photos-section">
<div class="card-header">
<h3><i class="bi-images"></i> Мои фотографии</h3> <div class="header-actions">
<div class="info-card" id="photos-section"> <div class="card-header">
<h3><i class="bi-images"></i> Мои фотографии</h3>
<div class="header-actions">
<button class="add-photo-btn" @click="triggerPhotoUpload" :disabled="photoActionLoading">
<span v-if="photoActionLoading" class="spinner-small"></span>
<i v-else class="bi-plus"></i>
@ -232,8 +232,8 @@
:key="photo.public_id || photo._id"
class="photo-item"
:class="{ 'main-photo': photo.isProfilePhoto }"
>
<img :src="photo.url" :alt="'Фото ' + profileData.name" class="photo-image"> <div v-if="photo.isProfilePhoto" class="main-badge">
> <img :src="photo.url" :alt="'Фото ' + profileData.name" class="photo-image">
<div v-if="photo.isProfilePhoto" class="main-badge">
<i class="bi-star-fill"></i>
Главное
</div>
@ -1378,400 +1378,276 @@ onMounted(async () => {
.card-header h3 {
margin-bottom: 0 !important;
}
/* Loading State */
.loading-section {
/* Фото сетка */
.photo-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
gap: 1rem;
}
.photo-item {
position: relative;
border-radius: 12px;
overflow: hidden;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
aspect-ratio: 1 / 1;
}
.photo-item.main-photo {
box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
transform: scale(1.05);
z-index: 2;
}
.photo-image {
width: 100%;
height: 100%;
object-fit: cover;
}
.main-badge {
position: absolute;
top: 10px;
left: 10px;
background: rgba(102, 126, 234, 0.9);
color: white;
padding: 0.25rem 0.5rem;
border-radius: 4px;
font-size: 0.7rem;
font-weight: 700;
display: flex;
justify-content: center;
align-items: center;
min-height: 400px;
gap: 0.25rem;
}
.photo-actions {
position: absolute;
bottom: 10px;
right: 10px;
display: flex;
gap: 0.5rem;
}
.empty-photos {
text-align: center;
padding: 3rem 0;
}
.empty-photos i {
font-size: 3rem;
color: #dee2e6;
margin-bottom: 1rem;
}
.empty-photos h4 {
margin: 0 0 0.5rem;
color: #495057;
}
.empty-photos p {
color: #6c757d;
margin-bottom: 1.5rem;
}
/* Стили кнопок действий */
.action-btn {
padding: 0.5rem 1rem;
border-radius: 50px;
border: none;
cursor: pointer;
font-weight: 600;
display: inline-flex;
align-items: center;
gap: 0.5rem;
transition: all 0.3s ease;
}
.action-btn.primary {
background: linear-gradient(45deg, #667eea, #764ba2);
color: white;
}
.loading-spinner {
text-align: center;
.action-btn.danger {
background: linear-gradient(45deg, #f5365c, #f56036);
color: white;
}
.spinner {
width: 50px;
height: 50px;
border: 4px solid rgba(255, 255, 255, 0.3);
border-left: 4px solid white;
border-radius: 50%;
animation: spin 1s linear infinite;
margin: 0 auto 1rem;
.action-btn.small {
padding: 0.3rem 0.6rem;
font-size: 0.8rem;
}
.spinner-small {
width: 16px;
height: 16px;
border: 2px solid rgba(255, 255, 255, 0.3);
border-left: 2px solid white;
border-radius: 50%;
animation: spin 0.8s linear infinite;
display: inline-block;
.action-btn:hover {
transform: translateY(-2px);
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
.action-btn:disabled {
opacity: 0.7;
cursor: not-allowed;
transform: none !important;
}
/* Error Section */
.error-section {
padding: 4rem 0;
}
.error-card {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border-radius: 20px;
padding: 3rem;
text-align: center;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.error-card i {
font-size: 3rem;
color: #dc3545;
margin-bottom: 1rem;
}
.error-card h3 {
color: #495057;
margin-bottom: 1rem;
}
.retry-btn {
.add-photo-btn {
padding: 0.5rem 1rem;
background: linear-gradient(45deg, #667eea, #764ba2);
color: white;
border: none;
padding: 0.75rem 2rem;
border-radius: 50px;
font-weight: 600;
cursor: pointer;
display: inline-flex;
align-items: center;
gap: 0.5rem;
transition: all 0.3s ease;
}
.retry-btn:hover {
.add-photo-btn:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}
}
/* Main Content */
.main-content {
padding: 2rem 0 4rem;
/* Медиа-запросы для адаптивности */
@media (max-width: 1024px) {
.profile-layout {
grid-template-columns: 300px 1fr;
gap: 1.5rem;
}
}
.profile-layout {
display: grid;
grid-template-columns: 350px 1fr;
gap: 2rem;
align-items: start;
@media (max-width: 768px) {
.profile-layout {
grid-template-columns: 1fr;
}
.profile-card {
position: static;
}
.info-grid {
grid-template-columns: 1fr;
}
.card-content {
padding: 1.5rem;
}
.card-header {
padding: 1.2rem 1.5rem;
}
}
/* Profile Card */
.profile-card {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border-radius: 20px;
padding: 2rem;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
position: sticky;
top: 2rem;
@media (max-width: 480px) {
.header-content {
flex-direction: column;
gap: 1rem;
}
.avatar-section {
flex-direction: column;
align-items: center;
}
.photo-grid {
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}
.main-content {
padding: 1rem 0 2rem;
}
}
.avatar-section {
text-align: center;
margin-bottom: 2rem;
}
.avatar-container {
position: relative;
display: inline-block;
margin-bottom: 1rem;
}
.avatar-image {
width: 120px;
height: 120px;
border-radius: 50%;
object-fit: cover;
border: 4px solid white;
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
.avatar-placeholder {
width: 120px;
height: 120px;
border-radius: 50%;
background: linear-gradient(45deg, #e9ecef, #f8f9fa);
display: flex;
align-items: center;
justify-content: center;
border: 4px solid white;
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
.avatar-placeholder i {
font-size: 3rem;
color: #6c757d;
}
.avatar-overlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.7);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
opacity: 1;
transition: opacity 0.3s ease;
z-index: 5;
}
.avatar-container:hover .avatar-overlay {
opacity: 1;
}
.change-avatar-btn {
background: none;
border: none;
color: white;
font-size: 1.5rem;
cursor: pointer;
}
.user-name {
font-size: 1.5rem;
font-weight: 700;
color: #2c3e50;
margin: 0 0 0.5rem 0;
}
.user-email {
color: #6c757d;
margin: 0 0 1rem 0;
}
.user-badges {
display: flex;
gap: 0.5rem;
justify-content: center;
flex-wrap: wrap;
}
.badge {
padding: 0.25rem 0.75rem;
/* Стили кнопок действий */
.action-btn {
padding: 0.5rem 1rem;
border-radius: 50px;
font-size: 0.75rem;
border: none;
cursor: pointer;
font-weight: 600;
display: inline-flex;
align-items: center;
gap: 0.5rem;
transition: all 0.3s ease;
}
.badge.verified {
background: linear-gradient(45deg, #28a745, #20c997);
.action-btn.primary {
background: linear-gradient(45deg, #667eea, #764ba2);
color: white;
}
.badge.member-since {
background: #e9ecef;
color: #495057;
.action-btn.danger {
background: linear-gradient(45deg, #f5365c, #f56036);
color: white;
}
/* Stats Section */
.stats-section {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1rem;
margin-top: 2rem;
padding-top: 2rem;
border-top: 1px solid #e9ecef;
}
.stat-item {
text-align: center;
}
.stat-value {
display: block;
font-size: 1.5rem;
font-weight: 700;
color: #667eea;
}
.stat-label {
.action-btn.small {
padding: 0.3rem 0.6rem;
font-size: 0.8rem;
color: #6c757d;
text-transform: uppercase;
letter-spacing: 0.5px;
}
/* Details Section */
.details-section {
display: flex;
flex-direction: column;
gap: 2rem;
.action-btn:hover {
transform: translateY(-2px);
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.info-card {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border-radius: 20px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
overflow: hidden;
}
.card-header {
padding: 1.5rem 2rem;
background: linear-gradient(45deg, #f8f9fa, #e9ecef);
border-bottom: 1px solid #dee2e6;
display: flex;
justify-content: space-between;
align-items: center;
}
.card-header h3 {
margin: 0;
color: #495057;
margin-bottom: 1rem;
font-size: 1.2rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
.card-content {
padding: 2rem;
}
.info-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1.5rem;
}
.info-item {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.info-item.full-width {
grid-column: 1 / -1;
}
.info-item label {
font-weight: 600;
color: #495057;
font-size: 0.9rem;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.info-item span {
color: #6c757d;
font-size: 1rem;
}
.bio-text {
font-style: italic;
line-height: 1.6;
}
/* Стили формы */
.form-input {
width: 100%;
padding: 0.75rem 1rem;
border-radius: 8px;
border: 1px solid #dee2e6;
background: #f8f9fa;
font-size: 0.95rem;
transition: all 0.3s ease;
color: #495057;
}
.form-input:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
background: white;
}
.form-input:disabled {
.action-btn:disabled {
opacity: 0.7;
cursor: not-allowed;
background: #e9ecef;
transform: none !important;
}
.form-textarea {
min-height: 100px;
resize: vertical;
line-height: 1.5;
}
.form-select {
appearance: none;
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
background-repeat: no-repeat;
background-position: right 0.75rem center;
background-size: 16px 12px;
}
/* Стили для выпадающего списка городов */
.city-input-wrapper {
position: relative;
width: 100%;
}
.city-dropdown {
position: absolute;
top: 100%;
left: 0;
right: 0;
max-height: 250px;
overflow-y: auto;
background: white;
border: 1px solid #dee2e6;
border-radius: 8px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
z-index: 100;
}
.city-option {
padding: 0.75rem 1rem;
cursor: pointer;
color: #495057;
transition: all 0.2s ease;
}
.city-option:hover {
background: rgba(102, 126, 234, 0.1);
color: #667eea;
}
.city-clear-btn {
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
background: none;
.add-photo-btn {
padding: 0.5rem 1rem;
background: linear-gradient(45deg, #667eea, #764ba2);
color: white;
border: none;
color: #6c757d;
border-radius: 50px;
font-weight: 600;
cursor: pointer;
padding: 5px;
display: inline-flex;
align-items: center;
gap: 0.5rem;
transition: all 0.3s ease;
}
.add-photo-btn:hover {
transform: translateY(-2px);
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}
/* Стили для предупреждений и сообщений */
.alert {
padding: 1rem;
border-radius: 8px;
margin-bottom: 1.5rem;
font-weight: 500;
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
}
.city-clear-btn:hover {
.alert.error {
background-color: rgba(220, 53, 69, 0.1);
color: #dc3545;
border-left: 4px solid #dc3545;
}
.card-header h3 {
margin-bottom: 0 !important;
.alert.success {
background-color: rgba(40, 167, 69, 0.1);
color: #28a745;
border-left: 4px solid #28a745;
}
.alert.info {
background-color: rgba(102, 126, 234, 0.1);
color: #667eea;
border-left: 4px solid #667eea;
}
.header-actions {
display: flex;
gap: 0.5rem;
align-items: center;
}
</style>