Imaxes da publicacion.

This commit is contained in:
Laegnur 2022-11-06 12:54:16 +01:00
parent 13b03d8d28
commit 194c126003
3 changed files with 11 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

View file

@ -414,8 +414,14 @@ function renderArtigos($publicacion, $locale, $resumen = true)
$saida .= '</dl>' . "\n"; $saida .= '</dl>' . "\n";
$saida .= '</div>' . "\n"; $saida .= '</div>' . "\n";
$saida .= '</header>' . "\n"; $saida .= '</header>' . "\n";
if($resumen) if($resumen)
{ {
if($publicacion->imaxe)
{
$thumb = $publicacion->imaxe->size(466, 260);
$saida .= '<img src="' . $thumb->url . '" alt="' . $publicacion->imaxe->description . '">' . "\n";
}
$saida .= '<div class="resumo">' . "\n"; $saida .= '<div class="resumo">' . "\n";
$saida .= '<p>' . renderResumen(getTextoLimpo(getSeccions($publicacion->seccions))) . '</p>' . "\n"; $saida .= '<p>' . renderResumen(getTextoLimpo(getSeccions($publicacion->seccions))) . '</p>' . "\n";
$saida .= '<p><a href="' . $publicacion->url . '"><i class="icon-arrow-right"></i>' . _x("Read more", "Read more") . '</a></p>' ."\n"; $saida .= '<p><a href="' . $publicacion->url . '"><i class="icon-arrow-right"></i>' . _x("Read more", "Read more") . '</a></p>' ."\n";
@ -423,6 +429,11 @@ function renderArtigos($publicacion, $locale, $resumen = true)
} }
else else
{ {
if($publicacion->imaxe)
{
$thumb = $publicacion->imaxe->size(466, 260);
$saida .= '<a href="' . $publicacion->imaxe->url . '"><img src="' . $thumb->url . '" alt="' . $publicacion->imaxe->description . '"></a>' . "\n";
}
$saida .= '<div class="secciones">' . "\n"; $saida .= '<div class="secciones">' . "\n";
$saida .= getSeccions($publicacion->seccions) . "\n"; $saida .= getSeccions($publicacion->seccions) . "\n";
$saida .= '</div>' . "\n"; $saida .= '</div>' . "\n";