From 5ebbfe681929e6ef8ed54e32c3df5bd42a746c41 Mon Sep 17 00:00:00 2001 From: Jonathan Dahan Date: Wed, 15 May 2024 00:58:54 -0400 Subject: [PATCH] cleanup active class generation --- .zs/active | 3 +-- .zs/layout.html | 26 +++++++++++++++----------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/.zs/active b/.zs/active index 47ea8dc..f9b012c 100755 --- a/.zs/active +++ b/.zs/active @@ -1,5 +1,4 @@ #!/bin/sh # sets the 'active' class on an item if the url matches the directory -urlpath=$(dirname "$ZS_URL") -test "$1" = $urlpath && printf "active" || true +if [ "$(dirname "$ZS_URL")" = $1 ]; then printf ' class=active' ''; fi diff --git a/.zs/layout.html b/.zs/layout.html index 9d37b6b..7ab9660 100644 --- a/.zs/layout.html +++ b/.zs/layout.html @@ -1,15 +1,19 @@ - +
+ +
+
{{ content }} +