Documentation
¶
Overview ¶
Package partials hosts the repository-template-specific partials the M7 layout needs. They are NOT registered in the global classic partials registry — instead the parent repository package consumes them through the per-template lookup table in repository.go.
All four functions follow the M2 partial contract (nil-safe, XML-escaped, single-line SVG fragment string).
Index ¶
- func BaseActivity(_ context.Context, pc *templates.PartialContext) (string, error)
- func BaseCommunity(_ context.Context, pc *templates.PartialContext) (string, error)
- func BaseHeader(_ context.Context, pc *templates.PartialContext) (string, error)
- func Introduction(_ context.Context, pc *templates.PartialContext) (string, error)
- func Lookup(name string) (templates.PartialFunc, bool)
- func SetNow(now func() time.Time) func()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BaseActivity ¶
BaseActivity renders the recent commits / open issues / open PRs triple. Returns "" when data.Repo is nil OR the repo is archived AND has no activity to show.
func BaseCommunity ¶
BaseCommunity renders contributors / stargazers / forks counts. Returns "" when data.Repo is nil OR all counts are zero (so empty repos do not render a stray empty section).
func BaseHeader ¶
BaseHeader renders the upstream `base.header.ejs`-equivalent repo chrome: the repository name plus the two-column stats row (Created / Deployed / disk-usage on the left, the contribution mini-calendar / Environments on the right). Returns "" when data.Repo is nil so the dispatch path stays nil-safe. #464.
func Introduction ¶
Introduction surfaces the repo's about text + primary language / license badges. Returns "" when data.Repo is nil.
func Lookup ¶
func Lookup(name string) (templates.PartialFunc, bool)
Lookup returns the repository-template partial for the given name, or nil when none is owned by this package. Plugin partial names (`languages`, `activity`, etc.) are intentionally absent — the repository template's Run resolves those through the shared classic partials registry where the per-plugin packages already register them by name.
Types ¶
This section is empty.