Devolvese a mensaxe de mantemento. Axustase o contido de inicio.

This commit is contained in:
Laegnur 2022-04-07 13:57:02 +02:00
parent 4544919f67
commit f21ffea936
21 changed files with 1192 additions and 88 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 315 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 315 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 315 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 315 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View file

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

View file

Before

Width:  |  Height:  |  Size: 315 KiB

After

Width:  |  Height:  |  Size: 315 KiB

View file

@ -5,8 +5,7 @@
<p>&copy;2022 <?php echo $configuracion['nome_sitio']
. ' ' . $configuracion['descripcion_sitio']; ?>.</p>
<p><?php echo _x('All rights reserved', 'copyright');?></p>
<p><?php echo _x('Designed and Developed by', 'developer');?>
<a target="_blank" href="https://artabro.org">Codigo Artabro</a></p>
<p><?php echo _x('Designed and Developed by', 'developer');?> <a target="_blank" href="https://artabro.org">Codigo Artabro</a></p>
</div>
</footer>
<script src="<?php echo $config->urls->templates?>js/main.js"></script>

View file

@ -24,22 +24,20 @@ function getSeccions($seccions)
switch ($seccion->tipo_seccion->value)
{
case 'texto':
$saida .= renderTexto($seccion->artigo);
$saida .= renderTexto($seccion->titular, $seccion->artigo);
break;
case 'galeria':
$saida .= renderGaleria($seccion->galeria);
$saida .= renderGaleria($seccion->titular, $seccion->galeria);
break;
case 'texto_imaxe_lateral':
$saida .= renderTextoImaxe($seccion->artigo, $seccion->imaxe, $seccion->posicion_imaxe->value);
break;
case 'texto_imaxe_superior':
$saida .= getSeccions($seccion->seccion_destacada);
$saida .= renderTextoImaxe($seccion->titular, $seccion->artigo, $seccion->imaxe, $seccion->posicion_imaxe->value);
break;
}
break;
case 'repeater_seccion_destacada':
$saida .= renderTextoImaxe($seccion->artigo, $seccion->imaxe, 'superior');
case 'repeater_mensaxe_mantemento':
$saida .= renderTextoMantemento($seccion->titular, $seccion->artigo, $seccion->imaxe);
break;
case 'imaxe_ligazon':
break;
}
}
@ -60,11 +58,11 @@ function renderMenu($paxinas, $maxDepth = 0, $id = 'nav')
if($paxina->id == wire('page')->id)
{
$saida .= '<li class="activo">';
$saida .= ' <li class="activo">';
}
else
{
$saida .= '<li>';
$saida .= ' <li>';
}
$saida .= '<a href="' . $paxina->url . '">' . $paxina->title . '</a>';
@ -78,12 +76,12 @@ function renderMenu($paxinas, $maxDepth = 0, $id = 'nav')
$saida .= renderMenu($paxina->children, $maxDepth-1, $id);
}
$saida .= '</li>';
$saida .= '</li>' . "\n";
}
if($saida)
{
$saida = '<ul id="' . $id . '">' . $saida . '</ul>';
$saida = ' <ul id="' . $id . '">' . "\n" . $saida . ' </ul>' . "\n";
}
return $saida;
@ -93,7 +91,8 @@ function renderMigasPan($paxina, $separador = '<i class="icon-chevrons-right"></
{
$saida = '';
$saida .= '<div class="contedor migas_pan" role="navigation" aria-label="' . _x('Current page', 'navigation') . ':"> ' . $separador .' ';
$saida .= '<div class="contedor migas_pan" role="navigation" aria-label="' . _x('Current page', 'navigation') . ':">' . "\n";
$saida .= ' ' . $separador . ' ';
foreach($paxina->parents() as $pai)
{
$saida .= '<span><a href="' . $pai->url . '">' . $pai->title . '</a></span> ' . $separador . ' ';
@ -102,48 +101,58 @@ function renderMigasPan($paxina, $separador = '<i class="icon-chevrons-right"></
if($paxina->editable()):
$saida .= ' [ <a href="' . $paxina->editURL . '"> <i class="icon-edit"></i> ' . _x('Edit', 'Edit page') . ' </a> ]';
endif;
$saida .= '</div>';
$saida .= "\n";
$saida .= ' </div>';
return $saida;
}
function renderTexto($artigo)
function renderTexto($titulo, $texto)
{
$saida = '';
$saida .= '<section>';
$saida .= $artigo;
$saida .= '</section>';
$saida .= '<section>' . "\n";
$saida .= $texto . "\n";
$saida .= '</section>' . "\n";
return $saida;
}
function renderGaleria($galeria)
function renderGaleria($titulo, $galeria)
{
$saida = '';
$saida .= '<section class="contedor swiper">';
$saida .= '<h3 class="visually-hidden">Galeria</h3>';
$saida .= '<div class="swiper-wrapper">';
$saida .= '<section class="contedor swiper">' . "\n";
$saida .= ' <h3 class="visually-hidden">';
if($titulo)
{
$saida .= $titulo;
}
else
{
$saida .= 'Galeria';
}
$saida .= '</h3>' . "\n";
$saida .= ' <div class="swiper-wrapper">' . "\n";
foreach($galeria as $imaxe)
{
$saida .= '<div class="swiper-slide">';
$saida .= '<figure>';
$saida .= '<img src="' . $imaxe->url . '" alt="' . $imaxe->description . '">';
$saida .= '<figcaption>' . $imaxe->description . '</figcaption';
$saida .= '</figure>';
$saida .= '</div>';
$saida .= ' <div class="swiper-slide">' . "\n";
$saida .= ' <figure>' . "\n";
$saida .= ' <img src="' . $imaxe->url . '" alt="' . $imaxe->description . '">' . "\n";
$saida .= ' <figcaption>' . $imaxe->description . '</figcaption>' . "\n";
$saida .= ' </figure>' . "\n";
$saida .= ' </div>' . "\n";
}
$saida .= '</div>';
$saida .= '<div class="swiper-button-prev"></div>';
$saida .= '<div class="swiper-button-next"></div>';
$saida .= '<div class="swiper-paxination"></div>';
$saida .= '</section>';
$saida .= ' </div>' . "\n";
$saida .= ' <div class="swiper-button-prev"></div>' . "\n";
$saida .= ' <div class="swiper-button-next"></div>' . "\n";
$saida .= ' <div class="swiper-paxination"></div>' . "\n";
$saida .= ' </section>';
return $saida;
}
function renderTextoImaxe($texto, $imaxe, $posicion)
function renderTextoImaxe($titulo, $texto, $imaxe, $posicion)
{
$saida = '';
@ -171,3 +180,25 @@ function renderTextoImaxe($texto, $imaxe, $posicion)
return $saida;
}
function renderTextoMantemento($titulo, $texto, $imaxe)
{
$saida = '';
$saida .= '<section>' . "\n";
$saida .= ' <h3>' . $titulo . '</h3>' . "\n";
if($imaxe)
{
$saida .= ' <figure>' . "\n";
$saida .= ' <img src="' . $imaxe->url . '" alt="' . $imaxe->description . '">' . "\n";
$saida .= ' <figcaption>' . $texto . '</figcaption>' . "\n";
$saida .= ' </figure>' . "\n";
}
else
{
$saida .= ' ' . $texto . "\n";
}
$saida .= ' </section>';
return $saida;
}

View file

@ -71,7 +71,7 @@
<nav id="menu">
<h2 class="visually-hidden"><?php echo _x('Menu', 'Navigation menu');?></h2>
<ul id="idiomas">
<?php
<?php
foreach($languages as $idioma)
{
if(!$page->viewable($idioma))

View file

@ -66,6 +66,8 @@ p
a
{
color: rgb(var(--color_10));
text-decoration-line: underline;
text-decoration-style: dotted;
}
img
@ -76,6 +78,36 @@ img
figure
{
margin: 0;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2),
0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
figure figcaption
{
padding: 0 40px 20px;
color: rgb(var(--color_30));
font-family: 'Amontillados', sans-serif;
font-size: 2.5rem;
}
figure figcaption p
{
text-align: center;
}
figure img
{
display: block;
width: 100%;
height: 100%;
object-fit: cover;
padding: 10px;
background-color: rgb(var(--color_60));
}
picture
@ -85,11 +117,6 @@ picture
justify-content: center;
}
picture img
{
width: 150px;
}
section
{
margin-bottom: 30px;
@ -105,6 +132,11 @@ div#logo
width: 230px !important;
}
div#logo img
{
width: 150px;
}
header#cabeceira input#interruptor
{
display: block;
@ -371,41 +403,13 @@ div.swiper-slide
background: #fff;
}
div.swiper-slide figure
{
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2),
0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
div.swiper-slide figcaption
{
padding: 0 40px 20px;
color: rgb(var(--color_30));
font-family: 'Amontillados', sans-serif;
font-size: 2.5rem;
}
div.swiper-slide img
{
display: block;
width: 100%;
height: 100%;
object-fit: cover;
padding: 10px;
background-color: rgb(var(--color_60));
}
.swiper-button-prev,
.swiper-button-next
{
bottom: 15px;
top: unset;
color: rgb(var(--color_30));
color: rgb(var(--color_10));
}
.contedor
@ -450,7 +454,7 @@ div.swiper-slide img
@media (min-width:768px)
{
picture img
div#logo img
{
width: 230px;
}
@ -539,12 +543,13 @@ div.swiper-slide img
ul#paxinas li:hover a, ul#paxinas li.activo a
{
text-decoration: underline;
text-decoration: underline dotted;
}
.contedor
{
max-width: 70.5rem;
width: 100%;
max-width: 62.5rem;
}
}

View file

@ -4,22 +4,19 @@ $menu = '';
$contido = '';
$mantemento = $inicio->mantemento;
$contido .= '<article id="inicio" class="contedor">';
$contido .= '<h2 class="visually-hidden">' . ucfirst($inicio->title) . '</h2>';
$contido .= renderMigasPan($page);
$contido .= ' <article id="inicio" class="contedor">' . "\n";
$contido .= ' <h2 class="visually-hidden">' . ucfirst($inicio->title) . '</h2>' . "\n";
$contido .= ' ' . renderMigasPan($page) . "\n";
if($mantemento && !$user->isLoggedin())
{
$menu = renderMenu($inicio, 0, 'paxinas');
$contido .= renderGaleria($inicio->galeria);
$contido .= renderTexto($inicio->artigo);
$contido .= ' ' . getSeccions($inicio->mensaxe_mantemento) . "\n";
}
else
{
$menu = renderMenu($inicio->and($inicio->children), 0, 'paxinas');
$contido .= renderGaleria($inicio->galeria);
$contido .= renderTexto($inicio->artigo);
$contido .= ' ' . getSeccions($inicio->seccions) . "\n";
}
$contido .= '</article>';
$contido .= ' </article>' . "\n";