Exemplo n.º 1
0
func allCSS(c common.Context) {
	c.SetContentType("text/css; charset=UTF-8", true)
	renderText(c, cssTemplates, "bootstrap.min.css")
	renderText(c, cssTemplates, "bootstrap-theme.min.css")
	renderText(c, cssTemplates, "bootstrap-multiselect.css")
	renderText(c, cssTemplates, "common.css")
}
Exemplo n.º 2
0
func allJS(c common.Context) {
	c.SetContentType("application/javascript; charset=UTF-8", true)
	renderText(c, jsTemplates, "jquery-2.0.3.min.js")
	renderText(c, jsTemplates, "underscore-min.js")
	renderText(c, jsTemplates, "backbone-min.js")
	renderText(c, jsTemplates, "bootstrap.min.js")
	renderText(c, jsTemplates, "bootstrap-multiselect.js")
	renderText(c, jsTemplates, "viz.js")
	renderText(c, jsTemplates, "tinycolor.js")
	render_Templates(c)
	for _, templ := range jsModelTemplates.Templates() {
		if err := templ.Execute(c.Resp, c); err != nil {
			panic(err)
		}
	}
	for _, templ := range jsCollectionTemplates.Templates() {
		if err := templ.Execute(c.Resp, c); err != nil {
			panic(err)
		}
	}
	for _, templ := range jsViewTemplates.Templates() {
		if err := templ.Execute(c.Resp, c); err != nil {
			panic(err)
		}
	}
	renderText(c, jsTemplates, "app.js")
}
Exemplo n.º 3
0
func index(c common.Context) {
	c.SetContentType("text/html; charset=UTF-8", false)
	renderText(c, htmlTemplates, "index.html")
}