Versions in this module Expand all Collapse all v0 v0.19.4 May 24, 2023 Changes in this version + var ErrTemplateNotInitialized = errors.New("template system is not initialized, check your log for errors") + func ActionContent2Commits(act Actioner) *repository.PushCommits + func ActionIcon(opType activities_model.ActionType) string + func AssetFS() *assetfs.LayeredFS + func Avatar(ctx context.Context, item interface{}, others ...interface{}) template.HTML + func AvatarByAction(ctx context.Context, action *activities_model.Action, others ...interface{}) template.HTML + func AvatarByEmail(ctx context.Context, email, name string, others ...interface{}) template.HTML + func AvatarHTML(src string, size int, class, name string) template.HTML + func BuiltinAssets() *assetfs.Layer + func CustomAssets() *assetfs.Layer + func DotEscape(raw string) string + func Eval(tokens ...any) (any, error) + func FilenameIsImage(filename string) bool + func HandleTemplateRenderingError(err error) string + func IsMultilineCommitMessage(msg string) bool + func ListMailTemplateAssetNames(assets *assetfs.LayeredFS) ([]string, error) + func ListWebTemplateAssetNames(assets *assetfs.LayeredFS) ([]string, error) + func Mailer(ctx context.Context) (*texttmpl.Template, *template.Template) + func MigrationIcon(hostname string) string + func NewFuncMap() template.FuncMap + func ReactionToEmoji(reaction string) template.HTML + func ReloadHTMLTemplates() error + func RenderCodeBlock(htmlEscapedTextToRender template.HTML) template.HTML + func RenderCommitBody(ctx context.Context, msg, urlPrefix string, metas map[string]string) template.HTML + func RenderCommitMessage(ctx context.Context, msg, urlPrefix string, metas map[string]string) template.HTML + func RenderCommitMessageLink(ctx context.Context, msg, urlPrefix, urlDefault string, ...) template.HTML + func RenderCommitMessageLinkSubject(ctx context.Context, msg, urlPrefix, urlDefault string, ...) template.HTML + func RenderEmoji(ctx context.Context, text string) template.HTML + func RenderIssueTitle(ctx context.Context, text, urlPrefix string, metas map[string]string) template.HTML + func RenderLabel(ctx context.Context, label *issues_model.Label) template.HTML + func RenderLabels(ctx context.Context, labels []*issues_model.Label, repoLink string) template.HTML + func RenderMarkdownToHtml(ctx context.Context, input string) template.HTML + func RenderNote(ctx context.Context, msg, urlPrefix string, metas map[string]string) template.HTML + func RepoAvatar(repo *repo_model.Repository, others ...interface{}) template.HTML + func Safe(raw string) template.HTML + func SortArrow(normSort, revSort, urlSort string, isDefault bool) template.HTML + func Str2html(raw string) template.HTML + func TabSizeClass(ec interface{}, filename string) string + type Actioner interface + GetActUserName func() string + GetBranch func() string + GetContent func() string + GetCreate func() time.Time + GetIssueInfos func() []string + GetOpType func() activities_model.ActionType + GetRepoLink func() string + GetRepoName func() string + GetRepoPath func() string + GetRepoUserName func() string + type HTMLRender struct + func HTMLRenderer() *HTMLRender + func (h *HTMLRender) CompileTemplates() error + func (h *HTMLRender) HTML(w io.Writer, status int, name string, data interface{}) error + func (h *HTMLRender) TemplateLookup(name string) (TemplateExecutor, error) + type JsonUtils struct + func NewJsonUtils() *JsonUtils + func (su *JsonUtils) EncodeToString(v any) string + func (su *JsonUtils) PrettyIndent(s string) string + type SliceUtils struct + func NewSliceUtils() *SliceUtils + func (su *SliceUtils) Contains(s, v any) bool + type StringUtils struct + func NewStringUtils() *StringUtils + func (su *StringUtils) Contains(s, substr string) bool + func (su *StringUtils) EllipsisString(s string, max int) string + func (su *StringUtils) HasPrefix(s, prefix string) bool + func (su *StringUtils) Join(a []string, sep string) string + func (su *StringUtils) Split(s, sep string) []string + type TemplateExecutor scopedtmpl.TemplateExecutor