Spaces:
Running
Running
File size: 5,760 Bytes
0b1db27 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
class BlogSection extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
:host {
display: block;
padding: 5rem 1rem;
background: #0F172A;
}
.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;
}
.blog-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
}
.blog-card {
background: rgba(30, 41, 59, 0.5);
border: 1px solid #1E293B;
border-radius: 10px;
overflow: hidden;
transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.blog-card:hover {
transform: translateY(-10px);
box-shadow: 0 20px 25px -5px rgba(212, 175, 55, 0.2), 0 10px 10px -5px rgba(212, 175, 55, 0.1);
border-color: #D4AF37;
}
.blog-image {
width: 100%;
height: 200px;
object-fit: cover;
}
.blog-content {
padding: 1.5rem;
}
.blog-category {
color: #D4AF37;
font-weight: 600;
font-size: 0.875rem;
text-transform: uppercase;
margin-bottom: 0.5rem;
}
.blog-title {
font-size: 1.25rem;
margin-bottom: 0.75rem;
color: #F8FAFC;
}
.blog-excerpt {
color: #94A3B8;
margin-bottom: 1rem;
line-height: 1.6;
}
.blog-meta {
display: flex;
justify-content: space-between;
color: #64748B;
font-size: 0.875rem;
}
.blog-link {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: #D4AF37;
text-decoration: none;
font-weight: 500;
margin-top: 1rem;
}
.blog-link:hover {
text-decoration: underline;
}
</style>
<div class="container">
<div class="section-header">
<h2 class="section-title">Sailing Insights & Tips</h2>
<p class="section-subtitle">Learn from our experts and enhance your sailing knowledge</p>
</div>
<div class="blog-grid">
<div class="blog-card">
<img src="http://static.photos/nature/320x240/10" alt="Navigating the Solent" class="blog-image">
<div class="blog-content">
<div class="blog-category">Navigation</div>
<h3 class="blog-title">Mastering Solent Tides: A Sailor's Guide</h3>
<p class="blog-excerpt">
Understanding the complex tidal patterns of the Solent is crucial for safe sailing.
Our expert tips will help you navigate like a pro.
</p>
<div class="blog-meta">
<span>June 15, 2026</span>
<span>5 min read</span>
</div>
<a href="#" class="blog-link">
<span>Read More</span>
<i data-feather="arrow-right"></i>
</a>
</div>
</div>
<div class="blog-card">
<img src="http://static.photos/nature/320x240/11" alt="Weather Planning" class="blog-image">
<div class="blog-content">
<div class="blog-category">Safety</div>
<h3 class="blog-title">Weather Planning for Coastal Sailing</h3>
<p class="blog-excerpt">
Learn how to interpret weather forecasts and make informed decisions
about when to sail and when to stay ashore.
</p>
<div class="blog-meta">
<span>June 10, 2026</span>
<span>7 min read</span>
</div>
<a href="#" class="blog-link">
<span>Read More</span>
<i data-feather="arrow-right"></i>
</a>
</div>
</div>
<div class="blog-card">
<img src="http://static.photos/nature/320x240/12" alt="Boat Maintenance" class="blog-image">
<div class="blog-content">
<div class="blog-category">Maintenance</div>
<h3 class="blog-title">Essential Boat Maintenance Checklist</h3>
<p class="blog-excerpt">
Keep your yacht in perfect condition with our comprehensive maintenance
guide covering engines, sails, and safety equipment.
</p>
<div class="blog-meta">
<span>June 5, 2026</span>
<span>6 min read</span>
</div>
<a href="#" class="blog-link">
<span>Read More</span>
<i data-feather="arrow-right"></i>
</a>
</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('blog-section', BlogSection); |