From 1741c12bea2a4a65850bb5435b6e73ca5c11f462 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A1ssio=20Zen?= Date: Mon, 11 Jul 2016 18:57:54 -0300 Subject: [PATCH] First CardUI commit --- example/config.yml | 2 + example/index.html | 2 +- package.json | 1 + src/components/Cards.js | 11 ++++ src/components/Cards/AlltypeCard.js | 14 +++++ src/components/Cards/MediaCard.js | 16 ++++++ src/components/Cards/UnknownCard.js | 15 +++++ src/components/EntryListing.js | 87 +++++++++++++++++++++++++---- src/components/UI/card/Card.css | 1 + src/components/UI/card/Card.js | 4 +- src/components/stories/Card.js | 56 ++++++++----------- 11 files changed, 162 insertions(+), 47 deletions(-) create mode 100644 src/components/Cards.js create mode 100644 src/components/Cards/AlltypeCard.js create mode 100644 src/components/Cards/MediaCard.js create mode 100644 src/components/Cards/UnknownCard.js diff --git a/example/config.yml b/example/config.yml index 1e549f22..9f45f06d 100644 --- a/example/config.yml +++ b/example/config.yml @@ -17,6 +17,7 @@ collections: # A list of collections the CMS should be able to edit meta: - {label: "Publish Date", name: "date", widget: "datetime", format: "YYYY-MM-DD hh:mma"} - {label: "SEO Description", name: "description", widget: "text"} + card: {type: "media", media: "image", text: "title"} - name: "faq" # Used in routes, ie.: /admin/collections/:slug/edit label: "FAQ" # Used in the UI, ie.: "New Post" @@ -25,6 +26,7 @@ collections: # A list of collections the CMS should be able to edit fields: # The fields each document in this collection have - {label: "Question", name: "title", widget: "string", tagname: "h1"} - {label: "Answer", name: "body", widget: "markdown"} + card: {type: "alltype", text: "title"} - name: "settings" label: "Settings" diff --git a/example/index.html b/example/index.html index ea2ae7f7..1fa10126 100644 --- a/example/index.html +++ b/example/index.html @@ -4,7 +4,7 @@ This is an example - +