| @@ -0,0 +1,248 @@ | ||
| { | ||
| "key": "group_56080f3711ebf", | ||
| "title": "CWOS Feature", | ||
| "fields": [ | ||
| { | ||
| "key": "field_56080f49419ed", | ||
| "label": "Header Image", | ||
| "name": "header_image", | ||
| "type": "image", | ||
| "instructions": "", | ||
| "required": 0, | ||
| "conditional_logic": 0, | ||
| "wrapper": { | ||
| "width": "", | ||
| "class": "", | ||
| "id": "" | ||
| }, | ||
| "return_format": "url", | ||
| "preview_size": "thumbnail", | ||
| "library": "all", | ||
| "min_width": "", | ||
| "min_height": "", | ||
| "min_size": "", | ||
| "max_width": "", | ||
| "max_height": "", | ||
| "max_size": "", | ||
| "mime_types": "" | ||
| }, | ||
| { | ||
| "key": "field_56080faf419ee", | ||
| "label": "Flex Blocks", | ||
| "name": "cwos_flex_blocks", | ||
| "type": "flexible_content", | ||
| "instructions": "", | ||
| "required": 0, | ||
| "conditional_logic": 0, | ||
| "wrapper": { | ||
| "width": "", | ||
| "class": "", | ||
| "id": "" | ||
| }, | ||
| "button_label": "Add Content", | ||
| "min": "", | ||
| "max": "", | ||
| "layouts": [ | ||
| { | ||
| "key": "56080fc61ae3c", | ||
| "name": "title_blocks", | ||
| "label": "Title Blocks", | ||
| "display": "block", | ||
| "sub_fields": [ | ||
| { | ||
| "key": "field_560813eed3a25", | ||
| "label": "Banner Blocks", | ||
| "name": "banner_blocks", | ||
| "type": "repeater", | ||
| "instructions": "", | ||
| "required": 0, | ||
| "conditional_logic": 0, | ||
| "wrapper": { | ||
| "width": "", | ||
| "class": "", | ||
| "id": "" | ||
| }, | ||
| "min": "", | ||
| "max": "", | ||
| "layout": "block", | ||
| "button_label": "Add Another Block", | ||
| "sub_fields": [ | ||
| { | ||
| "key": "field_56080ff4419ef", | ||
| "label": "Background Image", | ||
| "name": "bg_image", | ||
| "type": "image", | ||
| "instructions": "", | ||
| "required": 0, | ||
| "conditional_logic": 0, | ||
| "wrapper": { | ||
| "width": "", | ||
| "class": "", | ||
| "id": "" | ||
| }, | ||
| "return_format": "url", | ||
| "preview_size": "thumbnail", | ||
| "library": "all", | ||
| "min_width": "", | ||
| "min_height": "", | ||
| "min_size": "", | ||
| "max_width": "", | ||
| "max_height": "", | ||
| "max_size": "", | ||
| "mime_types": "" | ||
| }, | ||
| { | ||
| "key": "field_56081014419f0", | ||
| "label": "Title", | ||
| "name": "title", | ||
| "type": "text", | ||
| "instructions": "", | ||
| "required": 0, | ||
| "conditional_logic": 0, | ||
| "wrapper": { | ||
| "width": 50, | ||
| "class": "", | ||
| "id": "" | ||
| }, | ||
| "default_value": "", | ||
| "placeholder": "", | ||
| "prepend": "", | ||
| "append": "", | ||
| "maxlength": "", | ||
| "readonly": 0, | ||
| "disabled": 0 | ||
| }, | ||
| { | ||
| "key": "field_5608105d419f1", | ||
| "label": "Link", | ||
| "name": "link", | ||
| "type": "url", | ||
| "instructions": "", | ||
| "required": 0, | ||
| "conditional_logic": 0, | ||
| "wrapper": { | ||
| "width": 50, | ||
| "class": "", | ||
| "id": "" | ||
| }, | ||
| "default_value": "", | ||
| "placeholder": "" | ||
| }, | ||
| { | ||
| "key": "field_560810f1419f2", | ||
| "label": "Text Area", | ||
| "name": "text_area", | ||
| "type": "wysiwyg", | ||
| "instructions": "", | ||
| "required": 0, | ||
| "conditional_logic": 0, | ||
| "wrapper": { | ||
| "width": "", | ||
| "class": "", | ||
| "id": "" | ||
| }, | ||
| "default_value": "", | ||
| "tabs": "text", | ||
| "toolbar": "full", | ||
| "media_upload": 1 | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "key": "field_56081782c3bf0", | ||
| "label": "Number of Blocks", | ||
| "name": "block_number", | ||
| "type": "number", | ||
| "instructions": "", | ||
| "required": 0, | ||
| "conditional_logic": 0, | ||
| "wrapper": { | ||
| "width": "", | ||
| "class": "", | ||
| "id": "" | ||
| }, | ||
| "default_value": "", | ||
| "placeholder": "", | ||
| "prepend": "", | ||
| "append": "", | ||
| "min": "", | ||
| "max": "", | ||
| "step": "", | ||
| "readonly": 0, | ||
| "disabled": 0 | ||
| } | ||
| ], | ||
| "min": "", | ||
| "max": "" | ||
| }, | ||
| { | ||
| "key": "5608126c9bbe9", | ||
| "name": "content_block", | ||
| "label": "Content Block", | ||
| "display": "row", | ||
| "sub_fields": [ | ||
| { | ||
| "key": "field_5608127e9bbea", | ||
| "label": "Title", | ||
| "name": "title", | ||
| "type": "text", | ||
| "instructions": "", | ||
| "required": 0, | ||
| "conditional_logic": 0, | ||
| "wrapper": { | ||
| "width": "", | ||
| "class": "", | ||
| "id": "" | ||
| }, | ||
| "default_value": "", | ||
| "placeholder": "", | ||
| "prepend": "", | ||
| "append": "", | ||
| "maxlength": "", | ||
| "readonly": 0, | ||
| "disabled": 0 | ||
| }, | ||
| { | ||
| "key": "field_560812909bbeb", | ||
| "label": "WYSIWYG", | ||
| "name": "wysiwyg", | ||
| "type": "wysiwyg", | ||
| "instructions": "", | ||
| "required": 0, | ||
| "conditional_logic": 0, | ||
| "wrapper": { | ||
| "width": "", | ||
| "class": "", | ||
| "id": "" | ||
| }, | ||
| "default_value": "", | ||
| "tabs": "all", | ||
| "toolbar": "full", | ||
| "media_upload": 1 | ||
| } | ||
| ], | ||
| "min": "", | ||
| "max": "" | ||
| } | ||
| ] | ||
| } | ||
| ], | ||
| "location": [ | ||
| [ | ||
| { | ||
| "param": "page_template", | ||
| "operator": "==", | ||
| "value": "templates\/cwos-feature.php" | ||
| } | ||
| ] | ||
| ], | ||
| "menu_order": 0, | ||
| "position": "normal", | ||
| "style": "default", | ||
| "label_placement": "top", | ||
| "instruction_placement": "label", | ||
| "hide_on_screen": "", | ||
| "active": 1, | ||
| "description": "", | ||
| "modified": 1443370917 | ||
| } |
| @@ -0,0 +1,51 @@ | ||
| { | ||
| "key": "group_56081d4cc0c2d", | ||
| "title": "Sponsors", | ||
| "fields": [ | ||
| { | ||
| "key": "field_56081d6667ffb", | ||
| "label": "Connected Sponsors", | ||
| "name": "connected_sponsors", | ||
| "type": "relationship", | ||
| "instructions": "", | ||
| "required": 0, | ||
| "conditional_logic": 0, | ||
| "wrapper": { | ||
| "width": "", | ||
| "class": "", | ||
| "id": "" | ||
| }, | ||
| "post_type": [ | ||
| "sponsors" | ||
| ], | ||
| "taxonomy": [ | ||
|
|
||
| ], | ||
| "filters": [ | ||
| "search" | ||
| ], | ||
| "elements": "", | ||
| "min": "", | ||
| "max": "", | ||
| "return_format": "id" | ||
| } | ||
| ], | ||
| "location": [ | ||
| [ | ||
| { | ||
| "param": "page_template", | ||
| "operator": "==", | ||
| "value": "templates\/cwos-feature.php" | ||
| } | ||
| ] | ||
| ], | ||
| "menu_order": 0, | ||
| "position": "normal", | ||
| "style": "default", | ||
| "label_placement": "top", | ||
| "instruction_placement": "label", | ||
| "hide_on_screen": "", | ||
| "active": 1, | ||
| "description": "", | ||
| "modified": 1443372484 | ||
| } |
| @@ -0,0 +1,120 @@ | ||
| { | ||
| "key": "group_56082129af919", | ||
| "title": "CWOS Custom Attributes", | ||
| "fields": [ | ||
| { | ||
| "key": "field_560821356ba18", | ||
| "label": "Primary Color", | ||
| "name": "primary_color", | ||
| "type": "color_picker", | ||
| "instructions": "", | ||
| "required": 0, | ||
| "conditional_logic": 0, | ||
| "wrapper": { | ||
| "width": "", | ||
| "class": "", | ||
| "id": "" | ||
| }, | ||
| "default_value": "" | ||
| }, | ||
| { | ||
| "key": "field_560821486ba19", | ||
| "label": "Secondary Color", | ||
| "name": "secondary_color", | ||
| "type": "color_picker", | ||
| "instructions": "", | ||
| "required": 0, | ||
| "conditional_logic": 0, | ||
| "wrapper": { | ||
| "width": "", | ||
| "class": "", | ||
| "id": "" | ||
| }, | ||
| "default_value": "" | ||
| }, | ||
| { | ||
| "key": "field_5608215f6ba1a", | ||
| "label": "Secondary Color Two", | ||
| "name": "secondary_color_two", | ||
| "type": "color_picker", | ||
| "instructions": "", | ||
| "required": 0, | ||
| "conditional_logic": 0, | ||
| "wrapper": { | ||
| "width": "", | ||
| "class": "", | ||
| "id": "" | ||
| }, | ||
| "default_value": "" | ||
| }, | ||
| { | ||
| "key": "field_5608218a6ba1b", | ||
| "label": "CWOS Artists", | ||
| "name": "cwos_artists", | ||
| "type": "relationship", | ||
| "instructions": "", | ||
| "required": 0, | ||
| "conditional_logic": 0, | ||
| "wrapper": { | ||
| "width": "", | ||
| "class": "", | ||
| "id": "" | ||
| }, | ||
| "post_type": [ | ||
| "artists" | ||
| ], | ||
| "taxonomy": [ | ||
|
|
||
| ], | ||
| "filters": [ | ||
| "search" | ||
| ], | ||
| "elements": "", | ||
| "min": "", | ||
| "max": "", | ||
| "return_format": "id" | ||
| }, | ||
| { | ||
| "key": "field_560821b06ba1c", | ||
| "label": "Background Pattern", | ||
| "name": "background_pattern", | ||
| "type": "image", | ||
| "instructions": "", | ||
| "required": 0, | ||
| "conditional_logic": 0, | ||
| "wrapper": { | ||
| "width": "", | ||
| "class": "", | ||
| "id": "" | ||
| }, | ||
| "return_format": "url", | ||
| "preview_size": "thumbnail", | ||
| "library": "all", | ||
| "min_width": "", | ||
| "min_height": "", | ||
| "min_size": "", | ||
| "max_width": "", | ||
| "max_height": "", | ||
| "max_size": "", | ||
| "mime_types": "" | ||
| } | ||
| ], | ||
| "location": [ | ||
| [ | ||
| { | ||
| "param": "options_page", | ||
| "operator": "==", | ||
| "value": "acf-options-cwos-opts" | ||
| } | ||
| ] | ||
| ], | ||
| "menu_order": 0, | ||
| "position": "normal", | ||
| "style": "default", | ||
| "label_placement": "top", | ||
| "instruction_placement": "label", | ||
| "hide_on_screen": "", | ||
| "active": 1, | ||
| "description": "", | ||
| "modified": 1443373543 | ||
| } |
| @@ -0,0 +1,28 @@ | ||
| <?php get_header('cwos'); ?> | ||
| <div class="row"> | ||
| <!-- Row for main content area --> | ||
| <div class="small-12 large-12 columns" role="main"> | ||
|
|
||
| <?php if ( have_posts() ) : ?> | ||
|
|
||
| <?php /* Start the Loop */ ?> | ||
| <?php while ( have_posts() ) : the_post(); ?> | ||
| <?php get_template_part( 'partials/content', get_post_format() ); ?> | ||
| <?php endwhile; ?> | ||
|
|
||
| <?php else : ?> | ||
| <?php get_template_part( 'partials/content', 'none' ); ?> | ||
|
|
||
| <?php endif; // end have_posts() check ?> | ||
|
|
||
| <?php /* Display navigation to next/previous pages when applicable */ ?> | ||
| <?php if ( function_exists('SimpleSpaceship_pagination') ) { SimpleSpaceship_pagination(); } else if ( is_paged() ) { ?> | ||
| <nav id="post-nav"> | ||
| <div class="post-previous"><?php next_posts_link( __( '← Older posts', 'SimpleSpaceship' ) ); ?></div> | ||
| <div class="post-next"><?php previous_posts_link( __( 'Newer posts →', 'SimpleSpaceship' ) ); ?></div> | ||
| </nav> | ||
| <?php } ?> | ||
|
|
||
| </div> | ||
| </div> | ||
| <?php get_footer(); ?> |
| @@ -33,6 +33,6 @@ | ||
| "commit": "7751e69b615c6eca6f783a81e292a55725af6b85" | ||
| }, | ||
| "_source": "git://github.com/jquery/jquery.git", | ||
| "_target": ">=1.7", | ||
| "_originalSource": "jquery" | ||
| } | ||
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "name": "masonry", | ||
| "version": "3.3.2", | ||
| "description": "Cascading grid layout library", | ||
| "main": "masonry.js", | ||
| "dependencies": { | ||
| @@ -1,5 +1,5 @@ | ||
| /*! | ||
| * Masonry v3.3.2 | ||
| * Cascading grid layout library | ||
| * http://masonry.desandro.com | ||
| * MIT License | ||
| @@ -0,0 +1,110 @@ | ||
| <!doctype html> | ||
| <html> | ||
| <head> | ||
| <meta charset="utf-8"> | ||
|
|
||
| <title>add items</title> | ||
|
|
||
| <style> | ||
| * { | ||
| -webkit-box-sizing: border-box; | ||
| box-sizing: border-box; | ||
| } | ||
|
|
||
| .grid { | ||
| background: #DDD; | ||
| } | ||
|
|
||
| /* clearfix */ | ||
| .grid:after { | ||
| display: block; | ||
| content: ''; | ||
| clear: both; | ||
| } | ||
|
|
||
|
|
||
| .grid-sizer, | ||
| .grid-item { | ||
| width: 25%; | ||
| } | ||
|
|
||
| .grid-item { | ||
| border: 1px solid; | ||
| background: #09F; | ||
| height: 100px; | ||
| } | ||
|
|
||
| .grid-item--width2 { width: 50%; } | ||
|
|
||
| .grid-item--height2 { height: 160px; } | ||
|
|
||
| .grid-item--height3 { height: 220px; } | ||
|
|
||
| </style> | ||
|
|
||
| </head> | ||
| <body> | ||
|
|
||
| <h1>add items</h1> | ||
|
|
||
| <p> | ||
| <button class="prepend-button">Prepend button</button> | ||
| <button class="append-button">Append button</button> | ||
| </p> | ||
|
|
||
| <div class="grid"> | ||
| <div class="grid-sizer"></div> | ||
| <div class="grid-item grid-item--width2"></div> | ||
| <div class="grid-item grid-item--height2"></div> | ||
| </div> | ||
|
|
||
|
|
||
| <script src="../bower_components/eventEmitter/EventEmitter.js"></script> | ||
| <script src="../bower_components/eventie/eventie.js"></script> | ||
| <script src="../bower_components/doc-ready/doc-ready.js"></script> | ||
| <script src="../bower_components/get-style-property/get-style-property.js"></script> | ||
| <script src="../bower_components/get-size/get-size.js"></script> | ||
| <script src="../bower_components/jquery-bridget/jquery.bridget.js"></script> | ||
| <script src="../bower_components/matches-selector/matches-selector.js"></script> | ||
| <script src="../bower_components/fizzy-ui-utils/utils.js"></script> | ||
| <script src="../bower_components/outlayer/item.js"></script> | ||
| <script src="../bower_components/outlayer/outlayer.js"></script> | ||
|
|
||
| <script src="../masonry.js"></script> | ||
|
|
||
| <script> | ||
| function getItemElement() { | ||
| var elem = document.createElement('div'); | ||
| var wRand = Math.random(); | ||
| var hRand = Math.random(); | ||
| var widthClass = wRand > 0.8 ? 'grid-item--width3' : | ||
| wRand > 0.6 ? 'grid-item--width2' : ''; | ||
| var heightClass = hRand > 0.8 ? 'grid-item--height3' : | ||
| hRand > 0.5 ? 'grid-item--height2' : ''; | ||
| elem.className = 'grid-item ' + widthClass + ' ' + heightClass; | ||
| return elem; | ||
| }; | ||
|
|
||
| docReady( function() { | ||
| var msnry = window.msnry = new Masonry( '.grid', { | ||
| columnWidth: '.grid-sizer', | ||
| percentPosition: true | ||
| }); | ||
|
|
||
| document.querySelector('.prepend-button').addEventListener( 'click', function() { | ||
| var itemElem = getItemElement(); | ||
| msnry.element.insertBefore( itemElem, msnry.element.firstChild ); | ||
| msnry.prepended( itemElem ); | ||
| }); | ||
|
|
||
| document.querySelector('.append-button').addEventListener( 'click', function() { | ||
| var itemElem = getItemElement(); | ||
| msnry.element.appendChild( itemElem ); | ||
| msnry.appended( itemElem ); | ||
| }); | ||
|
|
||
| }); | ||
| </script> | ||
|
|
||
| </body> | ||
| </html> |
| @@ -0,0 +1,89 @@ | ||
| <!doctype html> | ||
| <html> | ||
| <head> | ||
| <meta charset="utf-8"> | ||
|
|
||
| <title>fluid</title> | ||
|
|
||
| <style> | ||
| * { | ||
| -webkit-box-sizing: border-box; | ||
| box-sizing: border-box; | ||
| } | ||
|
|
||
| .grid { | ||
| background: #DDD; | ||
| } | ||
|
|
||
| /* clearfix */ | ||
| .grid:after { | ||
| display: block; | ||
| content: ''; | ||
| clear: both; | ||
| } | ||
|
|
||
|
|
||
| .grid-sizer, | ||
| .grid-item { | ||
| width: 25%; | ||
| } | ||
|
|
||
| .grid-item { | ||
| border: 1px solid; | ||
| background: #09F; | ||
| height: 100px; | ||
| } | ||
|
|
||
| .grid-item--width2 { width: 50%; } | ||
|
|
||
| .grid-item--height2 { height: 160px; } | ||
|
|
||
| .grid-item--height3 { height: 220px; } | ||
|
|
||
| </style> | ||
|
|
||
| </head> | ||
| <body> | ||
|
|
||
| <h1>fluid</h1> | ||
|
|
||
| <div class="grid"> | ||
| <div class="grid-sizer"></div> | ||
| <div class="grid-item grid-item--width2"></div> | ||
| <div class="grid-item"></div> | ||
| <div class="grid-item grid-item--height3"></div> | ||
| <div class="grid-item"></div> | ||
| <div class="grid-item grid-item--width2 grid-item--height2"></div> | ||
| <div class="grid-item"></div> | ||
| <div class="grid-item"></div> | ||
| <div class="grid-item grid-item--width2"></div> | ||
| <div class="grid-item grid-item--height3"></div> | ||
| <div class="grid-item"></div> | ||
| <div class="grid-item"></div> | ||
| </div> | ||
|
|
||
|
|
||
| <script src="../bower_components/eventEmitter/EventEmitter.js"></script> | ||
| <script src="../bower_components/eventie/eventie.js"></script> | ||
| <script src="../bower_components/doc-ready/doc-ready.js"></script> | ||
| <script src="../bower_components/get-style-property/get-style-property.js"></script> | ||
| <script src="../bower_components/get-size/get-size.js"></script> | ||
| <script src="../bower_components/jquery-bridget/jquery.bridget.js"></script> | ||
| <script src="../bower_components/matches-selector/matches-selector.js"></script> | ||
| <script src="../bower_components/fizzy-ui-utils/utils.js"></script> | ||
| <script src="../bower_components/outlayer/item.js"></script> | ||
| <script src="../bower_components/outlayer/outlayer.js"></script> | ||
|
|
||
| <script src="../masonry.js"></script> | ||
|
|
||
| <script> | ||
| docReady( function() { | ||
| window.msnry = new Masonry( '.grid', { | ||
| columnWidth: '.grid-sizer', | ||
| percentPosition: true | ||
| }); | ||
| }); | ||
| </script> | ||
|
|
||
| </body> | ||
| </html> |
| @@ -0,0 +1,43 @@ | ||
| { | ||
| "name": "minigrid", | ||
| "main": "index.js", | ||
| "version": "1.6.3", | ||
| "homepage": "http://alves.im/minigrid", | ||
| "authors": [ | ||
| "Henrique Alves <henriquea@gmail.com>" | ||
| ], | ||
| "description": "Minimal 2kb zero dependency cascading grid layout", | ||
| "moduleType": [ | ||
| "amd", | ||
| "globals", | ||
| "node" | ||
| ], | ||
| "keywords": [ | ||
| "layout", | ||
| "grid", | ||
| "min", | ||
| "mini", | ||
| "minigrid", | ||
| "minimal", | ||
| "javascript", | ||
| "responsive" | ||
| ], | ||
| "license": "MIT", | ||
| "ignore": [ | ||
| "**/.*", | ||
| "node_modules", | ||
| "bower_components", | ||
| "test", | ||
| "tests" | ||
| ], | ||
| "_release": "1.6.3", | ||
| "_resolution": { | ||
| "type": "version", | ||
| "tag": "v1.6.3", | ||
| "commit": "c2ca9e986777fb554e77594552c8f276c9268311" | ||
| }, | ||
| "_source": "git://github.com/henriquea/minigrid.git", | ||
| "_target": "~1.6.3", | ||
| "_originalSource": "minigrid", | ||
| "_direct": true | ||
| } |
| @@ -0,0 +1,21 @@ | ||
| **Be nice** 😎 | ||
|
|
||
| Bare in mind that minigrid's main concept is simplicity. The goal is to keep the API always at 2kb. Bug fixes are more than welcome! For any new feature please [submit an issue](https://github.com/henriquea/minigrid/issues) first before send any pull request. | ||
|
|
||
| Thank you all! 🍺 | ||
|
|
||
| ## Tests | ||
|
|
||
| All commits need pass the tests `npm run test`. | ||
|
|
||
| Install browserify and testling globally. | ||
|
|
||
| ```bash | ||
| $ npm install | ||
| $ npm install browserify -g | ||
| $ npm install testling -g | ||
| ``` | ||
|
|
||
| ## Build | ||
|
|
||
| The build task `npm run build` runs the tests and does the minification. |
| @@ -0,0 +1,22 @@ | ||
| The MIT License (MIT) | ||
|
|
||
| Copyright (c) 2015 Henrique Alves | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. | ||
|
|
| @@ -0,0 +1,111 @@ | ||
|  | ||
|
|
||
| Minigrid is a minimal 2kb zero dependency cascading grid layout. | ||
|
|
||
| **[Demo](http://alves.im/minigrid/)** | ||
|
|
||
| ## Install | ||
|
|
||
| `npm install minigrid` | ||
|
|
||
| Using Bower: | ||
|
|
||
| `bower install minigrid` | ||
|
|
||
| ## Usage | ||
|
|
||
| ```html | ||
| <div class="grid"> | ||
| <div class="grid-item"></div> | ||
| <div class="grid-item"></div> | ||
| <div class="grid-item"></div> | ||
| <div class="grid-item"></div> | ||
| </div> | ||
| ``` | ||
|
|
||
| ```js | ||
| var grid = require('minigrid'); | ||
| grid('.grid', '.grid-item'); | ||
| ``` | ||
|
|
||
| ## API | ||
|
|
||
| ### `minigrid(gridContainer, itemSelector, gutter, animate, done)` | ||
|
|
||
| - **gridContainer** - `string`|`node`: required. The element selector or element where your grid items sit. | ||
| - **itemSelector** - `string`: required. The grid item element selector. | ||
| - **gutter** - `number`: optional. The space between items, the default is `6`. | ||
| - **animate(element, x, y, index)** - `function`: optional. | ||
| - **done(nodeList)** - `function`: optional. Callback called after the grid is built. It returns the node list of grid items. | ||
|
|
||
| #### `animate` | ||
|
|
||
| It returns a function with the `element`,`x`,`y` and `index` parameters for each grid item. | ||
|
|
||
| ```js | ||
| function animate(el, x, y, index) { | ||
| // Use your favourite library for animate the element | ||
| } | ||
| minigrid('.grid', '.grid-item', 6, animate); | ||
| ``` | ||
|
|
||
| ## Responsiveness | ||
|
|
||
| minigrid is dead-simple and doesn't provide anything in-the-box but you can do: | ||
|
|
||
| ```js | ||
| window.addEventListener('resize', function(){ | ||
| minigrid('.grid', '.grid-item'); | ||
| }); | ||
| ``` | ||
|
|
||
| [Demo](http://output.jsbin.com/maroda/9/) | ||
|
|
||
| ## Animation | ||
|
|
||
| The simple solution is to add a CSS `transition` in your grid item: | ||
|
|
||
| ```css | ||
| .grid-item { | ||
| transition: .3s ease-in-out; | ||
| } | ||
| ``` | ||
|
|
||
| [Demo](http://output.jsbin.com/maroda/10/) | ||
|
|
||
| Or take it to the next level by using your favourite library. The example bellow is using the awesome [Dynamics.js](http://dynamicsjs.com) library: | ||
|
|
||
| ```js | ||
| function animate(item, x, y, index) { | ||
| dynamics.animate(item, { | ||
| translateX: x, | ||
| translateY: y | ||
| }, { | ||
| type: dynamics.spring, | ||
| duration: 800, | ||
| frequency: 120, | ||
| delay: 100 + index * 30 | ||
| }); | ||
| } | ||
| minigrid('.grid', '.grid-item', 6, animate); | ||
| ``` | ||
| [Demo](http://output.jsbin.com/maroda/11/) | ||
|
|
||
| ## Limitations | ||
|
|
||
| Minigrid won't fit all cases. It was done having in mind "cards" with same width and different heights. It won't work if your grid item has different width sizes. | ||
|
|
||
| If you need more control I'd recommend [Isotope](http://isotope.metafizzy.co). | ||
|
|
||
| ## Built with Minigrid | ||
|
|
||
| Please [let me know](https://twitter.com/healves82) where are you using Minigrid. | ||
|
|
||
| ## Contributing | ||
|
|
||
| Plese see [CONTRIBUTING](CONTRIBUTING.md). | ||
|
|
||
| ## License | ||
|
|
||
| MIT © 2015 [Henrique Alves](http://alves.im) |
| @@ -0,0 +1,33 @@ | ||
| { | ||
| "name": "minigrid", | ||
| "main": "index.js", | ||
| "version": "1.6.3", | ||
| "homepage": "http://alves.im/minigrid", | ||
| "authors": [ | ||
| "Henrique Alves <henriquea@gmail.com>" | ||
| ], | ||
| "description": "Minimal 2kb zero dependency cascading grid layout", | ||
| "moduleType": [ | ||
| "amd", | ||
| "globals", | ||
| "node" | ||
| ], | ||
| "keywords": [ | ||
| "layout", | ||
| "grid", | ||
| "min", | ||
| "mini", | ||
| "minigrid", | ||
| "minimal", | ||
| "javascript", | ||
| "responsive" | ||
| ], | ||
| "license": "MIT", | ||
| "ignore": [ | ||
| "**/.*", | ||
| "node_modules", | ||
| "bower_components", | ||
| "test", | ||
| "tests" | ||
| ] | ||
| } |
| @@ -0,0 +1,80 @@ | ||
| /* @license minigrid v1.6.3 - minimal cascading grid layout http://alves.im/minigrid */ | ||
| (function(exports){ | ||
|
|
||
| 'use strict'; | ||
|
|
||
| var transformProp; | ||
| (function () { | ||
| var style = document.createElement('a').style; | ||
| var prop; | ||
| if (style[prop = 'webkitTransform'] !== undefined) { | ||
| transformProp = prop; | ||
| } | ||
| if (style[prop = 'msTransform'] !== undefined) { | ||
| transformProp = prop; | ||
| } | ||
| if (style[prop = 'transform'] !== undefined) { | ||
| transformProp = prop; | ||
| } | ||
| } ()); | ||
|
|
||
| function minigrid(gridContainer, itemSelector, gutter, animate, done) { | ||
| var forEach = Array.prototype.forEach; | ||
| var containerEle = gridContainer instanceof Node ? gridContainer : document.querySelector(gridContainer); | ||
| if (!containerEle) { return false; } | ||
| var itemsNodeList = containerEle.querySelectorAll(itemSelector); | ||
| if (itemsNodeList.length === 0) { return false; } | ||
| gutter = (typeof gutter === "number" && isFinite(gutter) | ||
| && Math.floor(gutter) === gutter) ? gutter : 6; | ||
| containerEle.style.width = ''; | ||
| var containerWidth = containerEle.getBoundingClientRect().width; | ||
| var firstChildWidth = itemsNodeList[0].getBoundingClientRect().width + gutter; | ||
| var cols = Math.max(Math.floor((containerWidth - gutter) / firstChildWidth), 1); | ||
| var count = 0; | ||
| containerWidth = (firstChildWidth * cols + gutter) + 'px'; | ||
| containerEle.style.width = containerWidth; | ||
| containerEle.style.position = 'relative'; | ||
|
|
||
| for (var itemsGutter = [], itemsPosX = [], g = 0; g < cols; g++) { | ||
| itemsPosX.push(g * firstChildWidth + gutter); | ||
| itemsGutter.push(gutter); | ||
| } | ||
|
|
||
| forEach.call(itemsNodeList, function(item){ | ||
| var itemIndex = itemsGutter.slice(0).sort(function (a, b) { | ||
| return a - b; | ||
| }).shift(); | ||
| itemIndex = itemsGutter.indexOf(itemIndex); | ||
| var posX = itemsPosX[itemIndex]; | ||
| var posY = itemsGutter[itemIndex]; | ||
| item.style.position = 'absolute'; | ||
| if (!animate && transformProp) { | ||
| item.style[transformProp] = 'translate3D(' + posX + 'px,' + posY + 'px,0)'; | ||
| } | ||
| itemsGutter[itemIndex] += item.getBoundingClientRect().height + gutter; | ||
| count = count + 1; | ||
| if (animate) { | ||
| return animate(item, posX, posY, count); | ||
| } | ||
| }); | ||
|
|
||
| var containerHeight = itemsGutter.slice(0).sort(function (a, b) { | ||
| return a - b; | ||
| }).pop(); | ||
|
|
||
| containerEle.style.height = containerHeight + 'px'; | ||
|
|
||
| if (typeof done === 'function'){ | ||
| done(itemsNodeList); | ||
| } | ||
| } | ||
|
|
||
| if (typeof define === 'function' && define.amd) { | ||
| define(function() { return minigrid; }); | ||
| } else if (typeof module !== 'undefined' && module.exports) { | ||
| module.exports = minigrid; | ||
| } else { | ||
| exports.minigrid = minigrid; | ||
| } | ||
|
|
||
| })(this); |
| @@ -0,0 +1,39 @@ | ||
| { | ||
| "name": "minigrid", | ||
| "version": "1.6.3", | ||
| "description": "Minimal 2kb zero dependency cascading grid layout", | ||
| "main": "index.js", | ||
| "scripts": { | ||
| "uglify": "uglifyjs --comments -m -c -o minigrid.min.js index.js", | ||
| "test": "browserify test.js | tape-run", | ||
| "build": "npm run test && npm run uglify" | ||
| }, | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/henriquea/minigrid.git" | ||
| }, | ||
| "keywords": [ | ||
| "min", | ||
| "mini", | ||
| "grid", | ||
| "minigrid", | ||
| "cascading", | ||
| "layout", | ||
| "javascript", | ||
| "minimal", | ||
| "responsive" | ||
| ], | ||
| "author": "Henrique Alves <henriquea@gmail.com> (http://alves.im)", | ||
| "license": "MIT", | ||
| "bugs": { | ||
| "url": "https://github.com/henriquea/minigrid/issues" | ||
| }, | ||
| "homepage": "http://alves.im/minigrid", | ||
| "devDependencies": { | ||
| "phantomjs": "1.9.2-6", | ||
| "browserify": "^11.0.1", | ||
| "tape": "^4.0.2", | ||
| "tape-run": "^1.1.0", | ||
| "uglify-js": "^2.4.24" | ||
| } | ||
| } |
| @@ -0,0 +1,28 @@ | ||
| 'use restrict'; | ||
|
|
||
| var minigrid = require('./'); | ||
| var test = require('tape'); | ||
|
|
||
| test('minigrid init with empty container', function(t){ | ||
| t.equal(minigrid('.grid', '.grid-item'), false, 'return false'); | ||
| t.end(); | ||
| }); | ||
|
|
||
| test('minigrid init with empty node list', function(t){ | ||
| t.equal(minigrid('.grid', '.grid-item'), false, 'return false'); | ||
| t.end(); | ||
| }); | ||
|
|
||
| test('minigrid done callback', function(t){ | ||
| var grid = document.createElement('div'); | ||
| grid.classList.add('grid'); | ||
| document.body.appendChild(grid); | ||
| var gridItem = document.createElement('div'); | ||
| gridItem.classList.add('grid-item'); | ||
| grid.appendChild(gridItem); | ||
| minigrid('.grid', '.grid-item', 6, null, function(nodeList){ | ||
| t.equal(typeof nodeList.length, 'number', 'nodeList.lenght is number'); | ||
| t.equal(nodeList.length > 0, true, nodeList.length + ' grid items'); | ||
| t.end(); | ||
| }); | ||
| }); |
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "name": "outlayer", | ||
| "version": "1.4.2", | ||
| "description": "the brains and guts of a layout library", | ||
| "main": "outlayer.js", | ||
| "dependencies": { | ||
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "name": "slick-carousel", | ||
| "version": "1.5.8", | ||
| "description": "the last carousel you'll ever need", | ||
| "main": "slick/slick.js", | ||
| "repository": { | ||
| @@ -9,7 +9,7 @@ | ||
| "touch", | ||
| "mobile" | ||
| ], | ||
| "version": "1.5.8", | ||
| "author": { | ||
| "name": "Ken Wheeler", | ||
| "url": "http://kenwheeler.github.io" | ||
| @@ -113,4 +113,7 @@ | ||
| height: auto; | ||
|
|
||
| border: 1px solid transparent; | ||
| } | ||
| .slick-arrow.slick-hidden { | ||
| display: none; | ||
| } | ||
| @@ -93,4 +93,7 @@ | ||
| height: auto; | ||
| border: 1px solid transparent; | ||
| } | ||
| } | ||
| .slick-arrow.slick-hidden { | ||
| display: none; | ||
| } | ||
| @@ -1,4 +1,3 @@ | ||
| <section class="footer-border"> | ||
| <div class="row"> | ||
| <ul class="sub-nav"> | ||
| @@ -0,0 +1,79 @@ | ||
| <?php | ||
| global $post; | ||
| ?> | ||
|
|
||
| <!doctype html> | ||
| <html class="no-js" <?php language_attributes(); ?> > | ||
| <head> | ||
| <meta charset="utf-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title><?php if ( is_category() ) { | ||
| echo 'Category Archive for "'; single_cat_title(); echo '" | '; bloginfo( 'name' ); | ||
| } elseif ( is_tag() ) { | ||
| echo 'Tag Archive for "'; single_tag_title(); echo '" | '; bloginfo( 'name' ); | ||
| } elseif ( is_archive() ) { | ||
| wp_title(''); echo ' Archive | '; bloginfo( 'name' ); | ||
| } elseif ( is_search() ) { | ||
| echo 'Search for "'.esc_html($s).'" | '; bloginfo( 'name' ); | ||
| } elseif ( is_home() || is_front_page() ) { | ||
| bloginfo( 'name' ); echo ' | '; bloginfo( 'description' ); | ||
| } elseif ( is_404() ) { | ||
| echo 'Error 404 Not Found | '; bloginfo( 'name' ); | ||
| } elseif ( is_single() ) { | ||
| wp_title(''); | ||
| } else { | ||
| echo wp_title( ' | ', 'false', 'right' ); bloginfo( 'name' ); | ||
| } ?></title> | ||
|
|
||
| <style> | ||
| html { | ||
| background: url("<?php the_field('background_pattern','option') ?>") repeat; | ||
| } | ||
| .cwos-menu.top-bar-container, .footer-border, .footer-border ul.sub-nav li { | ||
| background-color: <?php the_field('primary_color', 'option'); ?> !important; | ||
| } | ||
| .cwos-menu > nav.top-bar[role="navigation"] { | ||
| margin-top: 0; | ||
| } | ||
| .cwos-sub-nav { | ||
| background: #fff; | ||
| margin-bottom: 1rem; | ||
| } | ||
| .cwos-sub-nav .sub-nav {margin: .125rem 0 .125rem;} | ||
| </style> | ||
|
|
||
| <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri() ; ?>/css/foundation.css" /> | ||
|
|
||
| <link rel="icon" href="<?php echo get_stylesheet_directory_uri() ; ?>/assets/img/icons/favicon.ico" type="image/x-icon"> | ||
| <link rel="apple-touch-icon-precomposed" sizes="144x144" href="<?php echo get_stylesheet_directory_uri() ; ?>/assets/img/icons/apple-touch-icon-144x144-precomposed.png"> | ||
| <link rel="apple-touch-icon-precomposed" sizes="114x114" href="<?php echo get_stylesheet_directory_uri() ; ?>/assets/img/icons/apple-touch-icon-114x114-precomposed.png"> | ||
| <link rel="apple-touch-icon-precomposed" sizes="72x72" href="<?php echo get_stylesheet_directory_uri() ; ?>/assets/img/icons/apple-touch-icon-72x72-precomposed.png"> | ||
| <link rel="apple-touch-icon-precomposed" href="<?php echo get_stylesheet_directory_uri() ; ?>/assets/img/icons/apple-touch-icon-precomposed.png"> | ||
|
|
||
| <?php wp_head(); ?> | ||
| </head> | ||
| <body <?php body_class(); ?>> | ||
| <?php do_action('SimpleSpaceship_after_body'); ?> | ||
|
|
||
| <div class="off-canvas-wrap" data-offcanvas> | ||
|
|
||
|
|
||
| <?php do_action('SimpleSpaceship_layout_start'); ?> | ||
|
|
||
| <nav class="tab-bar show-for-small-only"> | ||
| <section class="left-small"> | ||
| <a class="left-off-canvas-toggle menu-icon" href="#"><span></span></a> | ||
| </section> | ||
| <section class="middle tab-bar-section"> | ||
|
|
||
| <h1 class="title"><?php bloginfo( 'name' ); ?></h1> | ||
|
|
||
| </section> | ||
| </nav> | ||
|
|
||
| <?php get_template_part('partials/off-canvas-menu'); ?> | ||
|
|
||
| <!-- need to inject menu for CWOS --> | ||
| <?php get_template_part('partials/cwos-topbar'); ?> | ||
|
|
||
| <?php do_action('SimpleSpaceship_after_header'); ?> |
| @@ -0,0 +1,142 @@ | ||
| <?php | ||
|
|
||
| /** | ||
| * Register Menus | ||
| * http://codex.wordpress.org/Function_Reference/register_nav_menus#Examples | ||
| */ | ||
| register_nav_menus(array( | ||
| 'top-bar-l' => 'Left Top Bar', // registers the menu in the WordPress admin menu editor | ||
| 'top-bar-r' => 'Right Top Bar', | ||
| 'cwos-l' => 'CWOS Right Nav', | ||
| 'cwos-r' => 'CWOS Left Nav', | ||
| 'mobile-off-canvas' => 'Mobile' | ||
| )); | ||
|
|
||
|
|
||
| /** | ||
| * Left top bar | ||
| * http://codex.wordpress.org/Function_Reference/wp_nav_menu | ||
| */ | ||
| if ( ! function_exists( 'SimpleSpaceship_top_bar_l' ) ) { | ||
| function SimpleSpaceship_top_bar_l() { | ||
| wp_nav_menu(array( | ||
| 'container' => false, // remove nav container | ||
| 'container_class' => '', // class of container | ||
| 'menu' => '', // menu name | ||
| 'menu_class' => 'top-bar-menu left', // adding custom nav class | ||
| 'theme_location' => 'top-bar-l', // where it's located in the theme | ||
| 'before' => '', // before each link <a> | ||
| 'after' => '', // after each link </a> | ||
| 'link_before' => '', // before each link text | ||
| 'link_after' => '', // after each link text | ||
| 'depth' => 5, // limit the depth of the nav | ||
| 'fallback_cb' => false, // fallback function (see below) | ||
| 'walker' => new Roots_Nav_Walker() | ||
| )); | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * Right top bar | ||
| */ | ||
| if ( ! function_exists( 'SimpleSpaceship_top_bar_r' ) ) { | ||
| function SimpleSpaceship_top_bar_r() { | ||
| wp_nav_menu(array( | ||
| 'container' => false, // remove nav container | ||
| 'container_class' => '', // class of container | ||
| 'menu' => '', // menu name | ||
| 'menu_class' => 'top-bar-menu right', // adding custom nav class | ||
| 'theme_location' => 'top-bar-r', // where it's located in the theme | ||
| 'before' => '', // before each link <a> | ||
| 'after' => '', // after each link </a> | ||
| 'link_before' => '', // before each link text | ||
| 'link_after' => '', // after each link text | ||
| 'depth' => 5, // limit the depth of the nav | ||
| 'fallback_cb' => false, // fallback function (see below) | ||
| 'walker' => new Roots_Nav_Walker() | ||
| )); | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * Mobile off-canvas | ||
| */ | ||
| if ( ! function_exists( 'SimpleSpaceship_mobile_off_canvas' ) ) { | ||
| function SimpleSpaceship_mobile_off_canvas() { | ||
| wp_nav_menu(array( | ||
| 'container' => false, // remove nav container | ||
| 'container_class' => '', // class of container | ||
| 'menu' => '', // menu name | ||
| 'menu_class' => 'off-canvas-list', // adding custom nav class | ||
| 'theme_location' => 'mobile-off-canvas', // where it's located in the theme | ||
| 'before' => '', // before each link <a> | ||
| 'after' => '', // after each link </a> | ||
| 'link_before' => '', // before each link text | ||
| 'link_after' => '', // after each link text | ||
| 'depth' => 5, // limit the depth of the nav | ||
| 'fallback_cb' => false, // fallback function (see below) | ||
| 'walker' => new Roots_Nav_Walker() | ||
| )); | ||
| } | ||
| } | ||
|
|
||
| /* City Wide Open Studios Menus */ | ||
| if ( ! function_exists( 'cwos_top_bar_l' ) ) { | ||
| function cwos_top_bar_l() { | ||
| wp_nav_menu(array( | ||
| 'container' => false, // remove nav container | ||
| 'container_class' => '', // class of container | ||
| 'menu' => '', // menu name | ||
| 'menu_class' => 'top-bar-menu left', // adding custom nav class | ||
| 'theme_location' => 'cwos-l', // where it's located in the theme | ||
| 'before' => '', // before each link <a> | ||
| 'after' => '', // after each link </a> | ||
| 'link_before' => '', // before each link text | ||
| 'link_after' => '', // after each link text | ||
| 'depth' => 5, // limit the depth of the nav | ||
| 'fallback_cb' => false, // fallback function (see below) | ||
| 'walker' => new Roots_Nav_Walker() | ||
| )); | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * Right top bar for City Wide Open Studios | ||
| */ | ||
| if ( ! function_exists( 'cwos_top_bar_r' ) ) { | ||
| function cwos_top_bar_r() { | ||
| wp_nav_menu(array( | ||
| 'container' => false, // remove nav container | ||
| 'container_class' => '', // class of container | ||
| 'menu' => '', // menu name | ||
| 'menu_class' => 'top-bar-menu right', // adding custom nav class | ||
| 'theme_location' => 'cwos-r', // where it's located in the theme | ||
| 'before' => '', // before each link <a> | ||
| 'after' => '', // after each link </a> | ||
| 'link_before' => '', // before each link text | ||
| 'link_after' => '', // after each link text | ||
| 'depth' => 5, // limit the depth of the nav | ||
| 'fallback_cb' => false, // fallback function (see below) | ||
| 'walker' => new Roots_Nav_Walker() | ||
| )); | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * Add support for buttons in the top-bar menu: | ||
| * 1) In WordPress admin, go to Apperance -> Menus. | ||
| * 2) Click 'Screen Options' from the top panel and enable 'CSS CLasses' and 'Link Relationship (XFN)' | ||
| * 3) On your menu item, type 'has-form' in the CSS-classes field. Type 'button' in the XFN field | ||
| * 4) Save Menu. Your menu item will now appear as a button in your top-menu | ||
| */ | ||
| if ( ! function_exists( 'add_menuclass') ) { | ||
| function add_menuclass($ulclass) { | ||
| $find = array('/<a rel="button"/', '/<a title=".*?" rel="button"/'); | ||
| $replace = array('<a rel="button" class="button"', '<a rel="button" class="button"'); | ||
|
|
||
| return preg_replace($find, $replace, $ulclass, 1); | ||
| } | ||
| add_filter('wp_nav_menu','add_menuclass'); | ||
| } | ||
|
|
||
| ?> |
| @@ -0,0 +1,43 @@ | ||
| <?php | ||
| function artspace_sponsors() { | ||
|
|
||
| $labels = array( | ||
| 'name' => _x( 'Sponsors', 'Post Type General Name', 'text_domain' ), | ||
| 'singular_name' => _x( 'Sponsor', 'Post Type Singular Name', 'text_domain' ), | ||
| 'menu_name' => __( 'Sponsors', 'text_domain' ), | ||
| 'name_admin_bar' => __( 'Sponsors', 'text_domain' ), | ||
| 'parent_item_colon' => __( 'Parent Item:', 'text_domain' ), | ||
| 'all_items' => __( 'All Sponsors', 'text_domain' ), | ||
| 'add_new_item' => __( 'Add New Sponsor', 'text_domain' ), | ||
| 'add_new' => __( 'Add New', 'text_domain' ), | ||
| 'new_item' => __( 'New Sponsor', 'text_domain' ), | ||
| 'edit_item' => __( 'Edit Sponsor', 'text_domain' ), | ||
| 'update_item' => __( 'Update Sponsor', 'text_domain' ), | ||
| 'view_item' => __( 'View Sponsor', 'text_domain' ), | ||
| 'search_items' => __( 'Search Sponsor', 'text_domain' ), | ||
| 'not_found' => __( 'Not found', 'text_domain' ), | ||
| 'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ), | ||
| ); | ||
| $args = array( | ||
| 'label' => __( 'Sponsor', 'text_domain' ), | ||
| 'description' => __( 'Post Type Description', 'text_domain' ), | ||
| 'labels' => $labels, | ||
| 'supports' => array( 'title', 'thumbnail', ), | ||
| 'hierarchical' => false, | ||
| 'public' => true, | ||
| 'show_ui' => true, | ||
| 'show_in_menu' => true, | ||
| 'menu_position' => 5, | ||
| 'menu_icon' => 'dashicons-thumbs-up', | ||
| 'show_in_admin_bar' => false, | ||
| 'show_in_nav_menus' => false, | ||
| 'can_export' => true, | ||
| 'has_archive' => false, | ||
| 'exclude_from_search' => true, | ||
| 'publicly_queryable' => true, | ||
| 'capability_type' => 'page', | ||
| ); | ||
| register_post_type( 'sponsors', $args ); | ||
|
|
||
| } | ||
| add_action( 'init', 'artspace_sponsors', 0 ); |