diff --git a/site/templates/atopar.php b/site/templates/atopar.php index 6a3667e..d6c80c8 100644 --- a/site/templates/atopar.php +++ b/site/templates/atopar.php @@ -1,25 +1,34 @@ text($input->get('q')); $menu = ''; -$contido = ''; + if($configuracion['mantemento']['activo'] && !$user->isLoggedin()) { - $session->redirect($inicio->url); + $menu = renderMenu($inicio->and($pages->get('/noticias')->and($pages->get('/contacto')))); } else { - $menu = renderMenu($inicio->children); + $menu = renderMenu($inicio->and($inicio->children)); } - -$contido .= renderMigasPan($page) . "\n"; -$contido .= '
' . "\n"; -$contido .= '

' . ucfirst($page->title) . '

' . "\n"; - +?> +
+ +whitelist('q', $atopar); @@ -36,38 +45,58 @@ if($atopar) if($cnt) { - $contido .= '

Resultados para: ' . $atopar . '

' . "\n"; - $contido .= '

' . sprintf(_n(_x('Found %d page', 'found 1 page'), - _x('Found %d pages', 'found multiple pages'), $cnt), $cnt) . '

' . "\n"; - $contido .= '
' . "\n"; - $contido .= '

' . _x("Search results", "search results") . '

' . "\n"; - $contido .= '
    '."\n"; - foreach($matches as $paxina) - { - $contido .= '
  • ' . "\n"; - $contido .= ' ' . $paxina->title . '' . "\n"; - $contido .= '
  • ' . "\n"; - } - $contido .= '
'."\n"; - $contido .= '
'; +?> +
+

title);?>

+

Resultados para:

+

+
+

+ +
+
+' . _x('Sitemap', 'sitemap') . '' . "\n"; - $contido .= '

' . _x('Sorry, no results were found', 'no results found') . '.

' . "\n"; - $contido .= '
' . "\n"; - $contido .= '

' . _x('Sitemap', 'sitemap') . '

' . "\n"; - $contido .= renderMapaDoSitio($inicio, 3, 'mapa-sitio'); - $contido .= '
'; +?> +
+

title);?>

+

+

.

+
+

+ +
+
+' . _x('Sitemap', 'sitemap') . '' . "\n"; - $contido .= '

' . _x('Sorry, no results were found', 'no results found') . '.

' . "\n"; - $contido .= '
' . "\n"; - $contido .= '

' . _x('Sitemap', 'sitemap') . '

' . "\n"; - $contido .= renderMapaDoSitio($inicio, 3, 'mapa-sitio'); - $contido .= '
'; +?> +
+

title);?>

+

+

.

+
+

+ +
+
+' . "\n"; \ No newline at end of file +?> + +
+get('/noticias/etiquetas/')->children();
+

