pkg

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FuncMap = template.FuncMap{
	"noescape": func(s string) template.HTML {
		return template.HTML(s)
	},
	"formatTime": func(t time.Time, layout string) string {
		return t.Format(layout)
	},
	"tagStyle": func(count int) string {
		var size string
		if count >= 11 {
			size = "60px"
		} else if count == 10 {
			size = "55px"
		} else if count == 9 {
			size = "50px"
		} else if count == 8 {
			size = "45px"
		} else if count == 7 {
			size = "40px"
		} else if count == 6 {
			size = "35px"
		} else if count == 5 {
			size = "30px"
		} else if count == 4 {
			size = "25px"
		} else if count == 3 {
			size = "20px"
		} else if count == 2 {
			size = "15px"
		} else {
			size = "12px"
		}
		return fmt.Sprintf("font-size:%s", size)
	},
}

Functions

func AdminRender

func AdminRender(data map[string]interface{}, c *artgo.Context, template string)

func Render

func Render(data map[string]interface{}, c *artgo.Context, tpl string)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL