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'] <p>&copy;2022 <?php echo $configuracion['nome_sitio']
. ' ' . $configuracion['descripcion_sitio']; ?>.</p> . ' ' . $configuracion['descripcion_sitio']; ?>.</p>
<p><?php echo _x('All rights reserved', 'copyright');?></p> <p><?php echo _x('All rights reserved', 'copyright');?></p>
<p><?php echo _x('Designed and Developed by', 'developer');?> <p><?php echo _x('Designed and Developed by', 'developer');?> <a target="_blank" href="https://artabro.org">Codigo Artabro</a></p>
<a target="_blank" href="https://artabro.org">Codigo Artabro</a></p>
</div> </div>
</footer> </footer>
<script src="<?php echo $config->urls->templates?>js/main.js"></script> <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) switch ($seccion->tipo_seccion->value)
{ {
case 'texto': case 'texto':
$saida .= renderTexto($seccion->artigo); $saida .= renderTexto($seccion->titular, $seccion->artigo);
break; break;
case 'galeria': case 'galeria':
$saida .= renderGaleria($seccion->galeria); $saida .= renderGaleria($seccion->titular, $seccion->galeria);
break; break;
case 'texto_imaxe_lateral': case 'texto_imaxe_lateral':
$saida .= renderTextoImaxe($seccion->artigo, $seccion->imaxe, $seccion->posicion_imaxe->value); $saida .= renderTextoImaxe($seccion->titular, $seccion->artigo, $seccion->imaxe, $seccion->posicion_imaxe->value);
break;
case 'texto_imaxe_superior':
$saida .= getSeccions($seccion->seccion_destacada);
break; break;
} }
break; break;
case 'repeater_mensaxe_mantemento':
case 'repeater_seccion_destacada': $saida .= renderTextoMantemento($seccion->titular, $seccion->artigo, $seccion->imaxe);
$saida .= renderTextoImaxe($seccion->artigo, $seccion->imaxe, 'superior'); break;
case 'imaxe_ligazon':
break; break;
} }
} }
@ -60,11 +58,11 @@ function renderMenu($paxinas, $maxDepth = 0, $id = 'nav')
if($paxina->id == wire('page')->id) if($paxina->id == wire('page')->id)
{ {
$saida .= '<li class="activo">'; $saida .= ' <li class="activo">';
} }
else else
{ {
$saida .= '<li>'; $saida .= ' <li>';
} }
$saida .= '<a href="' . $paxina->url . '">' . $paxina->title . '</a>'; $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 .= renderMenu($paxina->children, $maxDepth-1, $id);
} }
$saida .= '</li>'; $saida .= '</li>' . "\n";
} }
if($saida) if($saida)
{ {
$saida = '<ul id="' . $id . '">' . $saida . '</ul>'; $saida = ' <ul id="' . $id . '">' . "\n" . $saida . ' </ul>' . "\n";
} }
return $saida; return $saida;
@ -93,7 +91,8 @@ function renderMigasPan($paxina, $separador = '<i class="icon-chevrons-right"></
{ {
$saida = ''; $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) foreach($paxina->parents() as $pai)
{ {
$saida .= '<span><a href="' . $pai->url . '">' . $pai->title . '</a></span> ' . $separador . ' '; $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()): if($paxina->editable()):
$saida .= ' [ <a href="' . $paxina->editURL . '"> <i class="icon-edit"></i> ' . _x('Edit', 'Edit page') . ' </a> ]'; $saida .= ' [ <a href="' . $paxina->editURL . '"> <i class="icon-edit"></i> ' . _x('Edit', 'Edit page') . ' </a> ]';
endif; endif;
$saida .= '</div>'; $saida .= "\n";
$saida .= ' </div>';
return $saida; return $saida;
} }
function renderTexto($artigo) function renderTexto($titulo, $texto)
{ {
$saida = ''; $saida = '';
$saida .= '<section>'; $saida .= '<section>' . "\n";
$saida .= $artigo; $saida .= $texto . "\n";
$saida .= '</section>'; $saida .= '</section>' . "\n";
return $saida; return $saida;
} }
function renderGaleria($galeria) function renderGaleria($titulo, $galeria)
{ {
$saida = ''; $saida = '';
$saida .= '<section class="contedor swiper">'; $saida .= '<section class="contedor swiper">' . "\n";
$saida .= '<h3 class="visually-hidden">Galeria</h3>'; $saida .= ' <h3 class="visually-hidden">';
$saida .= '<div class="swiper-wrapper">'; if($titulo)
{
$saida .= $titulo;
}
else
{
$saida .= 'Galeria';
}
$saida .= '</h3>' . "\n";
$saida .= ' <div class="swiper-wrapper">' . "\n";
foreach($galeria as $imaxe) foreach($galeria as $imaxe)
{ {
$saida .= '<div class="swiper-slide">'; $saida .= ' <div class="swiper-slide">' . "\n";
$saida .= '<figure>'; $saida .= ' <figure>' . "\n";
$saida .= '<img src="' . $imaxe->url . '" alt="' . $imaxe->description . '">'; $saida .= ' <img src="' . $imaxe->url . '" alt="' . $imaxe->description . '">' . "\n";
$saida .= '<figcaption>' . $imaxe->description . '</figcaption'; $saida .= ' <figcaption>' . $imaxe->description . '</figcaption>' . "\n";
$saida .= '</figure>'; $saida .= ' </figure>' . "\n";
$saida .= '</div>'; $saida .= ' </div>' . "\n";
} }
$saida .= '</div>'; $saida .= ' </div>' . "\n";
$saida .= '<div class="swiper-button-prev"></div>'; $saida .= ' <div class="swiper-button-prev"></div>' . "\n";
$saida .= '<div class="swiper-button-next"></div>'; $saida .= ' <div class="swiper-button-next"></div>' . "\n";
$saida .= '<div class="swiper-paxination"></div>'; $saida .= ' <div class="swiper-paxination"></div>' . "\n";
$saida .= '</section>'; $saida .= ' </section>';
return $saida; return $saida;
} }
function renderTextoImaxe($texto, $imaxe, $posicion) function renderTextoImaxe($titulo, $texto, $imaxe, $posicion)
{ {
$saida = ''; $saida = '';
@ -171,3 +180,25 @@ function renderTextoImaxe($texto, $imaxe, $posicion)
return $saida; 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"> <nav id="menu">
<h2 class="visually-hidden"><?php echo _x('Menu', 'Navigation menu');?></h2> <h2 class="visually-hidden"><?php echo _x('Menu', 'Navigation menu');?></h2>
<ul id="idiomas"> <ul id="idiomas">
<?php <?php
foreach($languages as $idioma) foreach($languages as $idioma)
{ {
if(!$page->viewable($idioma)) if(!$page->viewable($idioma))

View file

@ -2,11 +2,11 @@
include('./_head.php'); include('./_head.php');
?> ?>
<main id="contido"> <main id="contido">
<?php <?php
echo $contido; echo $contido;
?> ?>
</main> </main>
<?php <?php
include('./_foot.php'); include('./_foot.php');
?> ?>

View file

@ -66,6 +66,8 @@ p
a a
{ {
color: rgb(var(--color_10)); color: rgb(var(--color_10));
text-decoration-line: underline;
text-decoration-style: dotted;
} }
img img
@ -76,6 +78,36 @@ img
figure figure
{ {
margin: 0; 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 picture
@ -85,11 +117,6 @@ picture
justify-content: center; justify-content: center;
} }
picture img
{
width: 150px;
}
section section
{ {
margin-bottom: 30px; margin-bottom: 30px;
@ -105,6 +132,11 @@ div#logo
width: 230px !important; width: 230px !important;
} }
div#logo img
{
width: 150px;
}
header#cabeceira input#interruptor header#cabeceira input#interruptor
{ {
display: block; display: block;
@ -371,41 +403,13 @@ div.swiper-slide
background: #fff; 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-prev,
.swiper-button-next .swiper-button-next
{ {
bottom: 15px; bottom: 15px;
top: unset; top: unset;
color: rgb(var(--color_30)); color: rgb(var(--color_10));
} }
.contedor .contedor
@ -450,7 +454,7 @@ div.swiper-slide img
@media (min-width:768px) @media (min-width:768px)
{ {
picture img div#logo img
{ {
width: 230px; width: 230px;
} }
@ -539,12 +543,13 @@ div.swiper-slide img
ul#paxinas li:hover a, ul#paxinas li.activo a ul#paxinas li:hover a, ul#paxinas li.activo a
{ {
text-decoration: underline; text-decoration: underline dotted;
} }
.contedor .contedor
{ {
max-width: 70.5rem; width: 100%;
max-width: 62.5rem;
} }
} }

View file

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