summaryrefslogtreecommitdiff
path: root/content/post.go
diff options
context:
space:
mode:
authorSteve <nilslice@gmail.com>2016-10-25 13:10:42 -0700
committerGitHub <noreply@github.com>2016-10-25 13:10:42 -0700
commit96ebcb095797fe4947d647ad1aa7572d84609fc0 (patch)
treee255fdf6dc7c923bd06a5b643c5094e8441ca17b /content/post.go
parent0ea5c73dad6f6c4508ba632c3c96d898f525b070 (diff)
parentc81783e87070340701a818eaae59f2304f982f3f (diff)
Merge pull request #10 from bosssauce/ponzu-dev
[core] Adding input func for Tags
Diffstat (limited to 'content/post.go')
-rw-r--r--content/post.go24
1 files changed, 10 insertions, 14 deletions
diff --git a/content/post.go b/content/post.go
index 7dc99c1..d121ed7 100644
--- a/content/post.go
+++ b/content/post.go
@@ -11,12 +11,12 @@ type Post struct {
Item
editor editor.Editor
- Title string `json:"title"`
- Content string `json:"content"`
- Photo string `json:"photo"`
- Author string `json:"author"`
- Category []string `json:"category"`
- ThemeStyle string `json:"theme"`
+ Title string `json:"title"`
+ Content string `json:"content"`
+ Photo string `json:"photo"`
+ Author string `json:"author"`
+ Category []string `json:"category"`
+ Theme string `json:"theme"`
}
func init() {
@@ -55,7 +55,7 @@ func (p *Post) MarshalEditor() ([]byte, error) {
}),
},
editor.Field{
- View: editor.File("Picture", p, map[string]string{
+ View: editor.File("Photo", p, map[string]string{
"label": "Author Photo",
"placeholder": "Upload a profile picture for the author",
}),
@@ -68,16 +68,12 @@ 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",
+ View: editor.Tags("Category", p, map[string]string{
+ "label": "Post Categories",
}),
},
editor.Field{
- View: editor.Select("ThemeStyle", p, map[string]string{
+ View: editor.Select("Theme", p, map[string]string{
"label": "Theme Style",
}, map[string]string{
"dark": "Dark",