alejandrogs.es/templates/partials/nav.html
alejandrogs73 00dc194e86
All checks were successful
Zola / build-and-deploy (push) Successful in 17s
SEO: metadatos, datos estructurados y encabezados semánticos
- <html lang="es"> en lugar de "en"
- <title> con sufijo del sitio, canonical, meta robots y author
- Open Graph completo (url, type, locale, image, article:*) y Twitter Card
- JSON-LD: WebSite + Person en portada, BlogPosting en cada post
- rel="me" hacia Mastodon/GitHub/X
- Imagen para redes (og-image.png) y favicon
- Títulos de página como <h1> (antes <div>); listados y modal de búsqueda en <h2>
- Notas sueltas con noindex y fuera del sitemap; sin paginación duplicada
- Páginas de etiquetas y 404 en español, con títulos propios
- alt/width/height/lazy en los badges de la portada
- MathJax solo cuando un post lo pida ([extra] mathjax = true)
- Descripción en /posts y etiquetas en "Hola Mundo"
- Limpieza de ficheros de respaldo del editor + .gitignore

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 12:10:08 +02:00

97 lines
4 KiB
HTML

<nav>
<div class="left-nav">
{% if config.extra.logo %}
<a href={{ config.base_url }} class="logo">
<img alt="{{ config.title }}" src="{{ get_url(path=config.extra.logo) }}" />
</a>
{% else %}
<a href={{ config.base_url }}>{{ config.title }}</a>
{% endif %}
<div class="socials">
{% if config.markdown.external_links_target_blank %}
{% set link_attrs = "rel='me noopener' target='_blank'" %}
{% else %}
{% set link_attrs = "rel='me'" %}
{% endif %}
{% for social in config.extra.socials %}
<a {{ link_attrs | safe }} href="{{ social.url }}" class="social">
<img alt="{{ social.name }}"
src="{{ get_url(path='icons/social/' ~ social.icon ~ '.svg') }}" />
</a>
{% endfor %}
</div>
</div>
<div class="right-nav">
{% for menu in config.extra.menu %}
<a href={{ get_url(path=menu.url) }} style="margin-right: 0.5em">{{ menu.name }}</a>
{% endfor %}
{% if config.build_search_index %}
<button id="search-button"
class="search-button"
title="$SHORTCUT to open search">
<img src="{{ get_url(path='icons/search.svg') }}"
alt="Search"
class="search-icon" />
</button>
<div id="searchModal"
class="search-modal js"
role="dialog"
aria-labelledby="modalTitle">
<div id="modal-content">
<h2 id="modalTitle" class="page-header">
Search
</h2>
<div id="searchBar">
<input id="searchInput"
role="combobox"
autocomplete="off"
spellcheck="false"
aria-expanded="false"
aria-controls="results-container"
placeholder="Search..." />
<button id="clear-search" class="clear-button" title="Clear search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960">
<path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z" />
</svg>
</button>
</div>
<div id="results-container">
<div id="results-info">
<span id="zero_results" style="display: none;">No results</span>
<span id="one_result" style="display: none;">1 result</span>
<span id="many_results" style="display: none;">$NUMBER results</span>
</div>
<div id="results" role="listbox">
</div>
</div>
</div>
</div>
{% endif %}
{% if config.extra.theme == "toggle" %}
<a id="dark-mode-toggle"
onclick="toggleTheme(); event.preventDefault();"
href="#">
<img src="{{ get_url(path='icons/sun.svg') }}" id="sun-icon" alt="Light" />
<img src="{{ get_url(path='icons/moon.svg') }}"
id="moon-icon"
style="filter: invert(1)"
alt="Dark" />
<img src="{{ get_url(path='icons/auto.svg') }}"
id="auto-icon"
style="filter: invert(1)"
alt="Auto" />
</a>
<!-- Initialize the theme toggle icons -->
<script>
updateItemToggleTheme()
</script>
{% endif %}
</div>
</nav>