added personal trainner card

This commit is contained in:
ghassan committed 2026-02-03 02:26:54 +03:00
1 parent 22e8d5ed77
commit c08d9bf888
5 files changed
+533 -16

No files matched your search

+244 -14
View File
@@ -110,7 +110,7 @@
<div class="modal-content">
<div class="modal-header border-0">
<h5 class="modal-title" id="mapModalLabel">
<i class="bi bi-geo-alt-fill me-2 text-danger"></i>Set Your Location
<i class="bi bi-geo-alt-fill me-2 text-primary"></i>Set Your Location
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
@@ -133,6 +133,9 @@
</div>
@push('styles')
<!-- Font Awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<!-- Leaflet CSS -->
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"
integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY="
@@ -159,6 +162,7 @@
.club-card {
transition: all 0.3s ease-in-out;
min-height: 450px;
}
.club-card:hover {
@@ -171,7 +175,7 @@
}
.club-card:hover .club-title {
color: #dc3545 !important;
color: #667eea !important;
}
/* Pulsing animation for location marker */
@@ -215,6 +219,148 @@
border-color: #ced4da !important;
box-shadow: none !important;
}
/* Trainer Card Styles */
.trainer-card {
border: none;
border-radius: 0;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
transition: all 0.3s ease;
overflow: hidden;
background: white;
min-height: 400px;
}
.trainer-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}
.trainer-card .row {
height: 192px;
}
.image-container {
position: relative;
height: 100%;
overflow: hidden;
}
.pt-badge {
position: absolute;
top: 10px;
left: 10px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 5px 15px;
border-radius: 20px;
font-size: 0.8rem;
font-weight: bold;
z-index: 2;
}
.trainer-img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.3s ease;
}
.trainer-card:hover .trainer-img {
transform: scale(1.05);
}
.info-section {
padding: 15px;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
}
.trainer-name {
font-size: 1.2rem;
font-weight: bold;
color: #333;
margin-bottom: 5px;
}
.trainer-title {
font-size: 0.9rem;
color: #666;
margin-bottom: 10px;
}
.feature-list {
list-style: none;
padding: 0;
margin-bottom: 10px;
flex-grow: 1;
}
.feature-list li {
margin-bottom: 5px;
font-size: 0.8rem;
color: #555;
}
.feature-list i {
color: #28a745;
margin-right: 8px;
}
.rating-box {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
font-size: 0.8rem;
}
.stars {
color: #ffc107;
}
.stars i {
margin-right: 2px;
}
.trainer-buttons {
margin-top: auto;
}
.btn-book {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border: none;
color: white;
padding: 8px 15px;
border-radius: 20px;
font-weight: bold;
font-size: 0.8rem;
transition: all 0.3s ease;
}
.btn-book:hover {
background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
transform: translateY(-2px);
}
.btn-view {
background: transparent;
border: 2px solid #667eea;
color: #667eea;
padding: 8px 15px;
border-radius: 20px;
font-weight: bold;
font-size: 0.8rem;
transition: all 0.3s ease;
}
.btn-view:hover {
background: #667eea;
color: white;
transform: translateY(-2px);
}
</style>
@endpush
@@ -392,7 +538,7 @@ function initMap(lat, lng) {
draggable: true,
icon: L.divIcon({
className: 'user-location-marker',
html: '<i class="bi bi-geo-alt-fill pulse-marker" style="font-size: 36px; color: #dc3545; filter: drop-shadow(0 3px 6px rgba(0,0,0,0.4));"></i>',
html: '<i class="bi bi-geo-alt-fill pulse-marker" style="font-size: 36px; color: #667eea; filter: drop-shadow(0 3px 6px rgba(0,0,0,0.4));"></i>',
iconSize: [36, 36],
iconAnchor: [18, 36]
})
@@ -487,7 +633,91 @@ function displayClubs(clubs) {
container.innerHTML = '';
if (clubs.length === 0) {
let trainerAdded = false;
// Add dummy trainer card if category is 'all' or 'personal-trainers'
if (currentCategory === 'all' || currentCategory === 'personal-trainers') {
const trainerCard = document.createElement('div');
trainerCard.className = 'col';
trainerCard.innerHTML = `
<div class="card border shadow-sm overflow-hidden club-card" style="border-radius: 0; cursor: pointer; transition: all 0.3s ease;">
<!-- Cover Image -->
<div class="position-relative overflow-hidden" style="height: 192px;">
<img src="https://images.unsplash.com/photo-1583454110551-21f2fa2afe61?q=80&w=2070&auto=format&fit=crop"
alt="Personal Trainer"
loading="lazy"
class="w-100 h-100"
style="object-fit: cover; transition: transform 0.3s ease;">
<!-- Personal Trainer Badge -->
<div class="position-absolute" style="top: 8px; left: 8px;">
<span class="badge text-white px-3 py-1" style="background-color: #dc3545; border-radius: 9999px; font-size: 0.75rem; font-weight: 600;"><i class="fa-solid fa-user me-1"></i>Personal Trainer</span>
</div>
</div>
<!-- Card Body -->
<div class="p-4" style="background-color: white;">
<div class="mb-3">
<!-- Trainer Name -->
<h3 class="fw-semibold mb-2 club-title" style="font-size: 1.125rem; color: #1f2937; transition: color 0.3s ease;">Alex Thompson</h3>
<!-- Distance -->
<div class="d-flex align-items-center mb-1" style="font-size: 0.875rem; color: #667eea;">
<i class="fa fa-certificate me-1"></i>
<span class="fw-semibold">Certified Strength & Conditioning Coach</span>
</div>
<!-- Location -->
<div class="d-flex align-items-center text-muted" style="font-size: 0.875rem;">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="me-1 flex-shrink-0">
<path d="M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"></path>
<circle cx="12" cy="10" r="3"></circle>
</svg>
<span class="text-truncate">Ghassan Yusuf</span>
</div>
</div>
<div class="row g-2 text-center mb-3" style="font-size: 0.75rem;">
<div class="col-4">
<div class="p-2 rounded" style="background-color: rgba(102, 126, 234, 0.05);">
<i class="fa-solid fa-calendar mb-1" style="color: #6b7280; font-size: 1rem;"></i>
<p class="fw-semibold mb-0" style="color: #1f2937;">13</p>
<p class="text-muted mb-0">Years Exp.</p>
</div>
</div>
<div class="col-4">
<div class="p-2 rounded" style="background-color: rgba(102, 126, 234, 0.05);">
<i class="fa-solid fa-certificate mb-1" style="color: #6b7280; font-size: 1rem;"></i>
<p class="fw-semibold mb-0" style="color: #1f2937;">NASM</p>
<p class="text-muted mb-0">Packages</p>
</div>
</div>
<div class="col-4">
<div class="p-2 rounded" style="background-color: rgba(102, 126, 234, 0.05);">
<i class="fa-solid fa-star"></i>
<p class="fw-semibold mb-0" style="color: #1f2937;">5.0</p>
<p class="text-muted mb-0">Rating</p>
</div>
</div>
</div>
<!-- Action Buttons -->
<div class="d-flex gap-2">
<button class="btn btn-primary flex-fill fw-semibold" style="font-size: 0.875rem;">
<i class="fa-solid fa-calendar-plus me-1"></i>Book Session
</button>
<button class="btn btn-outline-primary flex-fill fw-semibold" style="font-size: 0.875rem;">
View Details
</button>
</div>
</div>
</div>
`;
container.appendChild(trainerCard);
trainerAdded = true;
}
if (clubs.length === 0 && !trainerAdded) {
noResultsContainer.style.display = 'flex';
return;
}
@@ -533,7 +763,7 @@ function displayClubs(clubs) {
<!-- Sports Club Badge - Top Left -->
<div class="position-absolute" style="top: 8px; left: 8px;">
<span class="badge text-white px-3 py-1" style="background-color: #dc3545; border-radius: 9999px; font-size: 0.75rem; font-weight: 600;">Sports Club</span>
<span class="badge text-white px-3 py-1" style="background-color: #dc3545; border-radius: 9999px; font-size: 0.75rem; font-weight: 600;"><i class="fa-solid fa-building me-1"></i>Sports Club</span>
</div>
</div>
@@ -544,7 +774,7 @@ function displayClubs(clubs) {
<h3 class="fw-semibold mb-2 club-title" style="font-size: 1.125rem; color: #1f2937; transition: color 0.3s ease;">${club.club_name}</h3>
<!-- Distance -->
<div class="d-flex align-items-center mb-1" style="font-size: 0.875rem; color: #dc3545;">
<div class="d-flex align-items-center mb-1" style="font-size: 0.875rem; color: #667eea;">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="me-1 flex-shrink-0">
<polygon points="3 11 22 2 13 21 11 13 3 11"></polygon>
</svg>
@@ -564,8 +794,8 @@ function displayClubs(clubs) {
<!-- Stats Grid -->
<div class="row g-2 text-center mb-3" style="font-size: 0.75rem;">
<div class="col-4">
<div class="p-2 rounded" style="background-color: rgba(220, 53, 69, 0.05);">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="mx-auto mb-1" style="color: #dc3545;">
<div class="p-2 rounded" style="background-color: rgba(102, 126, 234, 0.05);">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="mx-auto mb-1" style="color: #667eea;">
<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"></path>
<circle cx="9" cy="7" r="4"></circle>
<path d="M22 21v-2a4 4 0 0 0-3-3.87"></path>
@@ -576,8 +806,8 @@ function displayClubs(clubs) {
</div>
</div>
<div class="col-4">
<div class="p-2 rounded" style="background-color: rgba(220, 53, 69, 0.05);">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="mx-auto mb-1" style="color: #dc3545;">
<div class="p-2 rounded" style="background-color: rgba(102, 126, 234, 0.05);">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="mx-auto mb-1" style="color: #667eea;">
<path d="M14.4 14.4 9.6 9.6"></path>
<path d="M18.657 21.485a2 2 0 1 1-2.829-2.828l-1.767 1.768a2 2 0 1 1-2.829-2.829l6.364-6.364a2 2 0 1 1 2.829 2.829l-1.768 1.767a2 2 0 1 1 2.828 2.829z"></path>
<path d="m21.5 21.5-1.4-1.4"></path>
@@ -589,8 +819,8 @@ function displayClubs(clubs) {
</div>
</div>
<div class="col-4">
<div class="p-2 rounded" style="background-color: rgba(220, 53, 69, 0.05);">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="mx-auto mb-1" style="color: #dc3545;">
<div class="p-2 rounded" style="background-color: rgba(102, 126, 234, 0.05);">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="mx-auto mb-1" style="color: #667eea;">
<path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"></path>
</svg>
<p class="fw-semibold mb-0" style="color: #1f2937;">0</p>
@@ -601,7 +831,7 @@ function displayClubs(clubs) {
<!-- Action Buttons -->
<div class="d-flex gap-2">
<button class="btn btn-danger flex-fill fw-semibold" style="font-size: 0.875rem;">
<button class="btn btn-primary flex-fill fw-semibold" style="font-size: 0.875rem;">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="me-1">
<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"></path>
<circle cx="9" cy="7" r="4"></circle>
@@ -610,7 +840,7 @@ function displayClubs(clubs) {
</svg>
Join Club
</button>
<button class="btn btn-outline-danger flex-fill fw-semibold" style="font-size: 0.875rem;">View Details</button>
<button class="btn btn-outline-primary flex-fill fw-semibold" style="font-size: 0.875rem;">View Details</button>
</div>
</div>
</div>