tempalte fix
This commit is contained in:
@@ -35,11 +35,11 @@
|
|||||||
/* === Header Styles === */
|
/* === Header Styles === */
|
||||||
.igny8-header {
|
.igny8-header {
|
||||||
background: var(--wp--preset--color--base, #ffffff);
|
background: var(--wp--preset--color--base, #ffffff);
|
||||||
border: 1px solid rgba(0, 0, 0, 0.08);
|
border: 2px solid rgba(0, 0, 0, 0.12);
|
||||||
border-radius: var(--igny8-border-radius);
|
border-radius: var(--igny8-border-radius);
|
||||||
padding: var(--igny8-spacing);
|
padding: var(--igny8-spacing);
|
||||||
margin-bottom: var(--igny8-spacing);
|
margin-bottom: var(--igny8-spacing);
|
||||||
box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.15);
|
||||||
}
|
}
|
||||||
|
|
||||||
.igny8-header-back {
|
.igny8-header-back {
|
||||||
@@ -163,9 +163,10 @@
|
|||||||
padding: 0.25rem 0.75rem;
|
padding: 0.25rem 0.75rem;
|
||||||
border-radius: var(--igny8-border-radius-xs);
|
border-radius: var(--igny8-border-radius-xs);
|
||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
background: rgba(0, 0, 0, 0.05);
|
background: rgba(0, 0, 0, 0.08);
|
||||||
color: inherit;
|
color: inherit;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.12);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* === SEO Section === */
|
/* === SEO Section === */
|
||||||
@@ -228,11 +229,11 @@
|
|||||||
/* === Featured Image === */
|
/* === Featured Image === */
|
||||||
.igny8-featured-image-block {
|
.igny8-featured-image-block {
|
||||||
background: var(--wp--preset--color--base, #ffffff);
|
background: var(--wp--preset--color--base, #ffffff);
|
||||||
border: 1px solid rgba(0, 0, 0, 0.08);
|
border: 2px solid rgba(0, 0, 0, 0.12);
|
||||||
border-radius: var(--igny8-border-radius);
|
border-radius: var(--igny8-border-radius);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin-bottom: var(--igny8-spacing);
|
margin-bottom: var(--igny8-spacing);
|
||||||
box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
.igny8-featured-header {
|
.igny8-featured-header {
|
||||||
@@ -291,10 +292,16 @@
|
|||||||
.igny8-content-section,
|
.igny8-content-section,
|
||||||
.igny8-content-fallback {
|
.igny8-content-fallback {
|
||||||
background: var(--wp--preset--color--base, #ffffff);
|
background: var(--wp--preset--color--base, #ffffff);
|
||||||
border: 1px solid rgba(0, 0, 0, 0.08);
|
border: 2px solid rgba(0, 0, 0, 0.12);
|
||||||
border-radius: var(--igny8-border-radius);
|
border-radius: var(--igny8-border-radius);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
|
||||||
|
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.igny8-content-section:hover {
|
||||||
|
transform: translateY(-2px);
|
||||||
|
box-shadow: 0 8px 30px -6px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.08);
|
||||||
}
|
}
|
||||||
|
|
||||||
.igny8-intro-section,
|
.igny8-intro-section,
|
||||||
@@ -304,12 +311,13 @@
|
|||||||
|
|
||||||
.igny8-section-label {
|
.igny8-section-label {
|
||||||
font-size: 0.7rem;
|
font-size: 0.7rem;
|
||||||
font-weight: 600;
|
font-weight: 700;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.2em;
|
letter-spacing: 0.2em;
|
||||||
opacity: 0.6;
|
opacity: 0.5;
|
||||||
margin-bottom: 1.5rem;
|
margin-bottom: 0.5rem;
|
||||||
display: block;
|
display: block;
|
||||||
|
color: rgba(59, 130, 246, 0.8);
|
||||||
}
|
}
|
||||||
|
|
||||||
.igny8-section-container {
|
.igny8-section-container {
|
||||||
@@ -327,14 +335,16 @@
|
|||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 2.5rem;
|
width: 3rem;
|
||||||
height: 2.5rem;
|
height: 3rem;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: rgba(59, 130, 246, 0.1);
|
background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(37, 99, 235, 0.9));
|
||||||
color: rgba(37, 99, 235, 1);
|
color: #ffffff;
|
||||||
font-weight: 600;
|
font-weight: 700;
|
||||||
font-size: 0.875rem;
|
font-size: 1.125rem;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
|
||||||
|
border: 2px solid rgba(255, 255, 255, 0.9);
|
||||||
}
|
}
|
||||||
|
|
||||||
.igny8-section-heading-wrapper {
|
.igny8-section-heading-wrapper {
|
||||||
@@ -474,11 +484,12 @@
|
|||||||
|
|
||||||
/* === In-Article Images === */
|
/* === In-Article Images === */
|
||||||
.igny8-image-figure {
|
.igny8-image-figure {
|
||||||
border: 1px solid rgba(0, 0, 0, 0.08);
|
border: 2px solid rgba(0, 0, 0, 0.12);
|
||||||
border-radius: var(--igny8-border-radius-md);
|
border-radius: var(--igny8-border-radius-md);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: rgba(0, 0, 0, 0.02);
|
background: var(--wp--preset--color--base, #ffffff);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.igny8-in-article-image {
|
.igny8-in-article-image {
|
||||||
@@ -549,8 +560,9 @@
|
|||||||
margin-top: 1.5rem;
|
margin-top: 1.5rem;
|
||||||
padding: 1.5rem;
|
padding: 1.5rem;
|
||||||
background: var(--wp--preset--color--base, #ffffff);
|
background: var(--wp--preset--color--base, #ffffff);
|
||||||
border: 1px solid rgba(0, 0, 0, 0.08);
|
border: 2px solid rgba(0, 0, 0, 0.12);
|
||||||
border-radius: var(--igny8-border-radius-xs);
|
border-radius: var(--igny8-border-radius-xs);
|
||||||
|
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
|
||||||
}
|
}
|
||||||
|
|
||||||
.igny8-metadata-table {
|
.igny8-metadata-table {
|
||||||
|
|||||||
@@ -41,8 +41,33 @@ if (!defined('ABSPATH')) {
|
|||||||
<?php
|
<?php
|
||||||
// Get image for this section (position = section index + 1)
|
// Get image for this section (position = section index + 1)
|
||||||
$section_position = $index + 1;
|
$section_position = $index + 1;
|
||||||
$has_image = isset($in_article_images[$section_position]);
|
|
||||||
$img_data = $has_image ? $in_article_images[$section_position] : null;
|
// Try multiple sources for in-article images
|
||||||
|
$img_data = null;
|
||||||
|
$img_url = null;
|
||||||
|
$img_prompt = '';
|
||||||
|
|
||||||
|
// Source 1: From $in_article_images array
|
||||||
|
if (isset($in_article_images[$section_position])) {
|
||||||
|
$img_data = $in_article_images[$section_position];
|
||||||
|
if (isset($img_data['attachment_id'])) {
|
||||||
|
$img_url = wp_get_attachment_image_url($img_data['attachment_id'], 'large');
|
||||||
|
$img_prompt = isset($img_data['prompt']) ? $img_data['prompt'] : '';
|
||||||
|
} elseif (isset($img_data['url'])) {
|
||||||
|
$img_url = $img_data['url'];
|
||||||
|
$img_prompt = isset($img_data['prompt']) ? $img_data['prompt'] : '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Source 2: Check gallery images meta
|
||||||
|
if (!$img_url) {
|
||||||
|
$gallery = get_post_meta(get_the_ID(), '_igny8_gallery_images', true);
|
||||||
|
if ($gallery && is_array($gallery) && isset($gallery[$index])) {
|
||||||
|
$img_url = wp_get_attachment_image_url($gallery[$index], 'large');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$has_image = !empty($img_url);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="igny8-section-content<?php echo $has_image ? ' igny8-has-image' : ''; ?>">
|
<div class="igny8-section-content<?php echo $has_image ? ' igny8-has-image' : ''; ?>">
|
||||||
@@ -52,13 +77,11 @@ if (!defined('ABSPATH')) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if ($has_image && isset($img_data['attachment_id'])):
|
<?php if ($has_image):
|
||||||
$img_id = $img_data['attachment_id'];
|
$img_alt = '';
|
||||||
$img_url = wp_get_attachment_image_url($img_id, 'large');
|
if (isset($img_data['attachment_id'])) {
|
||||||
$img_alt = get_post_meta($img_id, '_wp_attachment_image_alt', true);
|
$img_alt = get_post_meta($img_data['attachment_id'], '_wp_attachment_image_alt', true);
|
||||||
$img_prompt = isset($img_data['prompt']) ? $img_data['prompt'] : '';
|
}
|
||||||
|
|
||||||
if ($img_url):
|
|
||||||
?>
|
?>
|
||||||
<div class="igny8-section-image">
|
<div class="igny8-section-image">
|
||||||
<figure class="igny8-image-figure">
|
<figure class="igny8-image-figure">
|
||||||
@@ -74,7 +97,7 @@ if (!defined('ABSPATH')) {
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</figure>
|
</figure>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user