Пример #1
0
func PlainMaster(c *twist.Context, id string) *PlainMaster_T {

	t := twist.GetTemplateByPath("html_master_plainMaster")
	t.Path = "html_master_plainMaster"
	t.Writer = c.Writer
	t.Id = id

	c.Writer.RegisterTemplate(t)

	v1 := twist.NewItemId("div", t, c.Writer, "Navigation", map[string]string{}, map[string]string{}, []*twist.Item{})
	v2 := twist.NewTextItem(`` + "\n" + ``)
	v4 := twist.NewTextItem(`Plain page`)
	v3 := twist.NewItemId("h1", t, c.Writer, "Header", map[string]string{}, map[string]string{}, []*twist.Item{v4})
	v5 := twist.NewTextItem(`` + "\n" + ``)
	v6 := twist.NewItemId("div", t, c.Writer, "Content", map[string]string{}, map[string]string{}, []*twist.Item{})
	v7 := twist.NewTextItem(`` + "\n" + ``)
	v8 := twist.NewItemId("div", t, c.Writer, "Footer", map[string]string{}, map[string]string{" background-color": "#000000", " font-weight": "bold", "color": "#ffffff", " padding": "5px"}, []*twist.Item{})

	t.Contents = []*twist.Item{v1, v2, v3, v5, v6, v7, v8}

	return &PlainMaster_T{
		name:     t.Name,
		Template: t,

		Navigation: v1,

		Header: v3,

		Content: v6,

		Footer: v8,
	}
}
Пример #2
0
func Plain1(c *twist.Context, id string) *Plain1_T {

	t := twist.GetTemplateByPath("html_content_plain1")
	t.Path = "html_content_plain1"
	t.Writer = c.Writer
	t.Id = id

	c.Writer.RegisterTemplate(t)

	v2 := twist.NewTextItem(`` + "\n" + `	This is a page using the plain_template.html file.` + "\n" + ``)
	v1 := twist.NewItem("p", map[string]string{}, map[string]string{}, []*twist.Item{v2})
	v3 := twist.NewTextItem(`` + "\n" + ``)
	v5 := twist.NewTextItem(`` + "\n" + `	Here's a counter:` + "\n" + ``)
	v4 := twist.NewItem("p", map[string]string{}, map[string]string{}, []*twist.Item{v5})
	v6 := twist.NewTextItem(`` + "\n" + ``)
	v8 := twist.NewTextItem(`` + "\n" + `	0` + "\n" + ``)
	v7 := twist.NewItemId("h1", t, c.Writer, "Output", map[string]string{}, map[string]string{}, []*twist.Item{v8})
	v9 := twist.NewTextItem(`` + "\n" + ``)
	v17 := twist.NewTextItem(`` + "\n" + ``)
	v16 := twist.NewTextItem(`minus`)
	v15 := twist.NewItemId("a", t, c.Writer, "Minus", map[string]string{"href": "#"}, map[string]string{}, []*twist.Item{v16})
	v14 := twist.NewTextItem(` or `)
	v13 := twist.NewTextItem(`plus`)
	v12 := twist.NewItemId("a", t, c.Writer, "Plus", map[string]string{"href": "#"}, map[string]string{}, []*twist.Item{v13})
	v11 := twist.NewTextItem(`` + "\n" + `	Click `)
	v10 := twist.NewItem("p", map[string]string{}, map[string]string{}, []*twist.Item{v11, v12, v14, v15, v17})
	v18 := twist.NewTextItem(`` + "\n" + ``)
	v19 := twist.NewItemId("input", t, c.Writer, "Count", map[string]string{"type": "hidden"}, map[string]string{}, []*twist.Item{})

	t.Contents = []*twist.Item{v1, v3, v4, v6, v7, v9, v10, v18, v19}

	return &Plain1_T{
		name:     t.Name,
		Template: t,

		Output: v7,

		Plus: v12,

		Minus: v15,

		Count: v19,
	}
}
Пример #3
0
func RedMaster(c *twist.Context, id string) *RedMaster_T {

	t := twist.GetTemplateByPath("html_master_redMaster")
	t.Path = "html_master_redMaster"
	t.Writer = c.Writer
	t.Id = id

	c.Writer.RegisterTemplate(t)

	v1 := twist.NewItemId("div", t, c.Writer, "Navigation", map[string]string{}, map[string]string{}, []*twist.Item{})
	v2 := twist.NewTextItem(`` + "\n" + ``)
	v4 := twist.NewTextItem(`Red page`)
	v3 := twist.NewItemId("h1", t, c.Writer, "Header", map[string]string{}, map[string]string{}, []*twist.Item{v4})
	v5 := twist.NewTextItem(`` + "\n" + ``)
	v11 := twist.NewTextItem(`` + "\n" + ``)
	v10 := twist.NewItemId("span", t, c.Writer, "Date", map[string]string{}, map[string]string{}, []*twist.Item{})
	v9 := twist.NewTextItem(` @ `)
	v8 := twist.NewItemId("span", t, c.Writer, "Location", map[string]string{}, map[string]string{}, []*twist.Item{})
	v7 := twist.NewTextItem(`` + "\n" + `	`)
	v6 := twist.NewItemId("div", t, c.Writer, "Topper", map[string]string{}, map[string]string{"background-color": "#cc0000", " color": "#ffffff", " font-weight": "bold", " padding": "5px"}, []*twist.Item{v7, v8, v9, v10, v11})
	v12 := twist.NewTextItem(`` + "\n" + ``)
	v13 := twist.NewItemId("div", t, c.Writer, "Content", map[string]string{}, map[string]string{}, []*twist.Item{})
	v14 := twist.NewTextItem(`` + "\n" + ``)
	v15 := twist.NewItemId("div", t, c.Writer, "Footer", map[string]string{}, map[string]string{" background-color": "#cc0000", " font-weight": "bold", "color": "#ffffff", " padding": "5px"}, []*twist.Item{})

	t.Contents = []*twist.Item{v1, v2, v3, v5, v6, v12, v13, v14, v15}

	return &RedMaster_T{
		name:     t.Name,
		Template: t,

		Navigation: v1,

		Header: v3,

		Topper: v6,

		Location: v8,

		Date: v10,

		Content: v13,

		Footer: v15,
	}
}
Пример #4
0
func Navigation(c *twist.Context, id string) *Navigation_T {

	t := twist.GetTemplateByPath("html_misc_navigation")
	t.Path = "html_misc_navigation"
	t.Writer = c.Writer
	t.Id = id

	c.Writer.RegisterTemplate(t)

	v20 := twist.NewTextItem(`` + "\n" + ``)
	v19 := twist.NewTextItem(`Red page 3`)
	v18 := twist.NewItemId("a", t, c.Writer, "red3Link", map[string]string{}, map[string]string{}, []*twist.Item{v19})
	v17 := twist.NewTextItem(` |` + "\n" + `	`)
	v16 := twist.NewTextItem(`Red page 2`)
	v15 := twist.NewItemId("a", t, c.Writer, "red2Link", map[string]string{}, map[string]string{}, []*twist.Item{v16})
	v14 := twist.NewTextItem(` |` + "\n" + `	`)
	v13 := twist.NewTextItem(`Red page 1`)
	v12 := twist.NewItemId("a", t, c.Writer, "red1Link", map[string]string{}, map[string]string{}, []*twist.Item{v13})
	v11 := twist.NewTextItem(` |` + "\n" + `	`)
	v10 := twist.NewTextItem(`Plain page 3`)
	v9 := twist.NewItemId("a", t, c.Writer, "plain3Link", map[string]string{}, map[string]string{}, []*twist.Item{v10})
	v8 := twist.NewTextItem(` |` + "\n" + `	`)
	v7 := twist.NewTextItem(`Plain page 2`)
	v6 := twist.NewItemId("a", t, c.Writer, "plain2Link", map[string]string{}, map[string]string{}, []*twist.Item{v7})
	v5 := twist.NewTextItem(` |` + "\n" + `	`)
	v4 := twist.NewTextItem(`Plain page 1`)
	v3 := twist.NewItemId("a", t, c.Writer, "plain1Link", map[string]string{}, map[string]string{}, []*twist.Item{v4})
	v2 := twist.NewTextItem(`` + "\n" + `	`)
	v1 := twist.NewItem("div", map[string]string{}, map[string]string{" padding": " 5px"}, []*twist.Item{v2, v3, v5, v6, v8, v9, v11, v12, v14, v15, v17, v18, v20})

	t.Contents = []*twist.Item{v1}

	return &Navigation_T{
		name:     t.Name,
		Template: t,

		Plain1Link: v3,

		Plain2Link: v6,

		Plain3Link: v9,

		Red1Link: v12,

		Red2Link: v15,

		Red3Link: v18,
	}
}