diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-10-10 00:05:46 -0700 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-10-10 00:05:46 -0700 |
commit | 414c5707e046b81d65209c0291bbbe5ab14fe0d5 (patch) | |
tree | 5bc2c792c2f28ee5f459ec1857c52126f21a8a54 | |
parent | f04b1f75f8e18bac2df5ad48c69055bac929e479 (diff) |
updating some defaults
-rw-r--r-- | cmd/ponzu/options.go | 9 | ||||
-rw-r--r-- | content/post.go | 5 | ||||
-rw-r--r-- | management/editor/elements.go | 2 |
3 files changed, 11 insertions, 5 deletions
diff --git a/cmd/ponzu/options.go b/cmd/ponzu/options.go index 8f33a78..19b61bb 100644 --- a/cmd/ponzu/options.go +++ b/cmd/ponzu/options.go @@ -75,6 +75,7 @@ type {{ .name }} struct { Title string ` + "`json:" + `"title"` + "`" + ` Content string ` + "`json:" + `"content"` + "`" + ` Author string ` + "`json:" + `"author"` + "`" + ` + Picture string ` + "`json:" + `"picture"` + "`" + ` Category []string ` + "`json:" + `"category"` + "`" + ` ThemeStyle string ` + "`json:" + `"theme"` + "`" + ` } @@ -113,7 +114,7 @@ func ({{ .initial }} *{{ .name }}) MarshalEditor() ([]byte, error) { }), }, editor.Field{ - View: editor.Textarea("Content", {{ .initial }}, map[string]string{ + View: editor.Richtext("Content", {{ .initial }}, map[string]string{ "label": "Content", "placeholder": "Add the content of your {{ .name }} here", }), @@ -126,6 +127,12 @@ func ({{ .initial }} *{{ .name }}) MarshalEditor() ([]byte, error) { }), }, editor.Field{ + View: editor.File("Picture", {{ .initial }}, map[string]string{ + "label": "Author Photo", + "placeholder": "Upload a profile picture for the author", + }), + }, + editor.Field{ View: editor.Checkbox("Category", {{ .initial }}, map[string]string{ "label": "{{ .name }} Category", }, map[string]string{ diff --git a/content/post.go b/content/post.go index e08106c..7dc99c1 100644 --- a/content/post.go +++ b/content/post.go @@ -55,10 +55,9 @@ func (p *Post) MarshalEditor() ([]byte, error) { }), }, editor.Field{ - View: editor.File("Photo", p, map[string]string{ + View: editor.File("Picture", p, map[string]string{ "label": "Author Photo", - "type": "file", - "placeholder": "Select a file to upload.", + "placeholder": "Upload a profile picture for the author", }), }, editor.Field{ diff --git a/management/editor/elements.go b/management/editor/elements.go index 5667faa..e8a2fab 100644 --- a/management/editor/elements.go +++ b/management/editor/elements.go @@ -52,7 +52,7 @@ func File(fieldName string, p interface{}, attrs map[string]string) []byte { <input class="upload" type="file"> </div> <div class="file-path-wrapper"> - <input class="file-path validate" type="text"> + <input class="file-path validate" placeholder="` + attrs["label"] + `" type="text"> </div> </div> <div class="preview"><div class="img-clip"></div></div> |