highlight projects in sidebar on project pages

This commit is contained in:
Lynne Megido 2024-08-28 13:02:20 +10:00
parent 0e041aa4e7
commit dbf43952ea
Signed by: lynnesbian
GPG key ID: F0A184B5213D9F90
2 changed files with 2 additions and 2 deletions

View file

@ -34,7 +34,7 @@
<a href='/' {%- if page.title == "Home" %} class='current'{% endif -%}>Home</a>
{%- for html_page in site.content -%}
{%- unless html_page.title == 'Home' -%}
<a href='{{ html_page.url }}' {%- if page.title == html_page.title %} class='current'{% endif -%}>
<a href='{{ html_page.url }}' {%- if page.title == html_page.title or layout.sidebar_title == html_page.title %} class='current'{% endif -%}>
{{ html_page.title }}
</a>
{%- endunless -%}

View file

@ -1,7 +1,7 @@
---
layout: default
sidebar_title: Projects
---
{% comment %}<h1>{{ page.name }}</h1>{% endcomment %}
<div class='subheading-links'>
{% if page.source %}<a href='{{ page.source }}'>Source code</a>{% endif %}
{% if page.website %}<a href='{{ page.website }}'>Website</a>{% endif %}