feat(media): add external media library support, Uploadcare integration (#1602)
This commit is contained in:
@ -2,9 +2,9 @@ backend:
|
||||
name: test-repo
|
||||
|
||||
display_url: https://example.com
|
||||
media_folder: "assets/uploads"
|
||||
|
||||
publish_mode: editorial_workflow
|
||||
media_folder: assets/uploads
|
||||
|
||||
collections: # A list of collections the CMS should be able to edit
|
||||
- name: "posts" # Used in routes, ie.: /admin/collections/:slug/edit
|
||||
@ -19,7 +19,12 @@ collections: # A list of collections the CMS should be able to edit
|
||||
fields: # The fields each document in this collection have
|
||||
- {label: "Title", name: "title", widget: "string", tagname: "h1"}
|
||||
- {label: "Publish Date", name: "date", widget: "datetime", format: "YYYY-MM-DD hh:mma"}
|
||||
- {label: "Cover Image", name: "image", widget: "image", required: false, tagname: ""}
|
||||
- label: "Cover Image"
|
||||
name: "image"
|
||||
widget: "image"
|
||||
required: false
|
||||
tagname: ""
|
||||
|
||||
- {label: "Body", name: "body", widget: "markdown", hint: "Main content goes here."}
|
||||
meta:
|
||||
- {label: "SEO Description", name: "description", widget: "text"}
|
||||
|
@ -83,12 +83,10 @@
|
||||
var PostPreview = createClass({
|
||||
render: function() {
|
||||
var entry = this.props.entry;
|
||||
var image = entry.getIn(['data', 'image']);
|
||||
var bg = image && this.props.getAsset(image);
|
||||
return h('div', {},
|
||||
h('div', {className: "cover"},
|
||||
h('h1', {}, entry.getIn(['data', 'title'])),
|
||||
bg ? h('img', {src: bg.toString()}) : null
|
||||
this.props.widgetFor('image'),
|
||||
),
|
||||
h('p', {},
|
||||
h('small', {}, "Written " + entry.getIn(['data', 'date']))
|
||||
|
Reference in New Issue
Block a user