fix: guard len images for video-only projects

This commit is contained in:
2026-06-29 12:03:36 +02:00
parent 8ecb63b24e
commit 8bd3e6449b
+1 -1
View File
@@ -7,7 +7,7 @@
{{ if or $images $hasText $video }}
<div class="tui tui--files filebrowser">
<p class="tui__cmd"><span class="tui__sym">$</span> ls</p>
{{ $total := len $images }}{{ if $hasText }}{{ $total = add $total 1 }}{{ end }}{{ if $video }}{{ $total = add $total 1 }}{{ end }}
{{ $total := 0 }}{{ if $images }}{{ $total = len $images }}{{ end }}{{ if $hasText }}{{ $total = add $total 1 }}{{ end }}{{ if $video }}{{ $total = add $total 1 }}{{ end }}
<p class="tui__cmd tui__total">total {{ $total }}</p>
<ul class="tui__ls">
<li><a href="{{ "/portfolio/" | relURL }}" data-name="..">