diff --git a/css/daux-blue.css b/css/daux-blue.css index 71f1223..ed2d61e 100644 --- a/css/daux-blue.css +++ b/css/daux-blue.css @@ -6286,7 +6286,164 @@ pre { padding: 0; } /* =========================================================================================== -Body & Page Structure +Homepage +============================================================================================== */ +.homepage-hero { + padding-top: 50px !important; + background-color: #82becd; + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; + border: none; + color: #3f4657; + overflow: hidden; +} +@media (max-width: 767px) { + .homepage-hero { + padding-top: 0px !important; + } +} +.homepage-hero .text-center { + font-family: 'Roboto Slab', serif; + font-weight: 700; + margin: 10px 0px; +} +.homepage-hero h2 { + margin: 20px 0px; +} +.homepage-hero .homepage-image { + -moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); + -webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); +} +.hero-buttons.container-fluid { + padding: 20px 0px; + background-color: #c5c5cb; +} +.hero-buttons.container-fluid .btn-hero.btn { + font-family: 'Roboto Slab', serif; + font-weight: 700; + padding: 20px 30px; + background-image: none; + -ms-filter: none; + filter: none; + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; + text-shadow: none; + border: none; + -moz-opacity: 0.8; + -khtml-opacity: 0.8; + -webkit-opacity: 0.8; + opacity: 0.8; + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(opacity=80); + filter: alpha(opacity=80); + margin: 0px 10px; + text-transform: uppercase; + border: 5px solid #3f4657; +} +@media (max-width: 767px) { + .hero-buttons.container-fluid .btn-hero.btn { + display: block; + margin-bottom: 10px; + } +} +.hero-buttons.container-fluid .btn-hero.btn:hover { + -moz-opacity: 1; + -khtml-opacity: 1; + -webkit-opacity: 1; + opacity: 1; + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); + filter: alpha(opacity=100); +} +.hero-buttons.container-fluid .btn-hero.btn.btn-secondary { + background-color: #c5c5cb; + color: #3f4657; +} +.hero-buttons.container-fluid .btn-hero.btn.btn-primary { + background-color: #3f4657; + color: #f7f7f7; +} +.homepage-content.container-fluid { + background-color: white; + padding: 40px 0px; +} +.homepage-content.container-fluid .lead { + font-family: 'Roboto Slab', serif; + font-weight: 400; +} +.homepage-content.container-fluid ul, +.homepage-content.container-fluid ol { + padding: 20px 0px; + margin: 0 0 10px 0px; +} +.homepage-content.container-fluid ul li, +.homepage-content.container-fluid ol li { + list-style: none; + padding-bottom: 5px; +} +.homepage-content.container-fluid ul li:before, +.homepage-content.container-fluid ol li:before { + content: ''; + width: 0px; + height: 0px; + border: 3px solid transparent; + border-left: 3px solid #82becd; + float: left; + display: block; + margin: 6px; +} +@media (max-width: 767px) { + .homepage-content.container-fluid { + padding: 40px 20px; + } +} +.homepage-footer.container-fluid { + background-color: #3f4657; + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; + color: light; + border: none; +} +@media (max-width: 767px) { + .homepage-footer.container-fluid { + padding: 0 20px; + } +} +.homepage-footer.container-fluid .footer-nav { + margin: 40px 0px; +} +.homepage-footer.container-fluid .footer-nav li { + list-style: none; +} +.homepage-footer.container-fluid .footer-nav li a { + font-family: 'Roboto Slab', serif; + font-weight: 700; + font-size: 16px; + line-height: 32px; +} +.homepage-footer.container-fluid .footer-nav li a:hover { + color: #82becd; + text-decoration: underline; +} +.homepage-footer.container-fluid .twitter { + margin-top: 20px; +} +.homepage-footer.container-fluid .twitter:first-child { + margin-top: 40px; +} +/* =========================================================================================== +Docs Body & Page Structure ============================================================================================== */ html, body { @@ -6298,12 +6455,14 @@ body { } .container-fluid { margin: 0 auto; - height: 100%; padding: 0; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } +.container-fluid.fluid-height { + height: 100%; +} .columns { height: 100%; } diff --git a/css/daux-green.css b/css/daux-green.css index 80d8387..db0f7b3 100644 --- a/css/daux-green.css +++ b/css/daux-green.css @@ -6286,7 +6286,164 @@ pre { padding: 0; } /* =========================================================================================== -Body & Page Structure +Homepage +============================================================================================== */ +.homepage-hero { + padding-top: 50px !important; + background-color: #8acc37; + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; + border: none; + color: #000000; + overflow: hidden; +} +@media (max-width: 767px) { + .homepage-hero { + padding-top: 0px !important; + } +} +.homepage-hero .text-center { + font-family: 'Roboto Slab', serif; + font-weight: 700; + margin: 10px 0px; +} +.homepage-hero h2 { + margin: 20px 0px; +} +.homepage-hero .homepage-image { + -moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); + -webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); +} +.hero-buttons.container-fluid { + padding: 20px 0px; + background-color: #a0d55d; +} +.hero-buttons.container-fluid .btn-hero.btn { + font-family: 'Roboto Slab', serif; + font-weight: 700; + padding: 20px 30px; + background-image: none; + -ms-filter: none; + filter: none; + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; + text-shadow: none; + border: none; + -moz-opacity: 0.8; + -khtml-opacity: 0.8; + -webkit-opacity: 0.8; + opacity: 0.8; + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(opacity=80); + filter: alpha(opacity=80); + margin: 0px 10px; + text-transform: uppercase; + border: 5px solid #000000; +} +@media (max-width: 767px) { + .hero-buttons.container-fluid .btn-hero.btn { + display: block; + margin-bottom: 10px; + } +} +.hero-buttons.container-fluid .btn-hero.btn:hover { + -moz-opacity: 1; + -khtml-opacity: 1; + -webkit-opacity: 1; + opacity: 1; + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); + filter: alpha(opacity=100); +} +.hero-buttons.container-fluid .btn-hero.btn.btn-secondary { + background-color: #a0d55d; + color: #000000; +} +.hero-buttons.container-fluid .btn-hero.btn.btn-primary { + background-color: #000000; + color: #f5f5f6; +} +.homepage-content.container-fluid { + background-color: white; + padding: 40px 0px; +} +.homepage-content.container-fluid .lead { + font-family: 'Roboto Slab', serif; + font-weight: 400; +} +.homepage-content.container-fluid ul, +.homepage-content.container-fluid ol { + padding: 20px 0px; + margin: 0 0 10px 0px; +} +.homepage-content.container-fluid ul li, +.homepage-content.container-fluid ol li { + list-style: none; + padding-bottom: 5px; +} +.homepage-content.container-fluid ul li:before, +.homepage-content.container-fluid ol li:before { + content: ''; + width: 0px; + height: 0px; + border: 3px solid transparent; + border-left: 3px solid #8acc37; + float: left; + display: block; + margin: 6px; +} +@media (max-width: 767px) { + .homepage-content.container-fluid { + padding: 40px 20px; + } +} +.homepage-footer.container-fluid { + background-color: #000000; + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; + color: light; + border: none; +} +@media (max-width: 767px) { + .homepage-footer.container-fluid { + padding: 0 20px; + } +} +.homepage-footer.container-fluid .footer-nav { + margin: 40px 0px; +} +.homepage-footer.container-fluid .footer-nav li { + list-style: none; +} +.homepage-footer.container-fluid .footer-nav li a { + font-family: 'Roboto Slab', serif; + font-weight: 700; + font-size: 16px; + line-height: 32px; +} +.homepage-footer.container-fluid .footer-nav li a:hover { + color: #8acc37; + text-decoration: underline; +} +.homepage-footer.container-fluid .twitter { + margin-top: 20px; +} +.homepage-footer.container-fluid .twitter:first-child { + margin-top: 40px; +} +/* =========================================================================================== +Docs Body & Page Structure ============================================================================================== */ html, body { @@ -6298,12 +6455,14 @@ body { } .container-fluid { margin: 0 auto; - height: 100%; padding: 0; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } +.container-fluid.fluid-height { + height: 100%; +} .columns { height: 100%; } diff --git a/css/daux-navy.css b/css/daux-navy.css index dc19aa2..0fa72fc 100644 --- a/css/daux-navy.css +++ b/css/daux-navy.css @@ -6286,7 +6286,164 @@ pre { padding: 0; } /* =========================================================================================== -Body & Page Structure +Homepage +============================================================================================== */ +.homepage-hero { + padding-top: 50px !important; + background-color: #7795b4; + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; + border: none; + color: #13132a; + overflow: hidden; +} +@media (max-width: 767px) { + .homepage-hero { + padding-top: 0px !important; + } +} +.homepage-hero .text-center { + font-family: 'Roboto Slab', serif; + font-weight: 700; + margin: 10px 0px; +} +.homepage-hero h2 { + margin: 20px 0px; +} +.homepage-hero .homepage-image { + -moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); + -webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); +} +.hero-buttons.container-fluid { + padding: 20px 0px; + background-color: #c5c5cb; +} +.hero-buttons.container-fluid .btn-hero.btn { + font-family: 'Roboto Slab', serif; + font-weight: 700; + padding: 20px 30px; + background-image: none; + -ms-filter: none; + filter: none; + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; + text-shadow: none; + border: none; + -moz-opacity: 0.8; + -khtml-opacity: 0.8; + -webkit-opacity: 0.8; + opacity: 0.8; + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(opacity=80); + filter: alpha(opacity=80); + margin: 0px 10px; + text-transform: uppercase; + border: 5px solid #13132a; +} +@media (max-width: 767px) { + .hero-buttons.container-fluid .btn-hero.btn { + display: block; + margin-bottom: 10px; + } +} +.hero-buttons.container-fluid .btn-hero.btn:hover { + -moz-opacity: 1; + -khtml-opacity: 1; + -webkit-opacity: 1; + opacity: 1; + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); + filter: alpha(opacity=100); +} +.hero-buttons.container-fluid .btn-hero.btn.btn-secondary { + background-color: #c5c5cb; + color: #13132a; +} +.hero-buttons.container-fluid .btn-hero.btn.btn-primary { + background-color: #13132a; + color: #f5f5f6; +} +.homepage-content.container-fluid { + background-color: white; + padding: 40px 0px; +} +.homepage-content.container-fluid .lead { + font-family: 'Roboto Slab', serif; + font-weight: 400; +} +.homepage-content.container-fluid ul, +.homepage-content.container-fluid ol { + padding: 20px 0px; + margin: 0 0 10px 0px; +} +.homepage-content.container-fluid ul li, +.homepage-content.container-fluid ol li { + list-style: none; + padding-bottom: 5px; +} +.homepage-content.container-fluid ul li:before, +.homepage-content.container-fluid ol li:before { + content: ''; + width: 0px; + height: 0px; + border: 3px solid transparent; + border-left: 3px solid #7795b4; + float: left; + display: block; + margin: 6px; +} +@media (max-width: 767px) { + .homepage-content.container-fluid { + padding: 40px 20px; + } +} +.homepage-footer.container-fluid { + background-color: #13132a; + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; + color: light; + border: none; +} +@media (max-width: 767px) { + .homepage-footer.container-fluid { + padding: 0 20px; + } +} +.homepage-footer.container-fluid .footer-nav { + margin: 40px 0px; +} +.homepage-footer.container-fluid .footer-nav li { + list-style: none; +} +.homepage-footer.container-fluid .footer-nav li a { + font-family: 'Roboto Slab', serif; + font-weight: 700; + font-size: 16px; + line-height: 32px; +} +.homepage-footer.container-fluid .footer-nav li a:hover { + color: #7795b4; + text-decoration: underline; +} +.homepage-footer.container-fluid .twitter { + margin-top: 20px; +} +.homepage-footer.container-fluid .twitter:first-child { + margin-top: 40px; +} +/* =========================================================================================== +Docs Body & Page Structure ============================================================================================== */ html, body { @@ -6298,12 +6455,14 @@ body { } .container-fluid { margin: 0 auto; - height: 100%; padding: 0; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } +.container-fluid.fluid-height { + height: 100%; +} .columns { height: 100%; } diff --git a/css/daux-red.css b/css/daux-red.css index e8a8900..52f00b3 100644 --- a/css/daux-red.css +++ b/css/daux-red.css @@ -6286,7 +6286,164 @@ pre { padding: 0; } /* =========================================================================================== -Body & Page Structure +Homepage +============================================================================================== */ +.homepage-hero { + padding-top: 50px !important; + background-color: #ecb5a1; + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; + border: none; + color: #c64641; + overflow: hidden; +} +@media (max-width: 767px) { + .homepage-hero { + padding-top: 0px !important; + } +} +.homepage-hero .text-center { + font-family: 'Roboto Slab', serif; + font-weight: 700; + margin: 10px 0px; +} +.homepage-hero h2 { + margin: 20px 0px; +} +.homepage-hero .homepage-image { + -moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); + -webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); +} +.hero-buttons.container-fluid { + padding: 20px 0px; + background-color: #eeeeee; +} +.hero-buttons.container-fluid .btn-hero.btn { + font-family: 'Roboto Slab', serif; + font-weight: 700; + padding: 20px 30px; + background-image: none; + -ms-filter: none; + filter: none; + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; + text-shadow: none; + border: none; + -moz-opacity: 0.8; + -khtml-opacity: 0.8; + -webkit-opacity: 0.8; + opacity: 0.8; + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(opacity=80); + filter: alpha(opacity=80); + margin: 0px 10px; + text-transform: uppercase; + border: 5px solid #c64641; +} +@media (max-width: 767px) { + .hero-buttons.container-fluid .btn-hero.btn { + display: block; + margin-bottom: 10px; + } +} +.hero-buttons.container-fluid .btn-hero.btn:hover { + -moz-opacity: 1; + -khtml-opacity: 1; + -webkit-opacity: 1; + opacity: 1; + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); + filter: alpha(opacity=100); +} +.hero-buttons.container-fluid .btn-hero.btn.btn-secondary { + background-color: #eeeeee; + color: #c64641; +} +.hero-buttons.container-fluid .btn-hero.btn.btn-primary { + background-color: #c64641; + color: #f7f7f7; +} +.homepage-content.container-fluid { + background-color: white; + padding: 40px 0px; +} +.homepage-content.container-fluid .lead { + font-family: 'Roboto Slab', serif; + font-weight: 400; +} +.homepage-content.container-fluid ul, +.homepage-content.container-fluid ol { + padding: 20px 0px; + margin: 0 0 10px 0px; +} +.homepage-content.container-fluid ul li, +.homepage-content.container-fluid ol li { + list-style: none; + padding-bottom: 5px; +} +.homepage-content.container-fluid ul li:before, +.homepage-content.container-fluid ol li:before { + content: ''; + width: 0px; + height: 0px; + border: 3px solid transparent; + border-left: 3px solid #ecb5a1; + float: left; + display: block; + margin: 6px; +} +@media (max-width: 767px) { + .homepage-content.container-fluid { + padding: 40px 20px; + } +} +.homepage-footer.container-fluid { + background-color: #c64641; + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; + color: light; + border: none; +} +@media (max-width: 767px) { + .homepage-footer.container-fluid { + padding: 0 20px; + } +} +.homepage-footer.container-fluid .footer-nav { + margin: 40px 0px; +} +.homepage-footer.container-fluid .footer-nav li { + list-style: none; +} +.homepage-footer.container-fluid .footer-nav li a { + font-family: 'Roboto Slab', serif; + font-weight: 700; + font-size: 16px; + line-height: 32px; +} +.homepage-footer.container-fluid .footer-nav li a:hover { + color: #ecb5a1; + text-decoration: underline; +} +.homepage-footer.container-fluid .twitter { + margin-top: 20px; +} +.homepage-footer.container-fluid .twitter:first-child { + margin-top: 40px; +} +/* =========================================================================================== +Docs Body & Page Structure ============================================================================================== */ html, body { @@ -6298,12 +6455,14 @@ body { } .container-fluid { margin: 0 auto; - height: 100%; padding: 0; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } +.container-fluid.fluid-height { + height: 100%; +} .columns { height: 100%; } diff --git a/docs/01_API/01_Authentication.md b/docs/01_API/01_Authentication.md new file mode 100644 index 0000000..f339dc4 --- /dev/null +++ b/docs/01_API/01_Authentication.md @@ -0,0 +1,5 @@ +All calls to the api must include a _token parameter to validate the call. + + http://todaycms-api.herokuapp.com/?_token=XXXXXXXXXXXX + +This guide will not include the _token in the sample calls. It is implied that it must be included. \ No newline at end of file diff --git a/docs/01_API/05_Example_Config.md b/docs/01_API/05_Example_Config.md new file mode 100644 index 0000000..a1f0ebc --- /dev/null +++ b/docs/01_API/05_Example_Config.md @@ -0,0 +1,31 @@ +The following collection config will be used as the config throughout the example calls in this guide. + + { + "team": { + "title": "Team Members", + "type": "multiple", + "fields": { + "name": { + "title": "Name", + "type": "text" + }, + "employment": { + "title": "Employment Status", + "type": "select", + "options": { + "half": "Part Time", + "full": "Full Time", + "retired": "Retired" + } + }, + "bio": { + "title": "Bio", + "type": "textarea" + }, + "address": { + "title": "Home Address", + "type": "location" + } + } + } + } \ No newline at end of file diff --git a/docs/01_API/10_Create.md b/docs/01_API/10_Create.md new file mode 100644 index 0000000..b3fcc59 --- /dev/null +++ b/docs/01_API/10_Create.md @@ -0,0 +1,25 @@ +To create an object in a collection, issue a HTTP POST call with the object in the body of the POST. + + POST /collections/:collection + +**URL Parameters** + +`:collection` is the key of the collection in the config. + +**Example** + + POST /collections/team + + name = Justin + employment = full + bio = Node.js developer + address[city] = Bismarck + address[state] = ND + address[zip] = 58501 + ... + +Note: 'team' is the key used in our example config at the top of this guide + +**Returns** + +The object you just created. \ No newline at end of file diff --git a/docs/01_API/15_Read.md b/docs/01_API/15_Read.md new file mode 100644 index 0000000..617a961 --- /dev/null +++ b/docs/01_API/15_Read.md @@ -0,0 +1,12 @@ +To read from a collection, issue a HTTP GET call + + GET /collections/:collection + + +**URL Parameters** + +`:collection` is the key of the collection in the config. + +**Returns** + +An array of objects from the collection. \ No newline at end of file diff --git a/docs/01_API/20_Update.md b/docs/01_API/20_Update.md new file mode 100644 index 0000000..8b77c39 --- /dev/null +++ b/docs/01_API/20_Update.md @@ -0,0 +1,18 @@ +To update an object in a collection, issue a HTTP POST call with the object in the body of the POST. + + POST /collections/:collection/:id + + name = Justin Walsh + employment = part + bio = Documention writer + ... + +**URL Parameters** + +`:collection` is the key of the collection in the config. + +`:id` is the id of the object you want to update. + +**Returns** + +The object you just updated. \ No newline at end of file diff --git a/docs/01_API/25_Delete.md b/docs/01_API/25_Delete.md new file mode 100644 index 0000000..ca69ef1 --- /dev/null +++ b/docs/01_API/25_Delete.md @@ -0,0 +1 @@ +Coming Soon \ No newline at end of file diff --git a/docs/01_API/30_Filtering.md b/docs/01_API/30_Filtering.md new file mode 100644 index 0000000..cb9ac21 --- /dev/null +++ b/docs/01_API/30_Filtering.md @@ -0,0 +1,152 @@ +To filter an api call, send the optional `filter` parameter. The filter parameter is a structured json object. Examples use the following terms: + +* field key - Is the key used to define the field in the config. +* operator - Is the comparison to preform. +* value - Is what we will compare the object value to. + +## Basic Structure + +This is the most basic filter that can be preformed. + + { + "field key": "value" + } + +*Example Call:* + + GET /collections/team?filter={"employment":"full"} + +This will find all full time team members in the collection. + +## Advanced Structure + +This structure allows more advanced control over operators used when filtering. + + { + "field key": { + "operator": "value" + } + } + +*Example Call:* + + GET /collections/team?filter={"employment": {"!=": "retired"}} + +This will find all team members who are not retired in the collection. + +## Multiple Operators Structure + +You can preform multiple comparision operations on the same field + + { + "field key": { + "operator": "value", + "operator2": "value2", + "operatorx..": "valuex.." + } + } + +*Example Call:* + + GET /collections/team?filter={"name": {"LIKE":"Justin%", "!=":"Justin Walsh"}} + +This will find all team members who's names start with 'Justin' but are not 'Justin Walsh'. + +## Multiple Fields Structure + +You can filter multiple fields by adding each field key to the object. + + { + "field key 1": "value", + "field key 2": { + "operator": "value" + }, + "field key 3": { + "operator": "value" + } + } + +## Multiple Values Structure + +When filtering, you can use an array instead of a string to match any of the values in the array. + + { + "employment": ["full", "part"], + "name": { + "LIKE": ["Justin%", "Brian%"] + } + } + +This will match all team members who are full or part time, and whose names starts with 'Justin' or 'Brian'. + +Note: `"employment": ["full", "part"]` is equvalient to + + "employment": { + "=": ["full", "part"] + } + +## Nested Fields Structure + +You can filter by nested fields in the object using a dot notation syntax as the field key in the filter. This syntax can be used to query deep into nested objects and arrays, including fields like the 'multi'. + + { + "address.zip": "58501" + } + +This will filter the location field type by zip code, which is a nested field. This example is based on the sample config at the top of this guide. + +## AND/OR Fields Structure (Not Supported Yet) + +This structure allows a very customized query including both `-and` and `-or` statments. + + { + "field key 3": { + "operator": "value" + }, + "-or": { + "field key 1": "value", + "-and": { + "field key 2": { + "operator": "value" + }, + "field key 4": { + "operator": "value" + } + } + } + } + + +## Supported Operators + +| Operator | Description | +| :--- | :--- | +| = | equal to | +| != | not equal to | +| > | greater than | +| < | less than | +| >= | greater than or equal to | +| <= | less than or equal to | +| LIKE | case sensitive search, use '%' for wildcard | +| ILIKE | case insensitive search, use '%' for wildcard | +| NOT LIKE | inverse of 'LIKE' | +| NOT ILIKE | inverse of 'ILIKE' | + + +## Notes + +**JSON Filtering** + +The JSON object used for the `filter` parameter must be url encoded when calling the api. Here are examples of how to url encode a json object or string in different languages. + +***php*** + + $escaped_json = urlencode('{"name": {"LIKE":"Justin%", "!=":"Justin Walsh"}}'); + +***javascript string*** + + var escaped_json_from_string = escape('{"name": {"LIKE":"Justin%", "!=":"Justin Walsh"}}'); + +***javascript object*** + + var escaped_json_from_object = escape(JSON.stringify({"name": {"LIKE":"Justin%", "!=":"Justin Walsh"}})); diff --git a/docs/02_Config/01_Parent.md b/docs/02_Config/01_Parent.md new file mode 100644 index 0000000..100ab24 --- /dev/null +++ b/docs/02_Config/01_Parent.md @@ -0,0 +1,41 @@ +A config object that contains other objects (admin sections) and displays them in a group. + +Parent elements are characterized by a subhead in the admin panel navigation. They also group elements in the [[Outline (call)]]. + + { + "sample_parent": { + "title": "Sample Parent", + "type": "parent" + } + } + +**Parameters** + +| Name | Default | Description | +| :------------- | :------------- | :------------- | +| title | required | Descriptive title of the object. This value will be used to identify the object in the admin panel sidebar navigation. Required field. | +| type | parent | Object identifier. Required, must be set to: 'parent' | + +### Single +The Single object is created in the config.json file. This will create a single page that can be edited in the admin panel and displayed on the front end. + + { + "single-name": { + "title": "single-title", + "parent": "sample_parent", + "type": "single", + "fields": { + + } + } + } + +**Parameters** + +| Name | Default | Description | +| :------------- | :------------- | :------------- | +| title | required | Descriptive title of the page. This value will be used to identify the object in the admin panel sidebar navigation. Required field. | +| type | single | Object identifier. Required, must be set to: 'single.' | +| parent | - | Defines parent container object. Allows you to group multiple objects together in the admin panel (like a folder). | +| nav | true | Allows you to hide or show object elements in the admin panel. | + diff --git a/docs/02_Config/05_Single.md b/docs/02_Config/05_Single.md new file mode 100644 index 0000000..10066d0 --- /dev/null +++ b/docs/02_Config/05_Single.md @@ -0,0 +1,20 @@ +The Single object is created in the config.json file. This will create a single page that can be edited in the admin panel and displayed on the front end. + + { + "single-name": { + "title": "single-title", + "parent": "sample_parent", + "type": "single", + "fields": { + + } + } + } + +### Parameters +| Name | Default | Description | +| :------------- | :------------- | :------------- | +| title | required | Descriptive title of the page. This value will be used to identify the object in the admin panel sidebar navigation. Required field. | +| type | single | Object identifier. Required, must be set to: 'single.' | +| parent | - | Defines parent container object. Allows you to group multiple objects together in the admin panel (like a folder). | +| nav | true | Allows you to hide or show object elements in the admin panel. | \ No newline at end of file diff --git a/docs/02_Config/10_Mutiple.md b/docs/02_Config/10_Mutiple.md new file mode 100644 index 0000000..ef9f655 --- /dev/null +++ b/docs/02_Config/10_Mutiple.md @@ -0,0 +1,45 @@ +The Multiple object is created in the 'config.json' file. This will create a group of many pages (records) that can be edited in the admin panel and displayed on the front end. + + { + "multiple-name": { + "title": "multiple-title", + "parent": "sample_parent", + "type": "multiple", + "fields": { + + } + } + } + +**Parameters** + +| Name | Default | Options | Description | +| :------------- | :------------- | :------------- | :------------- | +| title | required | | Descriptive title of the object. This value will be used to identify the object in the admin panel sidebar navigation. Required field. | +| type | multiple | | Object identifier. Required, must be set to: 'multiple.' | +| parent | '' | | Defines parent container object. Allows you to group multiple objects together in the admin panel (like a folder). | +| nav | true | true,false | Allows you to hide or show object elements in the admin panel. | +| filters | '' | | Creates a select menu in the admin panel that will filter returned records. | +| sort | '' | asc, desc | Sorts records on call. | +| display | '' | | Defines values to display in the admin output table for each record. | +| download | true | true,false | Enables raw data download from admin panel. (csv file) | +| redirects | true | true,false | Enables option to create link (url) based records. | +| publish | true | true,false | Removes ability to save individual record as draft. | + +## Filters Example + + { + "filters": ["value"] + } + +## Sort Example + { + "sort":{ + "value":"asc" + } + } + +## Display Example + { + "display":["fname", "lname", "phone", "email"] + } \ No newline at end of file diff --git a/docs/02_Config/15_Fields/Colorpicker.md b/docs/02_Config/15_Fields/Colorpicker.md new file mode 100644 index 0000000..fc771b3 --- /dev/null +++ b/docs/02_Config/15_Fields/Colorpicker.md @@ -0,0 +1,8 @@ +Creates a color picker field that will return a hex value through the API. + +![TodayCMScolor picker](http://space.todaymade.com/todaycms/colorpicker2.jpg) + + "color": { + "title": "Color Picker", + "type": "colorpicker" + } \ No newline at end of file diff --git a/docs/02_Config/15_Fields/Date.md b/docs/02_Config/15_Fields/Date.md new file mode 100644 index 0000000..e521431 --- /dev/null +++ b/docs/02_Config/15_Fields/Date.md @@ -0,0 +1,8 @@ +Creates a single date field with a visual calendar drop down. + +![Todaycms date field](http://space.todaymade.com/todaycms/date.jpg) + + "date": { + "title": "Date Field", + "type": "date" + } \ No newline at end of file diff --git a/docs/02_Config/15_Fields/Datetime.md b/docs/02_Config/15_Fields/Datetime.md new file mode 100644 index 0000000..11580f6 --- /dev/null +++ b/docs/02_Config/15_Fields/Datetime.md @@ -0,0 +1,12 @@ +Creates a single date and time field with a visual drop down for each. + +![todaycms date and time field](http://space.todaymade.com/todaycms/datetime.jpg) + + "datetime": { + "title": "Date Time Field", + "type": "datetime" + } + +Returns a single date/time value. + + [datetime] => 01/16/2012 12:00 am diff --git a/docs/02_Config/15_Fields/Divider.md b/docs/02_Config/15_Fields/Divider.md new file mode 100644 index 0000000..ea17d30 --- /dev/null +++ b/docs/02_Config/15_Fields/Divider.md @@ -0,0 +1,9 @@ +Creates a page divider with customizable text. Visible only from the CMS. + +![todaycms divider field](http://space.todaymade.com/todaycms/divider.jpg) + + "divider-1": { + "title": "Page Divider", + "type": "divider" + } + diff --git a/docs/02_Config/15_Fields/File.md b/docs/02_Config/15_Fields/File.md new file mode 100644 index 0000000..0ef5590 --- /dev/null +++ b/docs/02_Config/15_Fields/File.md @@ -0,0 +1,18 @@ +Creates a single file upload field. + +![TodayCMS File](http://space.todaymade.com/todaycms/file.jpg) + + "file": { + "title": "File Field", + "type": "file" + } + +Returns an array. + + [file] => Array + ( + [caption] => + [date] => 11/1/2012 + [url] => http://todaycms.s3.amazonaws.com/...filename.pdf + [name] => filename.pdf + ) \ No newline at end of file diff --git a/docs/02_Config/15_Fields/Files.md b/docs/02_Config/15_Fields/Files.md new file mode 100644 index 0000000..d9058cb --- /dev/null +++ b/docs/02_Config/15_Fields/Files.md @@ -0,0 +1,21 @@ +Creates multiple file upload fields with sort and caption options. + +![todaycms files](http://space.todaymade.com/todaycms/files.jpg) + + "files": { + "title": "Files Field", + "type": "files" + } + +Returns a multidimensional array. + + [files] => Array + ( + [0] => Array + ( + [caption] => Pre-Order Form + [date] => 2/13/2012 + [url] => http://todaycms.s3.amazonaws.com/...filename.pdf + [name] => Author Visit - Beth McKinney.pdf + ) + ) \ No newline at end of file diff --git a/docs/02_Config/15_Fields/Form.md b/docs/02_Config/15_Fields/Form.md new file mode 100644 index 0000000..99dfd40 --- /dev/null +++ b/docs/02_Config/15_Fields/Form.md @@ -0,0 +1,28 @@ +Creates an instance of the TodayCMS FormBuilder. This will allow end users to create complex forms with a variety of options for data collection and submission. + +![TodayCMS Formbuilder](http://space.todaymade.com/todaycms/formbuilder.jpg) + + "form": { + "title": "Form Builder", + "type": "formbuilder" + } + +**Available Fields** + +* Single Line Text +* Multiple Line Text +* Dropdown Select +* Checkbox Options +* Multiple Choice (Radio Buttons) +* Phone +* Email + +**Form Actions** + +* Redirect to another page +* Display a message +* Send to Paypal + +**Returns** + +See the [[Formbuilder (helper)]] diff --git a/docs/02_Config/15_Fields/Hidden.md b/docs/02_Config/15_Fields/Hidden.md new file mode 100644 index 0000000..37a75fc --- /dev/null +++ b/docs/02_Config/15_Fields/Hidden.md @@ -0,0 +1,40 @@ +Creates a hidden form field. + + "hidden": { + "title": "Hidden Field", + "type": "hidden", + } + + "hidden-forced-value": { + "title": "Hidden Forced Value Field", + "type": "hidden", + "value": "Forced Value" + } + + "hidden-default-value": { + "title": "Hidden Default Value Field", + "type": "hidden", + "default": "Default Value" + } + + "hidden-timestamp-value": { + "title": "Hidden Timestamp Value Field", + "type": "hidden", + "default": "timestamp" + } + + "hidden-display-value": { + "title": "Hidden Display Field", + "type": "hidden", + "value": "You should see this", + "display": true + } + + +**Parameters** + +| Name | Default | Options | Description | +| ------------- | ------------- | ------------- | ------------- | +| default | '' | string, timestamp | Sets a default value for the hidden field. Timestamp will display current date/time. | +| display | false | true,false | Can see the value but can't change it | +| auto_increment | false | true, false | Creates unique id starting with 1. | diff --git a/docs/02_Config/15_Fields/Image.md b/docs/02_Config/15_Fields/Image.md new file mode 100644 index 0000000..ad4087d --- /dev/null +++ b/docs/02_Config/15_Fields/Image.md @@ -0,0 +1,53 @@ +Creates a single image upload field. + +![image](http://space.todaymade.com/todaycms/image-field.jpg) + + "image": { + "title": "Image Field", + "type": "image", + "sizes": { + "thumb": { + "height": 150, + "width": 150, + "resize_strategy": "crop" + }, + "large": { + "height": 500, + "width": 500, + "resize_strategy": "fit" + } + } + } + +Image fields allows you to determine multiple thumbnail/image sizes and cropping techniques. + +**Parameters** + +| Name | Type | Default | Description | +| ------------- | ------------- | ------------- | ------------- | +| width | 1-5000 | Width of the input image | Width of the new image, in pixels | +| height | 1-5000 | Height of the input image | Height of the new image, in pixels | +| strip | boolean | false | Strips all metadata from the image. This is useful to keep thumbnails as small as possible. | +| flatten | boolean | true | Flattens all layers onto the specified background to achive better results from transparent formats to non-transparent formats, as explained in the [ImageMagick](http://www.imagemagick.org/script/command-line-options.php?#layers) documentation. **Important:** To preserve animations, GIF files are not flattened when this is set to true. To flatten GIF animations, use the frame parameter. | +| correct_gamma | boolean | false | Prevents gamma errors [common in many image scaling algorithms](http://www.4p8.com/eric.brasseur/gamma.html). | +| quality | 1-100 | Quality of the input image, or 92 | Controls the image compression for JPG and PNG images. | +| background | string | "#FFFFFF" | Either the hexadecimal code or [name](http://www.imagemagick.org/script/color.php#color_names) of the color used to fill the background (only used for the pad resize strategy). **Important:** By default, the background of transparent images is changed to white. For details about how to preserve transparency across all image types, see [this demo](https://transloadit.com/demos/image-resize/properly-preserve-transparency-across-all-image-types). | +| resize_strategy | string | "fit" | See [[Resize Strategies Table]] | +| zoom | boolean | true | If this is set to false, smaller images will not be stretched to the desired width and height. For details about the impact of zooming for your preferred resize strategy, see the [[Resize Strategies Table]]. | +| crop | { x1: integer, y1: integer, x2: integer, y2: integer } | {} | Specify an object containing coordinates for the top left and bottom right corners of the rectangle to be cropped from the original image(s). For example, `{x1: 80, y1: 100, x2: 160, y2: 180}` will crop the area from `(80,100)` to `(160,180)` which is a square whose width and height are 80px. If crop is set, the width and height parameters are ignored, and the resize_strategy is set to crop automatically. | +| format | string | Format of the input image | The available formats are `"jpg"`, `"png"`, `"gif"`, and `"tiff"`. | +| gravity | string | center | The direction from which the image is to be cropped. The available options are `"center"`, `"top"`, `"bottom"`, `"left"`, and `"right"`. You can also combine options with a hyphen, such as `"bottom-right"`. | +| frame | integer | null (all frames) | Use this parameter when dealing with animated GIF files to specify which frame of the GIF is used for the operation. Specify 1 to use the first frame, 2 to use the second, and so on. | +| colorspace | string | " " | Sets the image colorspace. For details about the available values, see the [ImageMagick documentation](http://www.imagemagick.org/script/command-line-options.php#colorspace). | +| rotation | string / boolean / integer | true | Determines whether the image should be rotated. Set this to true to auto-rotate images that are misrotated, or depend on EXIF rotation settings. You can also set this to an integer to specify the rotation in degrees. You can also specify degrees> to rotate only when the image width exceeds the height (or degrees< if the width must be less than the height). Specify false to disable auto-fixing of misrotated images. | +| compress | string | null | Specifies pixel compression for when the image is written. Valid values are None, `"BZip"`, `"Fax"`, `"Group4"`, `"JPEG"`, `"JPEG2000"`, `"Lossless"`, `"LZW"`, `"RLE"`, and `"Zip"`. Compression is disabled by default. | +| blur | string | null | Specifies gaussian blur, using a value with the form `{radius}x{sigma}`. The radius value specifies the size of area the operator should look at when spreading pixels, and should typically be either `"0"` or at least two times the sigma value. The sigma value is an approximation of how many pixels the image is "spread"; think of it as the size of the brush used to blur the image. This number is a floating point value, enabling small values like `"0.5"` to be used. For details about how the radius and sigma values affect blurring, see [this example](http://www.imagemagick.org/Usage/blur/blur_montage.jpg). | + +**Watermark Parameters** + +| Name | Type | Default | Description | +| ------------- | ------------- | ------------- | ------------- | +| watermark_url | string | " " | A url indicating a PNG image to be overlaid above this image. | +| watermark_position | string/array | "center" | The position at which the watermark is placed. The available options are `"center"`, `"top"`, `"bottom"`, `"left"`, and `"right"`. You can also combine options, such as `"bottom-right"`. An array of possible values can also be specified, in which case one value will be selected at random, such as `["center","left","bottom-left","bottom-right"]`. _Note that this setting puts the watermark in the specified corner. To use a specific pixel offset for the watermark, you will need to add the padding to the image itself._ | +| watermark_size | string | "" | The size of the watermark, as a percentage. For example, a value of `"50%"` means that size of the watermark will be 50% of the size of image on which it is placed. | +| watermark_resize_strategy | string | "fit" | Available values are `"fit"` and `"stretch"`. | diff --git a/docs/02_Config/15_Fields/Images.md b/docs/02_Config/15_Fields/Images.md new file mode 100644 index 0000000..ceda1d1 --- /dev/null +++ b/docs/02_Config/15_Fields/Images.md @@ -0,0 +1,24 @@ +Creates a multi image upload field. Useful for a gallery or rotating image. + +![images](http://space.todaymade.com/todaycms/images.jpeg) + + "images": { + "title": "Images Field", + "type": "images", + "sizes": { + "thumb": { + "height": 150, + "width": 150, + "resize_strategy": "crop" + }, + "large": { + "height": 500, + "width": 500, + "resize_strategy": "crop" + } + } + } + +See [parameters table](https://github.com/justinwalsh/todaycms/wiki/Image). + +See [resize strategies table](https://github.com/justinwalsh/todaycms/wiki/Resize-Strategies-Table). \ No newline at end of file diff --git a/docs/02_Config/15_Fields/Markitup.md b/docs/02_Config/15_Fields/Markitup.md new file mode 100644 index 0000000..f1b4d51 --- /dev/null +++ b/docs/02_Config/15_Fields/Markitup.md @@ -0,0 +1,8 @@ +Creates an instance of the markItUp! universal markup editor. Editor allows easy access to HTML editing. + +![MarkItUp! editor](http://space.todaymade.com/todaycms/markitup.jpeg) + + "markitup": { + "title":"Markitup", + "type":"markitup" + } \ No newline at end of file diff --git a/docs/02_Config/15_Fields/Multi.md b/docs/02_Config/15_Fields/Multi.md new file mode 100644 index 0000000..efa1589 --- /dev/null +++ b/docs/02_Config/15_Fields/Multi.md @@ -0,0 +1,19 @@ +Creates a repeatable object that can utilize all TodayCMS field types. + +![Multi Field](http://space.todaymade.com/todaycms/multi.jpeg) + + "multi": { + "title": "Multi Field", + "display": "title", + "type": "multi", + "fields": { + ... + } + } + } + +**Parameters** + +| Name | Default | Options | Description | +| ------------- | ------------- | ------------- | ------------- | +| display | '' | | Field name to use as the identifier in the title cell. | diff --git a/docs/02_Config/15_Fields/Multiselect.md b/docs/02_Config/15_Fields/Multiselect.md new file mode 100644 index 0000000..a837677 --- /dev/null +++ b/docs/02_Config/15_Fields/Multiselect.md @@ -0,0 +1,45 @@ +Creates a form field type that allows the selection of one or more items from a dropdown list. + +![multi select static](http://space.todaymade.com/todaycms/multi-select-static.jpg) + +### Static Options +Displays a static list of options. + + "multiselect": { + "title": "Multi Select - Static", + "type": "multiselect", + "options": { + "value": "Display Name", + "value2": "Display Name 2" + } + } + +### Reference Options +Displays the records from another object in the config. This is commonly used to create multiple relational data associations. + + "referenced-object": { + "title": "Referenced Object", + "type": "multiple", + "fields": { + "name": { + "title": "Record Name", + "type": "text" + } + } + } + + "multiselect": { + "title": "Multi Select - Reference", + "type": "multiselect", + "options": "referenced-object", + "display": "name" + } + +**Parameters** + +| Name | Default | Options | Description | +| ------------- | ------------- | ------------- | ------------- | +| options | '' | | A list of values (object), or reference name for another object in the config. | +| display | '' | | Field name to use as the identifier in the dropdown select | + +See also [[Select]]. \ No newline at end of file diff --git a/docs/02_Config/15_Fields/Password.md b/docs/02_Config/15_Fields/Password.md new file mode 100644 index 0000000..704087d --- /dev/null +++ b/docs/02_Config/15_Fields/Password.md @@ -0,0 +1,8 @@ +Creates a password form field. + +![password](http://space.todaymade.com/todaycms/password.jpg) + + "password": { + "title": "Password Field", + "type": "password" + } \ No newline at end of file diff --git a/docs/02_Config/15_Fields/Select.md b/docs/02_Config/15_Fields/Select.md new file mode 100644 index 0000000..ba38751 --- /dev/null +++ b/docs/02_Config/15_Fields/Select.md @@ -0,0 +1,49 @@ +Creates a form field type that allows the selection of a single item from a dropdown list. + +![static field](http://space.todaymade.com/todaycms/select.jpg) + +### Static Options +Displays a static list of options. + + "select": { + "title": "Select Field - Static Options", + "type": "select", + "options": { + "value1": "Display Name One", + "value2": "Display Name Two", + "value3": "Display Name Three" + } + } + +### Reference Options +Displays a list of the records from another object in the config. This is commonly used to create relational data association. For example, a list of categories or a grouping. + + "referenced-object": { + "title": "Referenced Object", + "type": "multiple", + "fields": { + "name": { + "title": "Record Name", + "type": "text" + } + } + } + + "select-reference": { + "title": "Select Field - Reference", + "type": "select", + "options": "referenced-object", + "display": "name" + } + +**Parameters** + +| Name | Default | Options | Description | +| ------------- | ------------- | ------------- | ------------- | +| options | '' | | A list of values (object), or reference name for another object in the config. | +| display | '' | | Field name to use as the identifier in the dropdown select | +| blank | '' | string | String uses for the default dropdown select option. Value is set to null. | +| hidden | false | true, false | Hides the select menu and passes a value through as a hidden field. | +| value | | | Sets a default value. | + +See also [[Multiselect]]. diff --git a/docs/02_Config/15_Fields/Text.md b/docs/02_Config/15_Fields/Text.md new file mode 100644 index 0000000..0c616c9 --- /dev/null +++ b/docs/02_Config/15_Fields/Text.md @@ -0,0 +1,8 @@ +Creates a text form field. + +![text ](http://space.todaymade.com/todaycms/text.jpg) + + "text": { + "title": "Text Field", + "type": "text" + } diff --git a/docs/02_Config/15_Fields/Textarea.md b/docs/02_Config/15_Fields/Textarea.md new file mode 100644 index 0000000..af3ac92 --- /dev/null +++ b/docs/02_Config/15_Fields/Textarea.md @@ -0,0 +1,8 @@ +Creates a textarea form field. + +![Textarea](http://space.todaymade.com/todaycms/textarea.jpg) + + "textarea": { + "title": "Wysiwyg Field", + "type": "textarea" + } \ No newline at end of file diff --git a/docs/02_Config/15_Fields/Wysiwyg.md b/docs/02_Config/15_Fields/Wysiwyg.md new file mode 100644 index 0000000..411717e --- /dev/null +++ b/docs/02_Config/15_Fields/Wysiwyg.md @@ -0,0 +1,8 @@ +Creates a WYSIWYG textarea form field. + +![WYSIWYG](http://space.todaymade.com/todaycms/wysiwyg.jpg) + + "wysiwyg": { + "title": "Wysiwyg Field", + "type": "wysiwyg" + } \ No newline at end of file diff --git a/docs/03_Editor/01_Install.md b/docs/03_Editor/01_Install.md new file mode 100644 index 0000000..8073b60 --- /dev/null +++ b/docs/03_Editor/01_Install.md @@ -0,0 +1,12 @@ +To create an editor on a page use the following code + +
+ + + +***Required***: 'apikey' and 'collection' are required parameters for the editor to load. \ No newline at end of file diff --git a/docs/03_Editor/05_Setup.md b/docs/03_Editor/05_Setup.md new file mode 100644 index 0000000..3bf05d0 --- /dev/null +++ b/docs/03_Editor/05_Setup.md @@ -0,0 +1,99 @@ +There are several customizations that can be made to the 'cms_setup' function. + +##id +Used to update an existing record. + + + +##config +Overrides the collections configuration for only this editor. + +In this example we are changing the visibility of the account field: + + + +##data +Overrides the data for this object + + + +##before_save +Function that is called before the object is saved to the api. It recieves a complete json copy of the object. Use this to make any modifications to the object before it is saved. If you return false, the save will be canceled, this is usefully for valdation errors. + + + +##after_save +Function that is called after the object has been saved. It recieves a complete json copy of the object that was just saved to the database. + + + +##bootstrap +Enable or disable the bootstrap css. Useful if bootstrap has already been loaded on the page. + + + +##theme +Sets the theme. Availible themes: light or dark. The light theme is the default. Use false to disable the theme css. + + diff --git a/docs/04_SDK/05_PHP/01_Getting_Started.md b/docs/04_SDK/05_PHP/01_Getting_Started.md new file mode 100644 index 0000000..d2e9cc8 --- /dev/null +++ b/docs/04_SDK/05_PHP/01_Getting_Started.md @@ -0,0 +1,3 @@ +The PHP SDK is a file called `connector.php` that makes it easier to work with the API. It contains helpers and functions that map to API calls. + +Receive your unique API key details from [Todaymade] (http://todaymade.com/contact). \ No newline at end of file diff --git a/docs/04_SDK/05_PHP/05_Setup.md b/docs/04_SDK/05_PHP/05_Setup.md new file mode 100644 index 0000000..40eb381 --- /dev/null +++ b/docs/04_SDK/05_PHP/05_Setup.md @@ -0,0 +1,10 @@ +Create (or add) the 'config.json' and 'connector.php' files to the root of your website. + +The connector.php file is the root of the CMS's power. To create a connection to the API server, include the connector.php file and create an instance of the Todaycms class using php. + +```php + +``` + +The $cms variable is now availible to start making calls to the api \ No newline at end of file diff --git a/docs/04_SDK/05_PHP/20_Debugging.md b/docs/04_SDK/05_PHP/20_Debugging.md new file mode 100644 index 0000000..7cd99c7 --- /dev/null +++ b/docs/04_SDK/05_PHP/20_Debugging.md @@ -0,0 +1,3 @@ +To debug your api calls and to find out what data is available to your page. Add '?debug' to the ending of any url. + + http://yourdomain.com?debug \ No newline at end of file diff --git a/docs/04_SDK/05_PHP/25_Methods/00_Config.md b/docs/04_SDK/05_PHP/25_Methods/00_Config.md new file mode 100644 index 0000000..c89e9a6 --- /dev/null +++ b/docs/04_SDK/05_PHP/25_Methods/00_Config.md @@ -0,0 +1,9 @@ +Returns the config object that is assosicated with the current API key. + +To retreive the config simply use the $cms variable: + + $config = $cms->config(); + +You can also filter your config to a specific collection. + + $team_config = $cms->config("team"); \ No newline at end of file diff --git a/docs/04_SDK/05_PHP/25_Methods/01_Single.md b/docs/04_SDK/05_PHP/25_Methods/01_Single.md new file mode 100644 index 0000000..619102f --- /dev/null +++ b/docs/04_SDK/05_PHP/25_Methods/01_Single.md @@ -0,0 +1,13 @@ +Single is the heart of any website. It represents a single record in the CMS system. + +To make a call to the api simply use the $cms variable: + + $page = $cms->key("OBJECT-NAME")->single(); + +Call a single record by ID + + $cms->key(1234)->single(); + +Call a single record by slug + + $cms->parent(key)->slug(about-us)->single(); \ No newline at end of file diff --git a/docs/04_SDK/05_PHP/25_Methods/05_Multiple.md b/docs/04_SDK/05_PHP/25_Methods/05_Multiple.md new file mode 100644 index 0000000..2a62289 --- /dev/null +++ b/docs/04_SDK/05_PHP/25_Methods/05_Multiple.md @@ -0,0 +1,9 @@ +Multiple objects represent a group of records in the CMS system. + +To make a call to the api simply use the $cms variable: + + $pages = $cms->key("OBJECT-NAME")->multiple(); + +You can also filter your results base field name. + + $pages = $cms->key("OBJECT-NAME")->filter(FIELD-NAME, FIELD-VALUE)->multiple(); \ No newline at end of file diff --git a/docs/04_SDK/05_PHP/25_Methods/10_Formbuilder.md b/docs/04_SDK/05_PHP/25_Methods/10_Formbuilder.md new file mode 100644 index 0000000..a79a089 --- /dev/null +++ b/docs/04_SDK/05_PHP/25_Methods/10_Formbuilder.md @@ -0,0 +1,10 @@ +This helper was added to the connector.php file, version 2.*. It is designed to display a fully-functioning AJAX web form with validation built in. + +```php +formbuilder($page['fields']['form'], $page); + } +?> +``` + +Returns: HTML/JS \ No newline at end of file diff --git a/docs/config.json b/docs/config.json index ccd6ce9..2651a1c 100644 --- a/docs/config.json +++ b/docs/config.json @@ -2,7 +2,7 @@ "title": "DAUX.IO", "tagline": "The Easiest Way To Document Your App", "image": "/img/app.png", - "theme": "blue", + "theme": "navy", "repo": "justinwalsh/tm-docs", "twitter": ["justin_walsh", "todaymade"], "links": { diff --git a/docs/index.md b/docs/index.md index 0177b0a..ce41681 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,25 @@ -This is my homepage content! +

+ Daux.io is an documentation generator that uses a simple folder structure and Markdown files to create custom documentation on the fly. It helps you create great looking documentation in a developer friendly way. +

-* Its really cool -* Yes it is \ No newline at end of file +
+

Features

+
+ +alt text + +* 100% Mobile Responsive +* Supports GitHub Flavored Markdown +* Auto created homepage/landing page +* Auto Syntax Highlighting +* Auto Generated Navigation +* 4 Built-In Themes or roll your own +* Functional, Flat Design Style +* Shareable/Linkable SEO Friendly URLs +* Built On Bootstrap +* No Build Step +* Git/SVN Friendly +* Optional code float layout + +
+
\ No newline at end of file diff --git a/img/app-thumbs.png b/img/app-thumbs.png new file mode 100644 index 0000000..8dff7c7 Binary files /dev/null and b/img/app-thumbs.png differ diff --git a/img/app.png b/img/app.png index 8cd9725..8c9f76c 100644 Binary files a/img/app.png and b/img/app.png differ diff --git a/img/favicon-blue.png b/img/favicon-blue.png new file mode 100644 index 0000000..e3f7e66 Binary files /dev/null and b/img/favicon-blue.png differ diff --git a/img/favicon-green.png b/img/favicon-green.png new file mode 100644 index 0000000..026229e Binary files /dev/null and b/img/favicon-green.png differ diff --git a/img/favicon-navy.png b/img/favicon-navy.png new file mode 100644 index 0000000..d0135fc Binary files /dev/null and b/img/favicon-navy.png differ diff --git a/img/favicon-red.png b/img/favicon-red.png new file mode 100644 index 0000000..15ba9fe Binary files /dev/null and b/img/favicon-red.png differ diff --git a/img/favicon.png b/img/favicon.png new file mode 100644 index 0000000..4b99b4b Binary files /dev/null and b/img/favicon.png differ diff --git a/index.php b/index.php index 0a849e6..6fb714b 100644 --- a/index.php +++ b/index.php @@ -70,11 +70,24 @@ software, even if advised of the possibility of such damage. $options = get_options(); $tree = get_tree("docs"); ?> - + + + + + <?=$options['title']; ?> + + + + + + + + + @@ -100,28 +113,101 @@ software, even if advised of the possibility of such damage. + -

+ - -

- +
+
+
+
+ +

+ +
+
+
+
+ + <?=$options['title'];?> + +
+
+
+
- - <?=$options['title'];?> - +
+
+ +
+
- +
+
+
+
+ +
+
+
+
+ + Fork me on GitHub -
+