| Server IP : 104.21.84.107 / Your IP : 104.23.197.208 Web Server : Apache/2.4.63 (Ubuntu) System : Linux adminpruebas-Virtual-Machine 6.14.0-37-generic #37-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 22:10:32 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 8.4.5 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /proc/self/root/var/www/biblioteca/includes/ |
Upload File : |
<?php
declare(strict_types=1);
$masServicios = require __DIR__ . '/../data/mas_servicios.php';
function renderMasServiciosIcon(string $icono): string
{
$icons = [
'estadisticas' => '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5 19V11"/><path d="M10 19V7"/><path d="M15 19v-5"/><path d="M20 19V4"/><path d="M3 19h18"/></svg>',
'indicadores' => '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 4a8 8 0 1 0 8 8"/><path d="M12 12 19 5"/><path d="M14.5 4H20v5.5"/></svg>',
'academia' => '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="m3 9 9-4 9 4-9 4-9-4Z"/><path d="M7 11.5v3.5c0 1.9 2.2 3.5 5 3.5s5-1.6 5-3.5v-3.5"/><path d="M21 10v5"/></svg>',
];
return $icons[$icono] ?? $icons['estadisticas'];
}
function masServiciosEsEnlaceExterno(string $url): bool
{
return str_starts_with($url, 'http://') || str_starts_with($url, 'https://');
}
?>
<?php if ($masServicios): ?>
<aside class="mas-servicios" id="inicio-mas-servicios" aria-label="Más servicios">
<details class="mas-servicios__dock">
<summary class="mas-servicios__trigger">
<span class="mas-servicios__trigger-icon" aria-hidden="true">
<svg viewBox="0 0 24 24" aria-hidden="true">
<path d="M4 12h16"/>
<path d="M12 4v16"/>
</svg>
</span>
<span class="mas-servicios__trigger-text">Más servicios</span>
</summary>
<div class="mas-servicios__panel">
<div class="mas-servicios__header">
<p class="mas-servicios__eyebrow">Biblioteca Unillanos</p>
<h2 class="mas-servicios__title">Más servicios</h2>
</div>
<div class="mas-servicios__list">
<?php foreach ($masServicios as $servicio): ?>
<?php
$url = (string) $servicio['url'];
$icono = (string) $servicio['icono'];
$esExterno = masServiciosEsEnlaceExterno($url);
?>
<a
class="mas-servicios__item mas-servicios__item--<?= htmlspecialchars($icono, ENT_QUOTES, 'UTF-8') ?>"
href="<?= htmlspecialchars($url, ENT_QUOTES, 'UTF-8') ?>"
<?php if ($esExterno): ?>
target="_blank" rel="noopener noreferrer"
<?php endif; ?>
>
<span class="mas-servicios__item-icon">
<?= renderMasServiciosIcon($icono) ?>
</span>
<span class="mas-servicios__item-copy">
<strong><?= htmlspecialchars((string) $servicio['titulo'], ENT_QUOTES, 'UTF-8') ?></strong>
<span><?= htmlspecialchars((string) $servicio['descripcion'], ENT_QUOTES, 'UTF-8') ?></span>
</span>
<span class="mas-servicios__item-arrow" aria-hidden="true">
<svg viewBox="0 0 24 24" aria-hidden="true">
<path d="m9 6 6 6-6 6"/>
</svg>
</span>
</a>
<?php endforeach; ?>
</div>
</div>
</details>
</aside>
<?php endif; ?>