diff --git a/templates/header.shs b/templates/header.shs index fbd764c..4fbdea6 100644 --- a/templates/header.shs +++ b/templates/header.shs @@ -1,5 +1,7 @@ #!/bin/bash +declare -A strings_ + echo "
" # TODO: move this to a *real* template @@ -11,6 +13,10 @@ else echo "Logged in as ${cookies[username]} | Log out | Your feed | Your favourites" fi -strings[query_nice]="$query_nice" +if [[ "$query_nice" != '' ]]; then + strings_[query_nice]="$query_nice" +else + strings_[query_nice]='' +fi -render strings "${cfg[namespace]}/templates/themes/${cfg[template]}/elements/top.t" +render strings_ "${cfg[namespace]}/templates/themes/${cfg[template]}/elements/top.t"