Skip to content

Commit

Permalink
caption showed in list
Browse files Browse the repository at this point in the history
  • Loading branch information
mi-prakash committed May 18, 2022
1 parent 4ca0094 commit 18a6823
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,24 @@
$layoutAttr['title'] = htmlspecialchars($images->image_intro_caption);
}
echo LayoutHelper::render('joomla.html.image', array_merge($layoutAttr, ['itemprop' => 'thumbnailUrl']));
// Image Caption
if (isset($images->image_fulltext_caption) && $images->image_fulltext_caption !== '')
{ ?>
<figcaption class="caption text-dark px-1"><?php echo $this->escape($images->image_fulltext_caption); ?></figcaption>
<?php
}
}
else
{
?>
<img <?php if ($images->image_intro_caption) : ?> <?php echo 'class="caption"' . ' title="' . htmlspecialchars($images->image_intro_caption) . '"'; ?> <?php endif; ?> src="<?php echo htmlspecialchars($images->image_intro, ENT_COMPAT, 'UTF-8'); ?>" alt="<?php echo htmlspecialchars($images->image_intro_alt, ENT_COMPAT, 'UTF-8'); ?>">
<?php
// Image Caption
if (isset($images->image_fulltext_caption) && $images->image_fulltext_caption !== '')
{ ?>
<figcaption class="caption"><?php echo $this->escape($images->image_fulltext_caption); ?></figcaption>
<?php
}
}
?>
</a>
Expand All @@ -119,12 +131,24 @@
$layoutAttr['title'] = htmlspecialchars($images->image_intro_caption, ENT_COMPAT, 'UTF-8');
}
echo LayoutHelper::render('joomla.html.image', array_merge($layoutAttr, ['itemprop' => 'thumbnailUrl']));
// Image Caption
if (isset($images->image_fulltext_caption) && $images->image_fulltext_caption !== '')
{ ?>
<figcaption class="caption text-dark px-1"><?php echo $this->escape($images->image_fulltext_caption); ?></figcaption>
<?php
}
}
else
{
?>
<img <?php if ($images->image_intro_caption) : ?> <?php echo 'class="caption"' . ' title="' . htmlspecialchars($images->image_intro_caption, ENT_COMPAT, 'UTF-8') . '"'; ?> <?php endif; ?> src="<?php echo htmlspecialchars($images->image_intro, ENT_COMPAT, 'UTF-8'); ?>" alt="<?php echo htmlspecialchars($images->image_intro_alt, ENT_COMPAT, 'UTF-8'); ?>">
<?php
// Image Caption
if (isset($images->image_fulltext_caption) && $images->image_fulltext_caption !== '')
{ ?>
<figcaption class="caption"><?php echo $this->escape($images->image_fulltext_caption); ?></figcaption>
<?php
}
}
?>
<?php endif; ?>
Expand Down
13 changes: 13 additions & 0 deletions templates/shaper_helixultimate/scss/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1135,6 +1135,13 @@ body.view-article.remove-container {
}
}
}

figcaption.caption {
text-align: center;
font-size: 14px;
margin: 5px 0px;
opacity: .7;
}
}
}

Expand Down Expand Up @@ -1251,6 +1258,12 @@ body.view-article.remove-container {
font-size: 14px;
}
}

figcaption.caption {
font-size: 14px;
margin: 5px 0px;
opacity: 0.7;
}
}
.related-article-list-container {
margin-top: 15px;
Expand Down

0 comments on commit 18a6823

Please sign in to comment.