-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpost.html
More file actions
211 lines (190 loc) · 9.38 KB
/
Copy pathpost.html
File metadata and controls
211 lines (190 loc) · 9.38 KB
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Artículo - ELECCON Ingeniería</title>
<link rel="icon" type="image/png" href="assets/logo.svg">
<meta name="description" content="Artículo del blog de ELECCON Ingeniería.">
<!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Rajdhani:wght@600;700&display=block"
rel="stylesheet">
<link rel="stylesheet" href="styles.css">
<style>
.single-post-container {
max-width: 800px;
margin: 0 auto;
padding: 40px 20px;
background: white;
border-radius: 20px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
margin-top: -60px;
position: relative;
z-index: 10;
}
.single-post-image {
width: 100%;
height: 400px;
object-fit: cover;
border-radius: 15px;
margin-bottom: 30px;
}
.single-post-title {
font-family: var(--font-heading);
font-size: 2.5rem;
color: var(--primary-color);
margin-bottom: 15px;
line-height: 1.2;
}
.single-post-meta {
color: #888;
font-size: 0.95rem;
margin-bottom: 30px;
padding-bottom: 15px;
border-bottom: 1px solid #eee;
}
.single-post-content {
font-size: 1.1rem;
line-height: 1.8;
color: #444;
white-space: pre-wrap;
}
.back-to-blog {
display: inline-flex;
align-items: center;
gap: 10px;
color: var(--secondary-color);
text-decoration: none;
font-weight: 600;
margin-bottom: 20px;
transition: color 0.3s ease;
}
.back-to-blog:hover {
color: var(--accent-color);
}
</style>
</head>
<body>
<header id="main-header">
<div class="container">
<div class="logo-container">
<a href="index.html" style="display: block; line-height: 0;">
<img src="assets/logo.svg" alt="ELECCON Logo" class="logo-img">
</a>
<h1 class="brand-name"><div class="brand-text-wrapper"><span class="brand-eleccon">ELECCON </span><span class="brand-ingenieria">Ingeniería</span></div></h1>
</div>
<button class="mobile-menu-btn" aria-label="Abrir menú">
<span></span>
<span></span>
<span></span>
</button>
<nav>
<ul>
<li><a href="index.html#hero">Inicio</a></li>
<li><a href="servicios.html">Servicios</a></li>
<li><a href="nosotros.html">Nosotros</a></li>
<!-- <li><a href="blog.html" class="active">Blog</a></li> -->
<li><a href="contacto.html">Contacto</a></li>
</ul>
</nav>
</div>
</header>
<main>
<section id="blog-header" style="padding-bottom: 100px;">
<div class="container">
<!-- Title is handled inside the post container to look better -->
</div>
</section>
<section style="background: #f4f7f6; padding-bottom: 100px; padding-top: 0;">
<div class="container" id="post-content-container">
<div class="single-post-container">
<div style="text-align: center; padding: 50px;">
<p>Cargando artículo...</p>
</div>
</div>
</div>
</section>
</main>
<footer>
<div class="container">
<div class="footer-info">
<div class="footer-item">
<h4 style="display: flex; align-items: center; justify-content: center; gap: 8px;"><svg style="width: 18px; height: 18px;" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg> Enlaces de Interés</h4>
<ul style="list-style: none; padding: 0; margin: 0; line-height: 1.8;">
<li><a href="de-interes.html">Documentos de Interés</a></li>
<li><a href="#">Políticas de Privacidad</a></li>
</ul>
</div>
<div class="footer-item">
<h4 style="display: flex; align-items: center; justify-content: center; gap: 8px;"><svg style="width: 18px; height: 18px;" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle></svg> Ubicación</h4>
<p>Upala, Upala, Alajuela, Costa Rica<br>Oficinas Centrales (próximamente)</p>
</div>
<div class="footer-item">
<h4 style="display: flex; align-items: center; justify-content: center; gap: 8px;"><svg style="width: 18px; height: 18px;" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg> Teléfono</h4>
<p><a href="tel:+50670593018">+506 7059-3018</a></p>
</div>
<div class="footer-item">
<h4 style="display: flex; align-items: center; justify-content: center; gap: 8px;"><svg style="width: 18px; height: 18px;" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline></svg> Correo</h4>
<p><a href="mailto:info@elecconingenieria.com">info@elecconingenieria.com</a></p>
</div>
</div>
<div class="footer-copyright">
<p>© 2026 ELECCON - Ingeniería. Todos los derechos reservados.</p>
</div>
</div>
</footer>
<script src="script.js"></script>
<script src="blog-data.js"></script>
<script>
document.addEventListener('DOMContentLoaded', () => {
const urlParams = new URLSearchParams(window.location.search);
const postId = parseInt(urlParams.get('id'));
const container = document.getElementById('post-content-container');
if (!postId || isNaN(postId)) {
container.innerHTML = `
<div class="single-post-container" style="text-align: center;">
<h2>Artículo no encontrado</h2>
<p>El artículo que buscas no existe o ha sido movido.</p>
<br>
<a href="blog.html" class="cta-button">Volver al Blog</a>
</div>
`;
return;
}
const post = blogPosts.find(p => p.id === postId);
if (post) {
document.title = post.title + ' - ELECCON Ingeniería';
container.innerHTML = `
<div class="single-post-container hidden-anim show-anim">
<a href="blog.html" class="back-to-blog">← Volver al Blog</a>
<img src="${post.image}" alt="${post.title}" class="single-post-image">
<h1 class="single-post-title">${post.title}</h1>
<div class="single-post-meta">
Publicado el ${new Date(post.date).toLocaleDateString('es-ES', { year: 'numeric', month: 'long', day: 'numeric' })} | Por <strong>${post.author}</strong>
</div>
<div class="single-post-content">${post.content}</div>
</div>
`;
} else {
container.innerHTML = `
<div class="single-post-container" style="text-align: center;">
<h2>Artículo no encontrado</h2>
<p>El artículo que buscas no existe o ha sido movido.</p>
<br>
<a href="blog.html" class="cta-button">Volver al Blog</a>
</div>
`;
}
});
</script>
<!-- Scroll to Top Button -->
<a href="#" class="scroll-top-btn" aria-label="Subir al inicio">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="18 15 12 9 6 15"></polyline>
</svg>
</a>
</body>
</html>