// 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) {
name
size
last commit
author
date
for _, r := range p.Rows {
@TreeRowView(r)
}
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) {