common

package
v2.0.0-rc02 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//go:embed common.css
	Css string
	//go:embed common.js
	Js string
)
View Source
var (
	ParamDefaultSession = ParamStructSession{
		MdHost: "www.yourmom.com",

		PathSave:             session.PathSave,
		PathGetHtmlForFile:   session.PathGetHtmlForFile,
		PathGetLabelsForFile: session.PathGetLabelsForFile,
		PathRunBlock:         session.PathRunBlock,

		KeyMdFileIndex: session.KeyMdFileIndex,
		KeyBlockIndex:  session.KeyBlockIndex,
		KeyIsTitleOn:   session.KeyIsTitleOn,
		KeyIsNavOn:     session.KeyIsNavOn,
		KeyMdSessID:    session.KeyMdSessID,

		MdSessID: "notARealSessId",
	}
	ParamDefaultTransition = ParamStructTransition{
		TransitionSpeedMs: 250,
	}
)

Functions

func AsTmpl

func AsTmpl(name, body string) string

func MakeFuncMap

func MakeFuncMap() map[string]interface{}

MakeFuncMap makes a string to function map for use in Go template rendering.

func MustHtmlTemplate

func MustHtmlTemplate(s string) *htmlTmpl.Template

func MustRenderHtml

func MustRenderHtml(
	tmplBody string, values any, tmplName string) htmlTmpl.HTML

func ParseAsHtmlTemplate

func ParseAsHtmlTemplate(s string) (*htmlTmpl.Template, error)

func ParseAsTextTemplate

func ParseAsTextTemplate(s string) (*textTmpl.Template, error)

Types

type ParamStructSession

type ParamStructSession struct {
	MdHost string

	PathRunBlock         string
	PathSave             string
	PathGetHtmlForFile   string
	PathGetLabelsForFile string

	KeyMdSessID    string
	KeyMdFileIndex string
	KeyBlockIndex  string
	KeyIsTitleOn   string
	KeyIsNavOn     string

	MdSessID string
}

type ParamStructTransition

type ParamStructTransition struct {
	TransitionSpeedMs int
}

Jump to

Keyboard shortcuts

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