numChildren) { diff --git a/site/templates/contedor.php b/site/templates/contedor.php index d762ace..116aaca 100644 --- a/site/templates/contedor.php +++ b/site/templates/contedor.php @@ -1,3 +1,13 @@ redirect($pages->get('/es/noticias/')->url); \ No newline at end of file diff --git a/site/templates/css/main.css b/site/templates/css/main.css index c16d328..613161d 100644 --- a/site/templates/css/main.css +++ b/site/templates/css/main.css @@ -1,7 +1,14 @@ :root { + --separacion: 1rem; + --contido-max: 60rem; + --destacado-max: 75rem; + --destacado: calc((var(--destacado-max) - var(--contido-max)) / 2); --titulos: ui-rounded, 'Hiragino Maru Gothic ProN', Quicksand, Comfortaa, Manjari, 'Arial Rounded MT', 'Arial Rounded MT Bold', Calibri, source-sans-pro, sans-serif; --corpo: Avenir, Montserrat, Corbel, 'URW Gothic', source-sans-pro, sans-serif; + + --color-accent: #005399; + --color-accent-tint: #FFF; } *, *::before, *::after @@ -151,7 +158,15 @@ p, figcaption { max-width: 65ch; +} +p +{ + margin: 0 0 var(--separacion); +} + +figcaption +{ margin-inline: auto; } @@ -220,6 +235,7 @@ ol { display: flex; flex-direction: row; + flex-wrap: wrap; margin: 0; @@ -1095,6 +1111,117 @@ section.noticias img width: 100%; } +nav#mapa-sitio +{ + text-align: left; +} + +nav#mapa-sitio ul +{ + display: block; + + margin: 0 0 0 var(--separacion); + + padding: 0; + + list-style: none; +} + +nav#mapa-sitio ul > li +{ + display: flex; + flex-direction: row; + align-items: flex-start; + + margin: 0 0 calc(var(--separacion) / 2); + + position: relative; +} + +nav#mapa-sitio ul > li:before +{ + left: calc(-1 * var(--separacion) / 2); + position: absolute; + top: 1rem; + + height: 1px; + width: calc(var(--separacion) / 2); + + background: rgb(var(--cor_10)); + + content: ""; +} + +nav#mapa-sitio ul > li:first-child:before +{ + left: calc(-1 * var(--separacion)); + + width: var(--separacion); +} + +nav#mapa-sitio ul li:after +{ + bottom: 0; + left: calc((var(--separacion) / 2) - var(--separacion)); + position: absolute; + top: calc(-1 * var(--separacion)); + + width: 1px; + + background: rgb(var(--cor_10)); + + content: ""; +} + +nav#mapa-sitio ul li:first-child:after +{ + top: 1rem; +} + +nav#mapa-sitio ul li:last-child:after +{ + bottom: auto; + + height: calc(var(--separacion) + 1em); +} + +nav#mapa-sitio ul li:only-child:after +{ + display: none; +} + +nav#mapa-sitio small +{ + position: relative; + + font-size: 0.8rem; + line-height: 1.5rem; +} + +nav#mapa-sitio a +{ + display: block; + + width: 200px; + + padding: 0.5rem; + + border-radius: 3px; + + line-height: 1.5rem; + text-decoration: none; + + transition: background-color 0.4s; +} + +nav#mapa-sitio a, +nav#mapa-sitio a:visited +{ + color: rgb(var(--cor_60)); + + background: rgb(var(--cor_30)); +} + footer#pe { padding-block: 1.5rem; @@ -1197,6 +1324,8 @@ footer#pe p#desenrolo .centrado, .align_center { + margin-inline: auto; + text-align: center; } @@ -1252,6 +1381,43 @@ footer#pe p#desenrolo color: rgb(var(--cor_60)); } +@media only screen and (max-width: 576px) +{ + nav#mapa-sitio > ul > li ul li + { + flex-direction: column; + } + + nav#mapa-sitio > ul > li ul li ul + { + margin-top: calc(var(--separacion)/2); + } + + nav#mapa-sitio > ul > li > ul li:after + { + left: calc(-1 * var(--separacion)/2); + } + + nav#mapa-sitio > ul > li > ul > li li:first-child:before + { + left: calc(-1 * var(--separacion)/2); + + width: calc(var(--separacion)/2); + } + + nav#mapa-sitio > ul > li > ul > li li:first-child:after + { + top: calc(-1 * var(--separacion)/2); + } + + nav#mapa-sitio > ul > li > ul > li li:only-child:after + { + display: block; + + height: calc(var(--separacion)/2 + 1em); + } +} + @media (min-width: 640px) { section[id^="reixa-"], @@ -1391,6 +1557,43 @@ footer#pe p#desenrolo } } +@media only screen and (max-width: 768px) +{ + nav#mapa-sitio > ul > li > ul > li ul li + { + flex-direction: column; + } + + nav#mapa-sitio > ul > li > ul > li ul li ul + { + margin-top: calc(var(--separacion)/2); + } + + nav#mapa-sitio > ul > li > ul > li > ul li:after + { + left: calc(-1 * var(--separacion)/2); + } + + nav#mapa-sitio > ul > li > ul > li > ul > li li:first-child:before + { + left: calc(-1 * var(--separacion)/2); + + width: calc(var(--separacion)/2); + } + + nav#mapa-sitio > ul > li > ul > li > ul > li li:first-child:after + { + top: calc(-1 * var(--separacion)/2); + } + + nav#mapa-sitio > ul > li > ul > li > ul > li li:only-child:after + { + display: block; + + height: calc(var(--separacion)/2 + 1em); + } +} + @media (min-width: 1024px) { @@ -1495,4 +1698,413 @@ footer#pe p#desenrolo { from {transform:scale(0)} to {transform:scale(1)} -} \ No newline at end of file +} + +/**/ +/* +#mapa-sitio +{ + clear: both; + width: 100%; + margin-top: 3em; +} + +#mapa-sitio #home +{ + position: absolute; + margin-top: -3em; + margin-bottom: 0; + min-width: 11.5em; + width: 100%; +} + +#mapa-sitio #home:before +{ + display: none; +} + +#mapa-sitio ul +{ + display: flex; + flex-wrap: wrap; + list-style: none; + position: relative; +} + +#mapa-sitio li +{ + flex: 1; + flex-basis: 11.5em; + padding-right: 1.25em; + position: relative; +} + +#mapa-sitio > ul > li +{ + margin-top: 3em; +} + +#mapa-sitio li a +{ + margin: 0; + padding: .875em .9375em .9375em .9375em; + display: block; + font-size: .9375em; + font-weight: bold; + color: #000; + background: #c3eafb; + text-shadow: 0 0 10px rgba(0,0,0,.1); + border: 2px solid #b5d9ea; + box-shadow: 0px 2px 1px rgba(0,0,0,0.15); + text-decoration: none; +} + +#mapa-sitio li a:hover +{ + border-color: #97bdcf; + + background-color: #e2f4fd; +} + +#mapa-sitio ul ul +{ + display: block; +} + +#mapa-sitio ul ul li +{ + padding-top: .6875em; + padding-right: 0; +} + +#mapa-sitio ul ul li a +{ + border-color: #b8da83; + + background-color: #cee3ac; +} + +#mapa-sitio ul ul li a:hover +{ + border-color: #94b75f; + + background-color: #e7f1d7; +} + +#mapa-sitio ul ul li:first-child +{ + padding-top: 2em; +} + +#mapa-sitio ul ul ul +{ + margin-top: .6em; + + padding-top: .6em; + padding-bottom: .625em; +} + +#mapa-sitio ul ul ul li +{ + padding-top: .3125em; + padding-bottom: .3125em; +} + +#mapa-sitio ul ul ul li a +{ + width: 90%; + + margin-right: 0; + margin-left: auto; + + padding: .75em; + + border-color: #e3ca4b; + + font-size: .75em; + + background-color: #fff7aa; +} + +#mapa-sitio ul ul ul li a:hover +{ + border-color: #d1b62c; + + background-color: #fffce5; +} + +#mapa-sitio ul ul ul li:first-child +{ + padding-top: 1em; +} + +#mapa-sitio ul ul ul li a:link:after, +#mapa-sitio ul ul ul li a:visited:after +{ + font-size: .75em; +} + +#mapa-sitio ul ul ul ul +{ + margin-top: 0; + + padding-top: .3125em; + padding-bottom: .3125em; +} + +#mapa-sitio ul ul ul ul li a +{ + width: 80%; + + padding: .75em ; + + background-color: #de003a; +} + +#mapa-sitio ul ul ul ul li a:hover +{ + background-color: #c20035; +} + +#mapa-sitio ul ul ul ul li a:link:after, +#mapa-sitio ul ul ul ul li a:visited:after +{ + display: none; +} + +#mapa-sitio ul:before, +#mapa-sitio ul:after, +#mapa-sitio ul li:before, +#mapa-sitio ul li:after +{ + display: block; + + position: absolute; + z-index: -1; + + border-width: 0; + border-color: #e3e3e3; + border-style: solid; + + content: ''; +} + +#mapa-sitio > ul > li:before +{ + top: -1.375em; + right: calc(50% + .625em); + + height: 1.375em; + width: calc(100% - 2px); + + border-top-width: 2px; + border-right-width: 2px; +} + +#mapa-sitio > ul > li:first-child + li:before +{ + top: -5em; + + height: 5em; + + border-top-width: 0; +} + +#mapa-sitio ul ul li:after +{ + top: 0; + right: 1px; + + width: 50%; + height: .6875em; + + border-left-width: 2px; +} + +#mapa-sitio ul ul li:first-child:before +{ + top: .6875em; + right: 1px; + + width: 50%; + height: 1.3125em; + + border-left-width: 2px; +} + +#mapa-sitio > ul > li:last-child:after +{ + border-bottom-width: 0; +} + +#mapa-sitio ul ul ul li:before +{ + top: -50%; + left: 0; + + width: calc(50% - 5px) !important; + height: calc(100% - 2px); + + border-left-width: 2px; + border-bottom-width: 2px; +} + +#mapa-sitio ul ul ul li:first-child:before +{ + top: -1px; + + height: 2.125em; + + border-top-width: 2px; +} + +#mapa-sitio ul ul ul:before +{ + top: -10px; + right: 1px; + + width: 50%; + height: 1.25em; + + border-left-width: 2px; +} + +#mapa-sitio ul ul ul li:after +{ + border-width: 0; +} + +#mapa-sitio ul ul ul ul li:before, +#mapa-sitio ul ul ul ul li:first-child:before +{ + display: none; +} + +#mapa-sitio ul ul ul ul:before +{ + top: -2.5em; + left: 0; + + width: 1px; + height: calc(100% + 2.5em); + + border-left-width: 2px; +} + +#mapa-herramientas +{ + float: right; + + max-width: 48%; + + margin-top: 0; + margin-bottom: -.25em; + margin-right: 1.25em; + + list-style-type: none; +} + +#mapa-herramientas li +{ + display: inline-block; + + padding: 0 0 .625em .625em; +} + +#mapa-herramientas li:first-child +{ +} + +#mapa-herramientas li a +{ + display: block; + + padding: .75em 1em; + + border: 2px solid #e3ca4b; + + box-shadow: 0px 2px 0 rgba(0,0,0,0.15); + + color: #000; + font-size: .75em; + font-weight: 700; + text-align: left; + text-decoration: none; + text-shadow: 0 0 10px rgba(0,0,0,.15); + + background-color: #fff7aa; +} + +#mapa-herramientas li a:hover +{ + border-color: #d1b62c; + + background-color: #fffce5; +} + +#mapa-herramientas li a:link:after, +#mapa-herramientas li a:visited:after +{ + margin-top: .25em; + + color: #ccae14; + font-size: .75em; + font-weight: 600; +} + + +@media (max-width: 64opx) +{ + #mapa-sitio ul + { + display: block; + } + + #mapa-sitio li + { + width: 100%; + + padding-right: 0; + } + + #mapa-sitio #home + { + position: relative; + + width: 100%; + + margin-bottom: -1em; + margin-top: 0; + } + + #mapa-herramientas + { + display: block; + float: none; + + width: 100%; + max-width: 100%; + + margin-bottom: 2.5em; + + text-align: right; + } +} + +@media (min-width: 640px) +{ + #mapa-sitio > ul > li + { + max-width: 33%; + } + +} + +@media (min-width: 1024px) +{ + #mapa-sitio > ul > li + { + max-width: 20%; + } +} +*/ \ No newline at end of file diff --git a/site/templates/layout/func.php b/site/templates/layout/func.php index ca2bd16..8f0088e 100644 --- a/site/templates/layout/func.php +++ b/site/templates/layout/func.php @@ -283,6 +283,36 @@ function renderMigasPan($paxina, $separador = ' + * @return string + * + */ + +function renderMapaDoSitio($paxinas, $profundidade = 0) +{ + $saida = ''; + + if($paxinas instanceof Page) $paxinas = array($paxinas); + + $saida .= '
    '; + foreach($paxinas as $paxina) + { + $saida .= '
  • '; + $saida .= '' . ucwords($paxina->title) . ''; + if($paxina->hasChildren() && $profundidade) + { + $saida .= renderMapaDoSitio($paxina->children(), $profundidade-1); + } + $saida .= "
  • "; + } + $saida .= '
'; + + return $saida; +} + /** * @param string $titulo * @param string $texto @@ -680,38 +710,7 @@ function renderArtigos($publicacion, $locale, $resumen = true) /** Rehacer */ -/** - * @param array|PageArray $paxinas - * @param int $maxDepth How many levels of navigation below current should it go? - * @param string $fieldNames Any extra field names to display (separate multiple fields with a space) - * @param string $class CSS class name for containing
    - * @return string - * - */ -function renderMapaDoSitio($paxinas, $profundidade = 0, $clase = 'nav') -{ - $saida = ''; - $actual = wire('page'); - if($paxinas instanceof Page) $paxinas = array($paxinas); - - foreach($paxinas as $paxina) - { - $saida .= '
  • '; - $saida .= "$paxina->title"; - - if($paxina->hasChildren() && $profundidade) - { - if($clase == 'nav') $clase = 'nav nav-tree'; - $saida .= renderMapaDoSitio($paxina->children, $profundidade-1, $clase); - } - $saida .= "
  • "; - } - - if($saida) $saida = '
      ' . $saida . '
    '; - - return $saida; -} /** * @param array|PageArray $seccion diff --git a/site/templates/layout/head.php b/site/templates/layout/head.php index 8a97af3..a578088 100644 --- a/site/templates/layout/head.php +++ b/site/templates/layout/head.php @@ -48,11 +48,6 @@ if($input->get->logout == true) --cor_60: ; --cor_30: ; --cor_10: ; - - --separacion: 1rem; - --contido-max: 60rem; - --destacado-max: 75rem; - --destacado: calc((var(--destacado-max) - var(--contido-max)) / 2); }