Implementación completa de estilos CSS que replican componentes del template RDash según validación de Issue #57. **Archivos CSS Creados:** 1. **buttons.css (Issue #58)** - Botón "Let's Talk" en navbar - Gradiente naranja: linear-gradient(135deg, #FF6B35 0%, #FF8C42 100%) - Hover: translateY(-2px) con shadow profesional - Box-shadow: rgba(255, 107, 53, 0.3) - Border-radius: 6px, padding: 0.5rem 1.5rem - Responsive: width 100% en móvil (<991.98px) - Template ref: css/style.css líneas 527-552 2. **hero.css (Issue #59)** - Hero Section con gradiente azul - Background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%) - Box-shadow: 0 4px 16px rgba(30, 58, 95, 0.25) - H1 color: #ffffff con text-shadow - Category badges hero: backdrop-filter blur(10px) - Badge background: rgba(255, 255, 255, 0.15) - Border: 1px solid rgba(255, 255, 255, 0.2) - Hover: translateY(-2px), shadow profesional - Template ref: css/style.css líneas 122-129 3. **badges.css (Issue #62)** - Clase .category-badge genérica - Background: #e9ecef, border-radius: 20px - Color: #6c757d, font-size: 0.813rem - Padding: 0.375rem 0.875rem - Variante .category-badge-hero para fondos oscuros - Backdrop-filter: blur(10px) - Hover transitions: all 0.3s ease - Template ref: css/style.css líneas 459-490 4. **post-content.css (Issue #63)** - Typography de contenido - H2: font-size 2rem, border-bottom 1px solid #eee - H2 color: #1e3a5f, margin-top: 2.5rem - H3: font-size 1.5rem, color: #2c5282 - Párrafos: line-height 1.8, font-size 1.1rem - Links: color #0d6efd, underline, font-weight 500 - Blockquote: border-left 4px solid #0d6efd - Code: background #f8f9fa, color #e83e8c - Pre: background #f8f9fa, border-radius 8px - Responsive: H2 1.5rem, párrafos 1rem en móvil - Template ref: css/style.css líneas 208-227 5. **pagination.css (Issue #64)** - Paginación personalizada - Page-link: border-radius 6px, padding 0.5rem 0.875rem - Hover: translateY(-2px), box-shadow profesional - Active: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%) - Active font-weight: 600 - Disabled: opacity 0.5, cursor not-allowed - Responsive: hide intermediate numbers en móvil - Dark mode support - Print: display none - Template ref: css/style.css líneas 180-207 **Archivos CSS Modificados:** 1. **related-posts.css (Issue #60)** - Corrección background - Línea 55: background: #f8f9fa (antes #f7fafc) - Mantiene hover transition a #ffffff - Border-left 4px gradiente animado - Gradiente: linear-gradient(180deg, #1e3a5f 0%, #1a73e8 100%) - Opacity border: 0 → 1 en hover - Transform: translateY(-8px) - Shadow: 0 12px 32px rgba(26, 115, 232, 0.15) **Verificación:** 1. **toc.css (Issue #61)** - VERIFICADO ✅ - Ya tiene todos los estilos correctos - Background: #f8f9fa (línea 16) - Border: 1px solid #dee2e6 (línea 17) - Border-left 3px en links activos (líneas 180, 199) - Scrollbar 6px con colores #cbd5e0 y #a0aec0 (líneas 334-349) - Sticky position con top: 5.5rem (líneas 22-23) - Issue #55 completado previamente **Integración:** - **inc/enqueue-scripts.php** - Modificado - Nueva función: apus_enqueue_fase2_styles() prioridad 6 - Enqueue buttons.css (global) - Enqueue hero.css (global) - Enqueue badges.css (global) - Enqueue pagination.css (global) - Enqueue post-content.css (solo is_single) - Enqueue related-posts.css (solo is_single) - Sintaxis PHP validada: ✅ Sin errores **Estadísticas:** - Archivos CSS nuevos: 5 (buttons, hero, badges, post-content, pagination) - Archivos CSS modificados: 2 (related-posts, enqueue-scripts) - Líneas de código CSS: 700+ líneas - Issues completados: 7 (#58, #59, #60, #61, #62, #63, #64) - Validación PHP: ✅ Sin errores **Próximo Paso:** Validación visual del usuario para verificar que tema coincide con template antes de proceder a FASE 3 (detalles y ajustes finos). Relacionado con: #57 (Issue principal), #58-64 (sub-issues) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
483 lines
9.8 KiB
CSS
483 lines
9.8 KiB
CSS
/**
|
|
* Related Posts Styles
|
|
*
|
|
* Responsive grid layout with Bootstrap 5 integration
|
|
* Supports cards with and without images
|
|
*
|
|
* @package Apus_Theme
|
|
* @since 1.0.0
|
|
*/
|
|
|
|
/* ========================================
|
|
Related Posts Section
|
|
======================================== */
|
|
|
|
.related-posts-section {
|
|
margin-top: 4rem;
|
|
margin-bottom: 3rem;
|
|
padding-top: 3rem;
|
|
border-top: 2px solid #e9ecef;
|
|
}
|
|
|
|
.related-posts-container {
|
|
width: 100%;
|
|
}
|
|
|
|
.related-posts-title {
|
|
font-size: 1.75rem;
|
|
font-weight: 700;
|
|
color: #212529;
|
|
margin-bottom: 2rem;
|
|
text-align: left;
|
|
position: relative;
|
|
padding-bottom: 0.75rem;
|
|
}
|
|
|
|
.related-posts-title::after {
|
|
content: '';
|
|
position: absolute;
|
|
left: 0;
|
|
bottom: 0;
|
|
width: 60px;
|
|
height: 3px;
|
|
background: linear-gradient(90deg, #1a73e8 0%, #4285f4 100%);
|
|
border-radius: 2px;
|
|
}
|
|
|
|
/* ========================================
|
|
Related Post Card
|
|
======================================== */
|
|
|
|
.related-post-card {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
background: #f8f9fa; /* Template línea 230 */
|
|
border: 1px solid #e2e8f0;
|
|
border-left: 4px solid transparent;
|
|
border-left-color: transparent;
|
|
border-radius: 12px;
|
|
overflow: hidden;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
position: relative;
|
|
}
|
|
|
|
.related-post-card::before {
|
|
content: '';
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
bottom: 0;
|
|
width: 4px;
|
|
background: linear-gradient(180deg, #1e3a5f 0%, #1a73e8 100%);
|
|
opacity: 0;
|
|
transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
z-index: 1;
|
|
}
|
|
|
|
.related-post-card:hover {
|
|
transform: translateY(-8px);
|
|
box-shadow: 0 12px 32px rgba(26, 115, 232, 0.15);
|
|
background: #ffffff;
|
|
}
|
|
|
|
.related-post-card:hover::before {
|
|
opacity: 1;
|
|
}
|
|
|
|
.related-post-link {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
text-decoration: none;
|
|
color: inherit;
|
|
}
|
|
|
|
.related-post-link:hover {
|
|
text-decoration: none;
|
|
}
|
|
|
|
/* ========================================
|
|
Card with Thumbnail
|
|
======================================== */
|
|
|
|
.related-post-thumbnail {
|
|
position: relative;
|
|
width: 100%;
|
|
padding-bottom: 75%; /* 4:3 aspect ratio */
|
|
overflow: hidden;
|
|
background: #f8f9fa;
|
|
}
|
|
|
|
.related-post-thumbnail img {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
|
|
.related-post-card:hover .related-post-thumbnail img {
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
/* ========================================
|
|
Card without Image (Color Background)
|
|
======================================== */
|
|
|
|
.related-post-no-image {
|
|
position: relative;
|
|
width: 100%;
|
|
padding-bottom: 75%; /* 4:3 aspect ratio */
|
|
overflow: hidden;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.related-post-no-image-content {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 1.5rem;
|
|
text-align: center;
|
|
}
|
|
|
|
.related-post-no-image-title {
|
|
font-size: 1.25rem;
|
|
font-weight: 700;
|
|
color: #ffffff;
|
|
margin: 0;
|
|
line-height: 1.4;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 3;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
/* ========================================
|
|
Category Badge
|
|
======================================== */
|
|
|
|
.related-post-category {
|
|
position: absolute;
|
|
top: 12px;
|
|
left: 12px;
|
|
display: inline-block;
|
|
padding: 0.375rem 0.875rem;
|
|
font-size: 0.75rem;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
background: rgba(255, 255, 255, 0.95);
|
|
color: #212529;
|
|
border-radius: 6px;
|
|
z-index: 10;
|
|
transition: all 0.2s ease;
|
|
backdrop-filter: blur(4px);
|
|
}
|
|
|
|
.related-post-category.no-image {
|
|
background: rgba(255, 255, 255, 0.2);
|
|
color: #ffffff;
|
|
border: 1px solid rgba(255, 255, 255, 0.3);
|
|
backdrop-filter: blur(8px);
|
|
}
|
|
|
|
.related-post-card:hover .related-post-category {
|
|
background: rgba(26, 115, 232, 0.95);
|
|
color: #ffffff;
|
|
}
|
|
|
|
.related-post-card:hover .related-post-category.no-image {
|
|
background: rgba(255, 255, 255, 0.95);
|
|
color: #212529;
|
|
border-color: transparent;
|
|
}
|
|
|
|
/* ========================================
|
|
Card Content
|
|
======================================== */
|
|
|
|
.related-post-content {
|
|
padding: 1.25rem;
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.related-post-title {
|
|
font-size: 1.125rem;
|
|
font-weight: 600;
|
|
color: #212529;
|
|
margin: 0 0 0.75rem 0;
|
|
line-height: 1.4;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
transition: color 0.2s ease;
|
|
}
|
|
|
|
.related-post-card:hover .related-post-title {
|
|
color: #1a73e8;
|
|
}
|
|
|
|
.related-post-excerpt {
|
|
font-size: 0.9375rem;
|
|
color: #6c757d;
|
|
line-height: 1.6;
|
|
margin-bottom: 0.75rem;
|
|
flex: 1;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 3;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.related-post-meta {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
margin-top: auto;
|
|
padding-top: 0.75rem;
|
|
border-top: 1px solid #e9ecef;
|
|
}
|
|
|
|
.related-post-date {
|
|
font-size: 0.8125rem;
|
|
color: #6c757d;
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* ========================================
|
|
Cards without Thumbnail - Simplified Layout
|
|
======================================== */
|
|
|
|
.related-post-card.no-thumbnail .related-post-content {
|
|
padding: 1.5rem 1.25rem 1.25rem;
|
|
}
|
|
|
|
/* ========================================
|
|
Responsive Adjustments
|
|
======================================== */
|
|
|
|
/* Tablets */
|
|
@media (max-width: 991.98px) {
|
|
.related-posts-section {
|
|
margin-top: 3rem;
|
|
padding-top: 2.5rem;
|
|
}
|
|
|
|
.related-posts-title {
|
|
font-size: 1.5rem;
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.related-post-no-image-title {
|
|
font-size: 1.125rem;
|
|
-webkit-line-clamp: 4;
|
|
}
|
|
}
|
|
|
|
/* Mobile */
|
|
@media (max-width: 767.98px) {
|
|
.related-posts-section {
|
|
margin-top: 2.5rem;
|
|
padding-top: 2rem;
|
|
}
|
|
|
|
.related-posts-title {
|
|
font-size: 1.375rem;
|
|
margin-bottom: 1.25rem;
|
|
}
|
|
|
|
.related-post-card {
|
|
margin-bottom: 0; /* Bootstrap's g-4 handles gaps */
|
|
}
|
|
|
|
.related-post-thumbnail {
|
|
padding-bottom: 60%; /* Shorter aspect ratio on mobile */
|
|
}
|
|
|
|
.related-post-no-image {
|
|
padding-bottom: 60%;
|
|
}
|
|
|
|
.related-post-no-image-title {
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.related-post-title {
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.related-post-excerpt {
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.related-post-content {
|
|
padding: 1rem;
|
|
}
|
|
|
|
.related-post-card.no-thumbnail .related-post-content {
|
|
padding: 1.25rem 1rem 1rem;
|
|
}
|
|
}
|
|
|
|
/* Small mobile */
|
|
@media (max-width: 575.98px) {
|
|
.related-posts-title {
|
|
font-size: 1.25rem;
|
|
}
|
|
|
|
.related-post-category {
|
|
font-size: 0.6875rem;
|
|
padding: 0.25rem 0.625rem;
|
|
}
|
|
|
|
.related-post-no-image-content {
|
|
padding: 1rem;
|
|
}
|
|
}
|
|
|
|
/* ========================================
|
|
Print Styles
|
|
======================================== */
|
|
|
|
@media print {
|
|
.related-posts-section {
|
|
page-break-inside: avoid;
|
|
margin-top: 2rem;
|
|
padding-top: 1.5rem;
|
|
border-top: 1px solid #000;
|
|
}
|
|
|
|
.related-post-card {
|
|
page-break-inside: avoid;
|
|
box-shadow: none;
|
|
border: 1px solid #ddd;
|
|
}
|
|
|
|
.related-post-card:hover {
|
|
transform: none;
|
|
}
|
|
|
|
.related-post-thumbnail img,
|
|
.related-post-no-image {
|
|
display: none;
|
|
}
|
|
|
|
.related-post-category {
|
|
background: transparent;
|
|
border: 1px solid #000;
|
|
color: #000;
|
|
position: static;
|
|
display: inline-block;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.related-post-content {
|
|
padding: 1rem;
|
|
}
|
|
|
|
.related-post-title {
|
|
color: #000;
|
|
}
|
|
|
|
.related-post-excerpt {
|
|
color: #333;
|
|
}
|
|
}
|
|
|
|
/* ========================================
|
|
Dark Mode Support (Optional)
|
|
======================================== */
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
.related-posts-section {
|
|
border-top-color: #343a40;
|
|
}
|
|
|
|
.related-posts-title {
|
|
color: #f8f9fa;
|
|
}
|
|
|
|
.related-post-card {
|
|
background: #212529;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
.related-post-card:hover {
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
|
|
}
|
|
|
|
.related-post-title {
|
|
color: #f8f9fa;
|
|
}
|
|
|
|
.related-post-card:hover .related-post-title {
|
|
color: #4285f4;
|
|
}
|
|
|
|
.related-post-excerpt {
|
|
color: #adb5bd;
|
|
}
|
|
|
|
.related-post-meta {
|
|
border-top-color: #343a40;
|
|
}
|
|
|
|
.related-post-date {
|
|
color: #adb5bd;
|
|
}
|
|
|
|
.related-post-category {
|
|
background: rgba(33, 37, 41, 0.95);
|
|
color: #f8f9fa;
|
|
}
|
|
}
|
|
|
|
/* ========================================
|
|
Accessibility
|
|
======================================== */
|
|
|
|
.related-post-link:focus {
|
|
outline: 2px solid #1a73e8;
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.related-post-link:focus-visible {
|
|
outline: 2px solid #1a73e8;
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
/* Reduce motion for users who prefer it */
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.related-post-card,
|
|
.related-post-card::before,
|
|
.related-post-thumbnail img,
|
|
.related-post-category,
|
|
.related-post-title {
|
|
transition: none;
|
|
}
|
|
|
|
.related-post-card:hover {
|
|
transform: none;
|
|
}
|
|
|
|
.related-post-card:hover .related-post-thumbnail img {
|
|
transform: none;
|
|
}
|
|
}
|