Correccions de estilos finais.

This commit is contained in:
Laegnur 2023-03-11 11:41:24 +01:00
parent f1f6b88a84
commit 03414732d1
2 changed files with 13 additions and 24 deletions

View file

@ -84,7 +84,7 @@ function getSeccions($seccions)
$saida .= renderOpinions($seccion); $saida .= renderOpinions($seccion);
break; break;
case 'texto': case 'texto':
$saida .= renderTexto($seccion); $saida .= renderTexto($seccion, true);
break; break;
case 'galeria': case 'galeria':
$saida .= renderGaleria($seccion); $saida .= renderGaleria($seccion);
@ -257,7 +257,7 @@ function renderGaleria($seccion)
{ {
$saida = ''; $saida = '';
$saida .= '<section id="galeria" class="swiper d-none d-md-block">' . "\n"; $saida .= '<section id="galeria" class="swiper d-none d-md-block mb-5">' . "\n";
$saida .= '<h3 class="visually-hidden">' . (($seccion->titular) ? $seccion->titular : 'Galeria') . '</h3>' . "\n"; $saida .= '<h3 class="visually-hidden">' . (($seccion->titular) ? $seccion->titular : 'Galeria') . '</h3>' . "\n";
$saida .= '<div class="swiper-wrapper">' . "\n"; $saida .= '<div class="swiper-wrapper">' . "\n";
foreach($seccion->imaxes as $imaxe) foreach($seccion->imaxes as $imaxe)
@ -359,27 +359,16 @@ function renderImaxeTexto($seccion)
$saida .= $botons . "\n"; $saida .= $botons . "\n";
break; break;
case 'esquerda': case 'esquerda':
$saida .= '<section class="container mb-5">' . "\n";
$saida .= '<div class="row align-items-center">' . "\n";
$saida .= '<div class="col col-lg-6 text-center">' . "\n";
$saida .= $imaxe . "\n";
$saida .= '</div>' . "\n";
$saida .= '<div class="col col-lg-6 text-center">' . "\n";
$saida .= $texto . "\n";
$saida .= $botons . "\n";
$saida .= '</div>' . "\n";
$saida .= '</div>' . "\n";
break;
case 'dereita': case 'dereita':
$saida .= '<section class="container mb-5">' . "\n"; $saida .= '<section class="container mb-5">' . "\n";
$saida .= '<div class="row align-items-center">' . "\n"; $saida .= '<div class="row row-cols-1 row-cols-md-2 align-items-center">' . "\n";
$saida .= '<div class="col col-lg-6 text-center">' . "\n"; $saida .= '<div class="col col-lg-6 ' . (($seccion->imaxe_posicion->value == 'esquerda') ? 'order-md-first ' : 'order-md-last ') . 'text-center">' . "\n";
$saida .= $imaxe . "\n";
$saida .= '</div>' . "\n";
$saida .= '<div class="col col-lg-6 ' . (($seccion->imaxe_posicion->value == 'esquerda') ? 'order-md-last ' : 'order-md-first ') . 'text-center">' . "\n";
$saida .= $texto . "\n"; $saida .= $texto . "\n";
$saida .= $botons . "\n"; $saida .= $botons . "\n";
$saida .= '</div>' . "\n"; $saida .= '</div>' . "\n";
$saida .= '<div class="col col-lg-6 text-center">' . "\n";
$saida .= $imaxe . "\n";
$saida .= '</div>' . "\n";
$saida .= '</div>' . "\n"; $saida .= '</div>' . "\n";
break; break;
} }
@ -410,17 +399,17 @@ function renderImaxe($seccion)
* @return string * @return string
*/ */
function renderTexto($seccion) function renderTexto($seccion, $centrado = false)
{ {
$saida = ''; $saida = '';
if($seccion->titular) if($seccion->titular)
{ {
$saida .= '<div>' . "\n"; $saida .= '<div class="row text-start ' . (($centrado) ? 'text-md-center' : '') . '">' . "\n";
$saida .= '<h3 class="fw-semibold">' . $seccion->titular . '</h3>' . "\n"; $saida .= '<h3 class="fw-semibold">' . $seccion->titular . '</h3>' . "\n";
$saida .= '</div>' . "\n"; $saida .= '</div>' . "\n";
} }
$saida .= '<div class="row text-start mb-5">' . "\n"; $saida .= '<div class="row text-start ' . (($centrado) ? 'text-md-center ' : '') . 'mb-5">' . "\n";
$saida .= $seccion->artigo . "\n"; $saida .= $seccion->artigo . "\n";
$saida .= '</div>' . "\n"; $saida .= '</div>' . "\n";
@ -530,7 +519,7 @@ function renderElemento($seccion, $posicion = 0)
$saida .= ''; $saida .= '';
break; break;
} }
$saida .= '<div class="row mb-5">' . "\n"; $saida .= '<div class="row mb-lg-5">' . "\n";
$saida .= '<div class="col mx-auto text-start">' . "\n"; $saida .= '<div class="col mx-auto text-start">' . "\n";
$saida .= renderTexto($seccion); $saida .= renderTexto($seccion);
if($seccion->botons && $seccion->botons->isEmpty()) if($seccion->botons && $seccion->botons->isEmpty())

View file

@ -10,8 +10,8 @@
<span class="mb-3 mb-md-0 text-light">&copy; 2022 <?php echo $configuracion['sitio_nome'] . ' ' . $configuracion['sitio_descripcion']; ?>.<br>Todos los derechos reservados.</span> <span class="mb-3 mb-md-0 text-light">&copy; 2022 <?php echo $configuracion['sitio_nome'] . ' ' . $configuracion['sitio_descripcion']; ?>.<br>Todos los derechos reservados.</span>
</div> </div>
<ul class="nav col-md-2 justify-content-center list-unstyled d-flex fs-4"> <ul class="nav col-md-2 justify-content-center list-unstyled d-flex fs-4">
<li class="p-3"><a class="text-light text-decoration-none" href="#"><i class="icon-facebook"></i></a></li> <li class="p-3"><a class="text-light text-decoration-none" target="_blank" href="<?php echo $configuracion['rrss_facebook']; ?>"><i class="icon-facebook"></i></a></li>
<li class="p-3"><a class="text-light text-decoration-none" href="#"><i class="icon-instagram"></i></a></li> <li class="p-3"><a class="text-light text-decoration-none" target="_blank" href="<?php echo $configuracion['rrss_instagram']; ?>"><i class="icon-instagram"></i></a></li>
</ul> </ul>
<a href="https://galp.xunta.gal/costa-da-morte" class="col-md-5 d-flex gap-3 align-items-center justify-content-center mb-3 mb-md-0 me-md-auto link-dark text-decoration-none"> <a href="https://galp.xunta.gal/costa-da-morte" class="col-md-5 d-flex gap-3 align-items-center justify-content-center mb-3 mb-md-0 me-md-auto link-dark text-decoration-none">
<img class="w-100" src="<?php echo $config->urls->templates?>images/logo_xuntafalicia.png" alt="Logotipo de la Xunta de Galicia"> <img class="w-100" src="<?php echo $config->urls->templates?>images/logo_xuntafalicia.png" alt="Logotipo de la Xunta de Galicia">