package html import "fmt" type RepoFileContext struct { BaseContext RepoHeaderComponentContext RepoBreadcrumbComponentContext Code string Commit string Path string } func (rfc RepoFileContext) Permalink() string { return fmt.Sprintf("/%s/tree/%s/%s", rfc.RepoBreadcrumbComponentContext.Repo, rfc.Commit, rfc.Path) } templ RepoFile(rfc RepoFileContext) { @base(rfc.BaseContext) { @repoHeaderComponent(rfc.RepoHeaderComponentContext)
@repoBreadcrumbComponent(rfc.RepoBreadcrumbComponentContext) { " - " } raw { " - " }
@templ.Raw(rfc.Code)
} }