summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-09-30 20:11:28 -0400
committerSteve Manuel <nilslice@gmail.com>2016-09-30 20:11:28 -0400
commit43c77865f82fefffbb89ccfb599dfa1e9c6c8f31 (patch)
tree6c2e76ff83477f27d775a461c7a1b45c37958f73 /content
parentf2a151f2696e92d27f1e674bc02850dff7d3cd3c (diff)
updating generated content types to include more built-in input function examples (+ Select, Checkbox)
Diffstat (limited to 'content')
-rw-r--r--content/post.go27
1 files changed, 23 insertions, 4 deletions
diff --git a/content/post.go b/content/post.go
index b12eb1d..5b98253 100644
--- a/content/post.go
+++ b/content/post.go
@@ -11,10 +11,12 @@ type Post struct {
Item
editor editor.Editor
- Title string `json:"title"`
- Content string `json:"content"`
- Author string `json:"author"`
- Timestamp string `json:"timestamp"`
+ Title string `json:"title"`
+ Content string `json:"content"`
+ Author string `json:"author"`
+ Category []string `json:"category"`
+ ThemeStyle string `json:"theme"`
+ Timestamp string `json:"timestamp"`
}
func init() {
@@ -68,6 +70,23 @@ func (p *Post) MarshalEditor() ([]byte, error) {
}),
},
editor.Field{
+ View: editor.Checkbox("Category", p, map[string]string{
+ "label": "Post Category",
+ }, map[string]string{
+ "important": "Important",
+ "active": "Active",
+ "unplanned": "Unplanned",
+ }),
+ },
+ editor.Field{
+ View: editor.Select("ThemeStyle", p, map[string]string{
+ "label": "Theme Style",
+ }, map[string]string{
+ "dark": "Dark",
+ "light": "Light",
+ }),
+ },
+ editor.Field{
View: editor.Input("Timestamp", p, map[string]string{
"label": "Publish Date",
"type": "date",