Beispiel #1
0
func css(action *parse.Action) string {
	ws := action.Whitespace()
	s := ""
	for _, v := range action.Content {
		s += ws + "%link[rel=stylesheet][href=\"" + string(action.Args) + string(v) + "\"]\n"
	}
	return s
}
Beispiel #2
0
func js(action *parse.Action) string {
	ws := action.Whitespace()
	s := ""
	for _, v := range action.Content {
		s += ws + "%script[type=\"text/javascript\"][src=\"" + string(action.Args) + string(v) + "\"]\n"
	}
	return s
}
Beispiel #3
0
func include(action *parse.Action) string {
	ws := action.Whitespace()
	bytes := open(string(action.Args), TemplateDir)
	s := strings.Split(string(bytes), "\n")
	for i, l := range s {
		s[i] = ws + l
	}
	return strings.Join(s, "\n")
}