usar el menú en lugar de fallar porque falta el logo

fixes #6
This commit is contained in:
f 2021-05-08 16:43:50 -03:00
parent 9462ffa324
commit 714d30ea69
2 changed files with 1 additions and 39 deletions

View file

@ -1,37 +0,0 @@
<nav class="navbar navbar-expand-lg navbar-light bg-light d-print-block" role="navigation" aria-label="{{ site.i18n.menu.title }}">
<a class="navbar-brand" href="">
{% include_cached logo.svg %}
</a>
<ul class="navbar-nav d-print-none" data-controller="menu">
{%- for item in site.i18n.menu.items -%}
{% comment %}
Algunos items del menú tienen layouts para indicar que
queremos el primero de esos artículos independientemente de
la URL.
XXX: Como las asignaciones sobreviven a este archivo hay que
convertirlas a nil cuando se las deja de usar.
{% endcomment %}
{%- if item.layout -%}
{%- assign post = site.posts | find: 'layout', item.layout -%}
{%- else -%}
{%- assign post = nil -%}
{%- endif -%}
{%- assign href = post.url | default: item.href -%}
{%- assign active = include.active_cache_key | equals: href -%}
<li class="nav-item">
<a data-target="menu.item" class="nav-link {{ active | ternary: 'active', '' }}" href="{{ href }}">
{{ item.title }}
{%- if active -%}
<span class="sr-only">
{{ site.i18n.menu.active | default: '(current)' }}
</span>
{%- endif -%}
</a>
</li>
{%- endfor -%}
</ul>
</nav>

View file

@ -35,8 +35,7 @@
{% feed_meta %}
</head>
<body>
{%- assign active_cache_key = page.url | menu_active_item | default: 'none' -%}
{%- include_cached navbar.html active_cache_key=active_cache_key %}
{%- include_cached menu.html active_cache_key=page.layout %}
<main data-controller="scroll">
{{ content }}