commodore-yachting / components /social-proof.js
bobsmith1010's picture
```
0b1db27 verified
class SocialProof extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
:host {
display: block;
padding: 5rem 1rem;
background: linear-gradient(to bottom, #0F172A, #1E293B);
}
.container {
max-width: 1200px;
margin: 0 auto;
}
.section-header {
text-align: center;
margin-bottom: 3rem;
}
.section-title {
font-size: 2.5rem;
margin-bottom: 1rem;
color: #F8FAFC;
}
.section-subtitle {
color: #94A3B8;
max-width: 600px;
margin: 0 auto;
line-height: 1.6;
}
.reviews-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
}
.review-card {
background: rgba(30, 41, 59, 0.5);
border: 1px solid #1E293B;
border-radius: 10px;
padding: 1.5rem;
position: relative;
}
.review-card::before {
content: """;
position: absolute;
top: 10px;
left: 15px;
font-size: 5rem;
font-family: 'Cormorant Garamond', serif;
color: rgba(212, 175, 55, 0.2);
line-height: 1;
}
.review-content {
margin-top: 1.5rem;
color: #E2E8F0;
line-height: 1.6;
position: relative;
z-index: 1;
}
.review-author {
display: flex;
align-items: center;
gap: 1rem;
margin-top: 1.5rem;
}
.author-avatar {
width: 50px;
height: 50px;
border-radius: 50%;
object-fit: cover;
}
.author-info {
color: #94A3B8;
}
.author-name {
font-weight: 600;
color: #F8FAFC;
}
.rating {
display: flex;
gap: 0.25rem;
margin-top: 0.25rem;
}
.rating-star {
color: #D4AF37;
}
.video-testimonials {
margin-top: 4rem;
text-align: center;
}
.video-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
margin-top: 2rem;
}
.video-card {
position: relative;
border-radius: 10px;
overflow: hidden;
height: 200px;
}
.video-thumbnail {
width: 100%;
height: 100%;
object-fit: cover;
}
.play-button {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 60px;
height: 60px;
background: rgba(212, 175, 55, 0.8);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: #0F172A;
}
.video-title {
margin-top: 1rem;
color: #F8FAFC;
font-weight: 600;
}
</style>
<div class="container">
<div class="section-header">
<h2 class="section-title">What Our Students Say</h2>
<p class="section-subtitle">Join thousands of sailors who have mastered the sea with us</p>
</div>
<div class="reviews-container">
<div class="review-card">
<div class="rating">
<i data-feather="star" class="rating-star"></i>
<i data-feather="star" class="rating-star"></i>
<i data-feather="star" class="rating-star"></i>
<i data-feather="star" class="rating-star"></i>
<i data-feather="star" class="rating-star"></i>
</div>
<p class="review-content">
"The instructors were exceptional and made learning to sail both fun and challenging.
I went from never stepping on a boat to confidently skippering in just two weeks!"
</p>
<div class="review-author">
<img src="http://static.photos/people/320x240/1" alt="Sarah Johnson" class="author-avatar">
<div class="author-info">
<div class="author-name">Sarah Johnson</div>
<div>Day Skipper Graduate</div>
</div>
</div>
</div>
<div class="review-card">
<div class="rating">
<i data-feather="star" class="rating-star"></i>
<i data-feather="star" class="rating-star"></i>
<i data-feather="star" class="rating-star"></i>
<i data-feather="star" class="rating-star"></i>
<i data-feather="star" class="rating-star"></i>
</div>
<p class="review-content">
"Commodore Yachting provided everything I needed to become a Yachtmaster.
The attention to detail and safety protocols are second to none."
</p>
<div class="review-author">
<img src="http://static.photos/people/320x240/2" alt="Michael Chen" class="author-avatar">
<div class="author-info">
<div class="author-name">Michael Chen</div>
<div>Yachtmaster Coastal</div>
</div>
</div>
</div>
<div class="review-card">
<div class="rating">
<i data-feather="star" class="rating-star"></i>
<i data-feather="star" class="rating-star"></i>
<i data-feather="star" class="rating-star"></i>
<i data-feather="star" class="rating-star"></i>
<i data-feather="star" class="rating-star"></i>
</div>
<p class="review-content">
"The fleet is immaculate and the Solent provides perfect training conditions.
I've recommended Commodore Yachting to all my sailing friends."
</p>
<div class="review-author">
<img src="http://static.photos/people/320x240/3" alt="Emma Rodriguez" class="author-avatar">
<div class="author-info">
<div class="author-name">Emma Rodriguez</div>
<div>Coastal Skipper</div>
</div>
</div>
</div>
</div>
<div class="video-testimonials">
<h3 class="section-title">Student Stories</h3>
<div class="video-grid">
<div class="video-card">
<img src="http://static.photos/nature/320x240/4" alt="Student Story" class="video-thumbnail">
<div class="play-button">
<i data-feather="play"></i>
</div>
<div class="video-title">Learning to Sail at 50</div>
</div>
<div class="video-card">
<img src="http://static.photos/nature/320x240/5" alt="Student Story" class="video-thumbnail">
<div class="play-button">
<i data-feather="play"></i>
</div>
<div class="video-title">From Novice to Yachtmaster</div>
</div>
<div class="video-card">
<img src="http://static.photos/nature/320x240/6" alt="Student Story" class="video-thumbnail">
<div class="play-button">
<i data-feather="play"></i>
</div>
<div class="video-title">Family Sailing Adventure</div>
</div>
</div>
</div>
</div>
`;
// Initialize feather icons
import('https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js').then(() => {
feather.replace({ icons: this.shadowRoot.querySelectorAll('[data-feather]') });
});
}
}
customElements.define('social-proof', SocialProof);