Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cover image #2

Open
1 of 2 tasks
dinever opened this issue Mar 26, 2016 · 5 comments
Open
1 of 2 tasks

Cover image #2

dinever opened this issue Mar 26, 2016 · 5 comments

Comments

@dinever
Copy link
Collaborator

dinever commented Mar 26, 2016

It would be great if we can implement a cover image field for each post.

  • Cover image text input field in editor page.
  • Drag & drop upload.
@dinever dinever mentioned this issue Apr 24, 2016
14 tasks
@TimothyYe
Copy link
Contributor

For this feature, should user upload cover image to server or just provide cover image URL from any other web sites?

@dinever
Copy link
Collaborator Author

dinever commented May 21, 2016

Hi @TimothyYe,

I think we can just add an input field in /view/admin/edit_post.html to indicate a cover image URL first, and implement a drag-and-drop upload feature later.

If you are interested in working on this one, you may find out that there is already an Image field in post.go#L43, and what we need to do is to add a line in post.go#L216 to read image link from form data:

p.Image = r.FormValue("image")

And also add an input field in /view/admin/edit_post.html like this:

<input class="mdl-textfield__input" type="url" name="image" id="image" value="{{ .Post.Image }}">

Thanks!

@TimothyYe
Copy link
Contributor

Sure, I'll take it and try to implement this feature.

@TimothyYe
Copy link
Contributor

TimothyYe commented May 23, 2016

@dinever Cover image URL now can be edited & saved in admin panel, I'll create a pull request later.

@dinever
Copy link
Collaborator Author

dinever commented May 23, 2016

@TimothyYe Great. Looking forward to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants