// SPDX-License-Identifier: AGPL-3.0-or-later package web // Tree is a directory: the filter, the entries with their last commit, the // notes on what is left out, and the README of the directory below. templ Tree(l Layout, p TreePage) { @Shell(l, nil) {
for _, r := range p.Rows { @TreeRowView(r) }
namesizelast commitauthordate
if len(p.Rows) == 0 {

this directory is empty.

} for _, n := range p.Notes {

{ n }

} if p.Readme != nil {

{ p.Readme.Name }

@ReadmeView(*p.Readme) } } } // TreeRowView is one entry of a directory. Glyph: ▾ directory, @ symbolic // link, + submodule, · file. templ TreeRowView(r TreeRow) { { r.Glyph } if r.Href != "" { { r.Name } } else { { r.Name } } { r.Size } if r.CHref != "" { { r.Subject } } { r.Author } if r.WhenAt != "" { } }