├── Gruntfile.js ├── README.md ├── assets ├── css │ ├── admin.css │ ├── dev-mode.css │ ├── no-dev-mode.css │ ├── project.css │ ├── project.min.css │ └── scss │ │ ├── base │ │ ├── _global.scss │ │ ├── _mixins.scss │ │ ├── _slick.scss │ │ └── modaal.scss │ │ ├── blocks │ │ ├── _cards.scss │ │ ├── _collapsibles.scss │ │ ├── _content-with-media.scss │ │ ├── _content.scss │ │ ├── _featured-posts.scss │ │ ├── _gallery.scss │ │ ├── _posts-lists.scss │ │ ├── _slider.scss │ │ ├── _strap.scss │ │ └── _tabs.scss │ │ └── project.scss ├── images │ ├── averie-woodard-142413.jpg │ ├── dmitriy-ilkevich-437760.jpg │ ├── hipster-mum-236831.jpg │ ├── pete-bellis-143262.jpg │ ├── pete-bellis-189610.jpg │ └── toa-heftiba-195132.jpg ├── js │ ├── ace │ │ ├── ace.js │ │ ├── mode-html.js │ │ ├── theme-ambiance.js │ │ └── worker-html.js │ ├── admin-script.js │ ├── project.js │ ├── project.min.js │ ├── src │ │ └── project.js │ └── vendor │ │ ├── equalHeights.js │ │ ├── masonry.js │ │ ├── modaal.js │ │ ├── responsiveTabs.js │ │ ├── slick.js │ │ └── stellar.js └── sass │ ├── admin.scss │ ├── dev-mode.scss │ └── no-dev-mode.scss ├── conf ├── .eslintrc └── .jscsrc ├── lib ├── class-acffcb-fields.php ├── class-acffcb-flexible-content.php ├── class-acffcb-layouts.php ├── class-acffcb-repeaters.php ├── class-acffcb-template-loader.php ├── class-gamajo-template-loader.php ├── class-init.php ├── hex2rgb.php ├── jons-custom-functions.php └── template-functions.php ├── package.json ├── tasks ├── _template.js ├── build.js ├── css.js ├── default.js ├── js.js └── options │ ├── _template.js │ ├── clean.js │ ├── compress.js │ ├── concat.js │ ├── copy.js │ ├── cssmin.js │ ├── eslint.js │ ├── jscs.js │ ├── postcss.js │ ├── sass.js │ ├── uglify.js │ └── watch.js ├── templates ├── blocks │ ├── layout-base.php │ ├── layout-cards.php │ ├── layout-collapsibles.php │ ├── layout-content.php │ ├── layout-content_with_media.php │ ├── layout-featured_content.php │ ├── layout-gallery.php │ ├── layout-media.php │ ├── layout-post_list.php │ ├── layout-slider.php │ ├── layout-strap.php │ ├── layout-tabs.php │ └── parts │ │ ├── block-card.php │ │ ├── block-content.php │ │ ├── block-cta.php │ │ ├── block-featured_content.php │ │ ├── block-media.php │ │ ├── block-post_list.php │ │ ├── block-slider.php │ │ ├── block-title.php │ │ ├── collapsibles │ │ ├── collapsibles-content.php │ │ ├── collapsibles-panels.php │ │ └── collapsibles-title.php │ │ ├── media │ │ ├── media-code.php │ │ ├── media-content.php │ │ ├── media-gallery.php │ │ ├── media-image.php │ │ ├── media-map.php │ │ └── media-video.php │ │ └── tabs │ │ ├── tab-title.php │ │ ├── tabs-content.php │ │ ├── tabs-panes.php │ │ └── tabs-tabs.php └── content-blocks.php └── wcd-acf-page-builder.php /Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function (grunt) { 2 | 3 | // require `load-grunt-tasks`, which loads all grunt tasks defined in package.json 4 | require('load-grunt-tasks')(grunt); 5 | // load tasks defined in the `/tasks` folder 6 | grunt.loadTasks('tasks'); 7 | 8 | // Function to load the options for each grunt module 9 | var loadConfig = function (path) { 10 | var glob = require('glob'); 11 | var object = {}; 12 | var key; 13 | 14 | glob.sync('*', {cwd: path}).forEach(function(option) { 15 | key = option.replace(/\.js$/,''); 16 | object[key] = require(path + option); 17 | }); 18 | 19 | return object; 20 | }; 21 | 22 | var config = { 23 | pkg: grunt.file.readJSON('package.json'), 24 | env: process.env 25 | }; 26 | 27 | grunt.util._.extend(config, loadConfig('./tasks/options/')); 28 | 29 | grunt.initConfig(config); 30 | 31 | }; 32 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #ACF Page Builder 2 | 3 | ## Prerequisites 4 | * [Requires ACF Pro](https://www.advancedcustomfields.com/pro/) - uses ACF Flexible Content 5 | 6 | ### Description 7 | ACF Flexible content was originally created by Michael W Delaney to work with Bootstrap. I have modified this you use SASS and Grunt for basic styling, and Flexbox for the layout. 8 | 9 | ### Authors 10 | * **Michael W. Delaney** - *Initial work* - [Michael W. Delaney](https://github.com/MWDelaney) 11 | * **Jon Mather** - *This version* - [Jon Mather](https://github.com/WestCoastDigital) 12 | * **Salvattore** - *Masonry Layout* - [Salvattore](https://github.com//rnmp/salvattore) 13 | * **Matt Banks** - *Simple jQuery Equal Heights* - [Matt Banks]() 14 | * **Humaan** - *Modaal* - [Humaan](http://humaan.com) 15 | * **Ken Wheeler** - *Slick* - [Ken Wheeler](http://kenwheeler.github.io) 16 | * **Mark Dalgleish** - *Stellar* - [Mark Dalgleish](https://github.com/markdalgleish) 17 | * **Jelle Kralt** - *Responsive Tabs* - [Mark Dalgleish](https://github.com/jellekralt) -------------------------------------------------------------------------------- /assets/css/admin.css: -------------------------------------------------------------------------------- 1 | #acf-cfb_blocks .acf-media { 2 | min-height: 300px; } 3 | 4 | #acf-cfb_blocks .acf-cta { 5 | background-color: #efefef; 6 | min-height: 100px !important; } 7 | 8 | #acf-cfb_blocks .acf-field { 9 | transition: all .5s ease-in-out; 10 | position: relative; 11 | z-index: 10; 12 | background: #fff; } 13 | -------------------------------------------------------------------------------- /assets/css/dev-mode.css: -------------------------------------------------------------------------------- 1 | .acf-dev { 2 | background: #fcf8e3; 3 | top: 0; } 4 | .acf-dev label { 5 | color: #8a6d3b; } 6 | .acf-dev .button-primary { 7 | background-color: #f0ad4e !important; 8 | border-color: #eea236 !important; 9 | box-shadow: 0 1px 0 #eea236; 10 | text-shadow: 0 -1px 1px #eea236, 1px 0 1px #eea236, 0 1px 1px #eea236, -1px 0 1px #eea236; } 11 | .acf-dev .button-primary:active { 12 | box-shadow: inset 0 2px 0 #eea236; } 13 | 14 | [data-key*='tab_dev'] { 15 | background-color: #fcf8e3 !important; } 16 | [data-key*='tab_dev']:before { 17 | display: inline-block; 18 | width: 15px; 19 | height: 15px; 20 | font-size: 12px; 21 | line-height: 1; 22 | font-family: dashicons; 23 | content: "\f107"; } 24 | -------------------------------------------------------------------------------- /assets/css/no-dev-mode.css: -------------------------------------------------------------------------------- 1 | .acf-dev, 2 | [data-key*="-tab_dev"] { 3 | display: none !important; } 4 | -------------------------------------------------------------------------------- /assets/css/project.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Modaal - accessible modals - v0.3.1 3 | by Humaan, for all humans. 4 | http://humaan.com 5 | */.slick-loading .slick-slide,.slick-loading .slick-track{visibility:hidden}.modaal-noscroll{overflow:hidden}.modaal-accessible-hide{position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);padding:0!important;border:0!important;height:1px!important;width:1px!important;overflow:hidden}.modaal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:999;opacity:0}.modaal-wrapper{display:block;position:fixed;top:0;left:0;width:100%;height:100%;z-index:9999;overflow:auto;opacity:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;transition:all .3s ease-in-out}.modaal-wrapper *{box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-backface-visibility:hidden}.modaal-wrapper .modaal-close{border:none;background:0 0;padding:0;-webkit-appearance:none}.modaal-wrapper.modaal-start_none{display:none;opacity:1}.modaal-wrapper.modaal-start_fade{opacity:0}.modaal-wrapper [tabindex="0"]{outline:0!important}.modaal-wrapper.modaal-fullscreen{overflow:hidden}.modaal-outer-wrapper{display:table;position:relative;width:100%;height:100%}.modaal-fullscreen .modaal-outer-wrapper{display:block}.modaal-inner-wrapper{display:table-cell;width:100%;height:100%;position:relative;vertical-align:middle;text-align:center;padding:80px 25px}.modaal-fullscreen .modaal-inner-wrapper{padding:0;display:block;vertical-align:top}.modaal-container{position:relative;display:inline-block;width:100%;margin:auto;text-align:left;color:#000;max-width:1000px;border-radius:0;background:#fff;box-shadow:0 4px 15px rgba(0,0,0,.2);cursor:auto}.modaal-container.is_loading{height:100px;width:100px;overflow:hidden}.modaal-fullscreen .modaal-container{max-width:none;height:100%;overflow:auto}.modaal-close{position:fixed;right:20px;top:20px;color:#fff;cursor:pointer;opacity:1;width:50px;height:50px;background:0 0;border-radius:100%;transition:all .2s ease-in-out}.modaal-close:focus,.modaal-close:hover{outline:0;background:#fff}.modaal-close:focus:after,.modaal-close:focus:before,.modaal-close:hover:after,.modaal-close:hover:before{background:#b93d0c}.modaal-close span{position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);padding:0!important;border:0!important;height:1px!important;width:1px!important;overflow:hidden}.modaal-close:after,.modaal-close:before{display:block;content:" ";position:absolute;top:14px;left:23px;width:4px;height:22px;border-radius:4px;background:#fff;transition:background .2s ease-in-out}.modaal-close:before{transform:rotate(-45deg)}.modaal-close:after{transform:rotate(45deg)}.modaal-fullscreen .modaal-close{background:#afb7bc;right:10px;top:10px}.modaal-content-container{padding:30px}.modaal-confirm-wrap{padding:30px 0 0;text-align:center;font-size:0}.modaal-confirm-btn{font-size:14px;display:inline-block;margin:0 10px;vertical-align:middle;cursor:pointer;border:none;background:0 0}.modaal-confirm-btn.modaal-ok{padding:10px 15px;color:#fff;background:#555;border-radius:3px;transition:background .2s ease-in-out}.modaal-confirm-btn.modaal-ok:hover{background:#2f2f2f}.modaal-confirm-btn.modaal-cancel{text-decoration:underline}.modaal-confirm-btn.modaal-cancel:hover{text-decoration:none;color:#2f2f2f}@keyframes instaReveal{0%{opacity:0}100%{opacity:1}}.modaal-instagram .modaal-container{width:auto;background:0 0;box-shadow:none!important}.modaal-instagram .modaal-content-container{padding:0;background:0 0}.modaal-instagram .modaal-content-container>blockquote{width:1px!important;height:1px!important;opacity:0!important}.modaal-instagram iframe{opacity:0;margin:-6px!important;border-radius:0!important;width:1000px!important;max-width:800px!important;box-shadow:none!important;animation:instaReveal 1s linear forwards}.modaal-image .modaal-inner-wrapper{padding-left:140px;padding-right:140px}.modaal-image .modaal-container{width:auto;max-width:100%}.modaal-gallery-wrap{position:relative;color:#fff}.modaal-gallery-item{display:none}.modaal-gallery-item img,.modaal-gallery-item.is_active,.modaal-iframe-elem{display:block}.modaal-gallery-label{position:absolute;left:0;width:100%;margin:20px 0 0;font-size:18px;text-align:center;color:#fff}.modaal-gallery-label:focus{outline:0}.modaal-gallery-control{position:absolute;top:50%;transform:translateY(-50%);opacity:1;cursor:pointer;color:#fff;width:50px;height:50px;background:0 0;border:none;border-radius:100%;transition:all .2s ease-in-out}.modaal-gallery-control.is_hidden{opacity:0;cursor:default}.modaal-gallery-control:focus,.modaal-gallery-control:hover{outline:0;background:#fff}.modaal-gallery-control:focus:after,.modaal-gallery-control:focus:before,.modaal-gallery-control:hover:after,.modaal-gallery-control:hover:before{background:#afb7bc}.modaal-gallery-control span{position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);padding:0!important;border:0!important;height:1px!important;width:1px!important;overflow:hidden}.modaal-gallery-control:after,.modaal-gallery-control:before{display:block;content:" ";position:absolute;top:16px;left:25px;width:4px;height:18px;border-radius:4px;background:#fff;transition:background .2s ease-in-out}.modaal-gallery-control:before{margin:-5px 0 0;transform:rotate(-45deg)}.modaal-gallery-control:after{margin:5px 0 0;transform:rotate(45deg)}.modaal-gallery-next{left:100%;margin-left:40px}.modaal-gallery-prev{right:100%;margin-right:40px}.modaal-gallery-prev:after,.modaal-gallery-prev:before{left:22px}.modaal-gallery-prev:before{margin:5px 0 0;transform:rotate(-45deg)}.modaal-gallery-prev:after{margin:-5px 0 0;transform:rotate(45deg)}.modaal-video-wrap{margin:auto 50px;position:relative}.modaal-video-container{position:relative;padding-bottom:56.25%;height:0;overflow:hidden;box-shadow:0 0 10px rgba(0,0,0,.3);background:#000;max-width:1300px;margin-left:auto;margin-right:auto}.modaal-iframe .modaal-content,.modaal-iframe-elem{width:100%;height:100%}.modaal-video-container embed,.modaal-video-container iframe,.modaal-video-container object{position:absolute;top:0;left:0;width:100%;height:100%}@media only screen and (min-width:1400px){.modaal-video-container{padding-bottom:0;height:731px}}@media only screen and (max-width:1140px){.modaal-image .modaal-inner-wrapper{padding-left:25px;padding-right:25px}.modaal-gallery-control{top:auto;bottom:20px;transform:none;background:rgba(0,0,0,.7)}.modaal-gallery-control:after,.modaal-gallery-control:before{background:#fff}.modaal-gallery-next{left:auto;right:20px}.modaal-gallery-prev{left:20px;right:auto}}@media screen and (max-width:900px){.modaal-instagram iframe{width:500px!important}}@media screen and (max-height:1100px){.modaal-instagram iframe{width:700px!important}}@media screen and (max-height:1000px){.modaal-inner-wrapper{padding-top:60px;padding-bottom:60px}.modaal-instagram iframe{width:600px!important}}@media screen and (max-height:900px){.modaal-instagram iframe{width:500px!important}.modaal-video-container{max-width:900px;max-height:510px}}@media only screen and (max-width:600px){.modaal-instagram iframe{width:280px!important}}@media only screen and (max-height:820px){.modaal-gallery-label{display:none}}.modaal-loading-spinner{background:0 0;position:absolute;width:200px;height:200px;top:50%;left:50%;margin:-100px 0 0 -100px;transform:scale(.25)}@keyframes modaal-loading-spinner{0%{opacity:1;transform:scale(1.5)}100%{opacity:.1;transform:scale(1)}}.modaal-loading-spinner>div{width:24px;height:24px;margin-left:4px;margin-top:4px;position:absolute}.block-with-overlay,.slick-list,.slick-slider,.slick-track{position:relative}.modaal-loading-spinner>div>div{width:100%;height:100%;border-radius:15px;background:#fff}.modaal-loading-spinner>div:nth-of-type(1)>div{animation:modaal-loading-spinner 1s linear infinite;animation-delay:0s}.modaal-loading-spinner>div:nth-of-type(2)>div,.modaal-loading-spinner>div:nth-of-type(3)>div{-ms-animation:modaal-loading-spinner 1s linear infinite;-moz-animation:modaal-loading-spinner 1s linear infinite;-webkit-animation:modaal-loading-spinner 1s linear infinite;-o-animation:modaal-loading-spinner 1s linear infinite}.modaal-loading-spinner>div:nth-of-type(1){transform:translate(84px,84px) rotate(45deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(2)>div{animation:modaal-loading-spinner 1s linear infinite;animation-delay:.12s}.modaal-loading-spinner>div:nth-of-type(2){transform:translate(84px,84px) rotate(90deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(3)>div{animation:modaal-loading-spinner 1s linear infinite;animation-delay:.25s}.modaal-loading-spinner>div:nth-of-type(4)>div,.modaal-loading-spinner>div:nth-of-type(5)>div{-ms-animation:modaal-loading-spinner 1s linear infinite;-moz-animation:modaal-loading-spinner 1s linear infinite;-webkit-animation:modaal-loading-spinner 1s linear infinite;-o-animation:modaal-loading-spinner 1s linear infinite}.modaal-loading-spinner>div:nth-of-type(3){transform:translate(84px,84px) rotate(135deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(4)>div{animation:modaal-loading-spinner 1s linear infinite;animation-delay:.37s}.modaal-loading-spinner>div:nth-of-type(4){transform:translate(84px,84px) rotate(180deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(5)>div{animation:modaal-loading-spinner 1s linear infinite;animation-delay:.5s}.modaal-loading-spinner>div:nth-of-type(6)>div,.modaal-loading-spinner>div:nth-of-type(7)>div{-ms-animation:modaal-loading-spinner 1s linear infinite;-moz-animation:modaal-loading-spinner 1s linear infinite;-webkit-animation:modaal-loading-spinner 1s linear infinite;-o-animation:modaal-loading-spinner 1s linear infinite}.modaal-loading-spinner>div:nth-of-type(5){transform:translate(84px,84px) rotate(225deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(6)>div{animation:modaal-loading-spinner 1s linear infinite;animation-delay:.62s}.modaal-loading-spinner>div:nth-of-type(6){transform:translate(84px,84px) rotate(270deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(7)>div{animation:modaal-loading-spinner 1s linear infinite;animation-delay:.75s}.modaal-loading-spinner>div:nth-of-type(7){transform:translate(84px,84px) rotate(315deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(8)>div{animation:modaal-loading-spinner 1s linear infinite;animation-delay:.87s}.modaal-loading-spinner>div:nth-of-type(8){transform:translate(84px,84px) rotate(360deg) translate(70px,0)}.slick-slider{display:block;box-sizing:border-box;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-touch-action:pan-y;touch-action:pan-y;-webkit-tap-highlight-color:transparent}.slick-list{overflow:hidden;display:block;margin:0;padding:0}.slick-list:focus{outline:0}.slick-list.dragging{cursor:pointer;cursor:hand}.slick-slider .slick-list,.slick-slider .slick-track{transform:translate3d(0,0,0)}.slick-track{left:0;top:0;display:block;margin-left:auto;margin-right:auto}.slick-track:after,.slick-track:before{content:"";display:table}.slick-track:after{clear:both}.slick-slide{float:left;height:100%;min-height:1px;display:none}[dir=rtl] .slick-slide{float:right}.slick-slide img{display:block}.slick-slide.slick-loading img{display:none}.slick-slide.dragging img{pointer-events:none}.slick-initialized .slick-slide{display:block}.slick-vertical .slick-slide{display:block;height:auto;border:1px solid transparent}.slick-arrow.slick-hidden{display:none}img{max-width:100%;height:auto}.btn,.button,button{margin-bottom:1rem}.btn,.button,button,input[type=submit],input[type=reset],input[type=button]{display:inline-block;height:2.38rem;padding:0 1.88rem;color:#333;text-align:center;font-size:.69rem;font-weight:600;line-height:2.38rem;letter-spacing:.1rem;text-transform:uppercase;text-decoration:none;white-space:nowrap;background-color:transparent;border-radius:.25rem;border:1px solid #333;cursor:pointer;box-sizing:border-box}.block-wrap .block-title h2{text-align:center;margin-top:1.25rem;margin-bottom:1.25rem}.block-wrap .block-content{padding:1.25rem}.block-with-overlay:before{content:'';position:absolute;width:100%;height:100%}.block-with-overlay .block-content{position:relative;z-index:20}.block-with-parallax{background-size:cover;background-repeat:no-repeat}.block-strap .block-inner{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-top:.94rem;padding:1.5%;box-sizing:border-box}.block-strap .block-inner .block-strap-column{position:relative;margin-bottom:1.25rem;background:#fefff9;text-decoration:none;box-shadow:rgba(0,0,0,.19) 0 0 8px 0;border-radius:.25rem}@media (min-width:768px){.block-strap .block-inner .block-strap-column{max-width:20rem;margin-right:1.25rem;margin-bottom:1.25rem}.block-strap .block-inner .block-strap-column:nth-child(even){margin-right:0}}.block-content_with_media .block-inner{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;box-sizing:border-box}.block-content_with_media .block-inner .block-addon,.block-content_with_media .block-inner .block-the-content{max-width:50%}@media (max-width:768px){.block-strap .block-inner .block-strap-column{width:100%}.block-content_with_media .block-inner{-ms-flex-direction:column-reverse;flex-direction:column-reverse}.block-content_with_media .block-inner .block-addon,.block-content_with_media .block-inner .block-the-content{max-width:100%}.block .masonry[data-columns]::before{content:'1 .column.size-1of1'}}@media (min-width:768px) and (max-width:992px){.block .masonry[data-columns]::before{content:'2 .column.size-1of2'}}@media (min-width:992px){.block-strap .block-inner .block-strap-column:nth-child(even){margin-right:1.25rem}.block .masonry[data-columns]::before{content:'3 .column.size-1of3'}}.block .masonry{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:start;align-items:flex-start}.block .masonry:hover .hover .image{opacity:.7}.block .masonry .item{margin:0;height:100%;width:100%;overflow:hidden;display:block}.block .masonry .item .image{display:block;transition:all .8s ease-in-out}.block .masonry .item:hover .image{transform:scale(1.1)}.block .size-1of1{width:100%;overflow:hidden}.block .size-1of2{width:50%;overflow:hidden}.block .size-1of3{width:33.333%;overflow:hidden}.block-featured-content{display:block}.block-featured-content ul.featured-content-list{list-style:none;padding:0;margin:0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}.block-featured-content ul.featured-content-list li{margin-top:.62rem;margin-bottom:.62rem}@media (max-width:768px){.block-featured-content ul.featured-content-list li{width:100%}}@media (min-width:768px) and (max-width:992px){.block-featured-content ul.featured-content-list li{width:50%}}@media (min-width:992px){.block-featured-content ul.featured-content-list li{width:33.333%}}.block-featured-content ul.featured-content-list li .card{box-shadow:0 4px 8px 0 rgba(0,0,0,.2);transition:all .3s ease-in-out;background:#fff;margin:1.25rem}.block-featured-content ul.featured-content-list li .card:hover{box-shadow:0 8px 16px 0 rgba(0,0,0,.2);cursor:pointer}.block-featured-content ul.featured-content-list li .card figure img{width:100%;height:auto;display:block}.block-featured-content ul.featured-content-list li .card header{padding:.62rem;text-align:center}.block-featured-content ul.featured-content-list li .card header .post-title{margin-top:1.25rem;margin-bottom:1.25rem}.block-featured-content ul.featured-content-list li .card article{padding:.62rem}.block-cards{display:block}.block-cards ul.cards{list-style:none;padding:0;margin:0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}.block-cards ul.cards li{margin-top:.62rem;margin-bottom:.62rem}@media (max-width:768px){.block-cards ul.cards li{width:100%}}@media (min-width:768px) and (max-width:992px){.block-cards ul.cards li{width:50%}}@media (min-width:992px){.block-cards ul.cards li{width:33.333%}}.block-cards ul.cards li .card{box-shadow:0 4px 8px 0 rgba(0,0,0,.2);transition:all .3s ease-in-out;background:#fff;margin:1.25rem}.block-cards ul.cards li .card:hover{box-shadow:0 8px 16px 0 rgba(0,0,0,.2);cursor:pointer}.block-cards ul.cards li .card figure img{width:100%;height:auto;display:block}.block-cards ul.cards li .card header{padding:.62rem;text-align:center}.block-cards ul.cards li .card header .post-title{margin-top:1.25rem;margin-bottom:1.25rem}.block-cards ul.cards li .card article{padding:.62rem}.block-slider .slick .item .slide-container{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}.block-slider .slick .item .slide-container .block-addon{-ms-flex:1;flex:1}.block-slider .slick .item .slide-container .content{margin:.62rem;-ms-flex:1;flex:1}@media (max-width:544px){.block-slider .slick .item .slide-container{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}}.block-slider .slick-navigation{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;margin-top:1.25rem}.block-tabs .r-tabs .r-tabs-nav{margin:0;padding:0;display:-ms-flexbox;display:flex;-ms-flex-pack:distribute;justify-content:space-around}.block-tabs .r-tabs .r-tabs-nav .r-tabs-tab.r-tabs-state-active a,.block-tabs .r-tabs .r-tabs-nav .r-tabs-tab.r-tabs-state-default a{padding:0 1.88rem;font-size:.69rem;font-weight:600;display:block;line-height:2.38rem;letter-spacing:.1rem;text-transform:uppercase;text-decoration:none;white-space:nowrap;box-sizing:border-box;transition:all .3s ease-in-out;cursor:pointer;text-align:center}.block-tabs .r-tabs .r-tabs-nav .r-tabs-tab{margin:0;list-style:none;-ms-flex:1;flex:1}.block-collapsibles .tab-content,.block-tabs .r-tabs .r-tabs-panel{margin-top:1.25rem;margin-bottom:1.25rem;box-shadow:0 4px 8px 0 rgba(0,0,0,.2)}.block-tabs .r-tabs .r-tabs-nav .r-tabs-tab.r-tabs-state-default a{color:#333;background-color:#ccc}.block-tabs .r-tabs .r-tabs-nav .r-tabs-tab.r-tabs-state-active a{color:#fff;background-color:gray}.block-tabs .r-tabs .r-tabs-panel{padding:15px;display:none}.block-tabs .r-tabs .r-tabs-panel.r-tabs-state-active{display:block}.block-tabs .r-tabs .r-tabs-accordion-title{cursor:pointer;display:none}@media (max-width:768px){.block-tabs .r-tabs .r-tabs-nav{display:none}.block-tabs .r-tabs .r-tabs-accordion-title{display:block}.block-tabs .r-tabs .r-tabs-accordion-title a{color:#333;display:block;background-color:#ccc;padding:.62rem;position:relative}.block-tabs .r-tabs .r-tabs-accordion-title a:after{content:'+';right:1.88rem;position:absolute;font-size:1.5rem;font-weight:400;line-height:2.38rem;top:50%;transform:translateY(-50%)}.block-tabs .r-tabs .r-tabs-accordion-title.r-tabs-state-active a{color:#fff;background-color:#333}.block-tabs .r-tabs .r-tabs-accordion-title.r-tabs-state-active a:after{content:'-'}.post-list li{width:100%}}.block-collapsibles .accordion-link{color:#333;padding:0 1.88rem;font-size:.69rem;font-weight:600;line-height:2.38rem;letter-spacing:.1rem;text-transform:uppercase;text-decoration:none;white-space:nowrap;background-color:#ccc;cursor:pointer;box-sizing:border-box;display:block;transition:all .3s ease-in-out;position:relative}.block-collapsibles .accordion-link:after{content:'+';right:1.88rem;position:absolute;font-size:1.5rem;font-weight:400}.block-collapsibles .accordion-link.active{color:#fff;background-color:gray}.block-collapsibles .accordion-link.active:after{content:'-'}.block-collapsibles .tab-content{padding:15px}.post-list{list-style:none;padding:0;margin:0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}.post-list li{margin-top:.62rem;margin-bottom:.62rem}@media (min-width:768px) and (max-width:992px){.post-list li{width:50%}}@media (min-width:992px){.post-list li{width:33.333%}}.post-list li .card{box-shadow:0 4px 8px 0 rgba(0,0,0,.2);transition:all .3s ease-in-out;background:#fff;margin:1.25rem}.post-list li .card:hover{box-shadow:0 8px 16px 0 rgba(0,0,0,.2);cursor:pointer}.post-list li .card figure img{width:100%;height:auto;display:block}.post-list li .card header{padding:.62rem;text-align:center}.post-list li .card header .post-title{margin-top:1.25rem;margin-bottom:1.25rem}.post-list li .card header .post-meta{display:-ms-flexbox;display:flex;-ms-flex-pack:distribute;justify-content:space-around}.post-list li .card article{padding:.62rem} -------------------------------------------------------------------------------- /assets/css/scss/base/_global.scss: -------------------------------------------------------------------------------- 1 | img { 2 | max-width: 100%; 3 | height: auto; 4 | } 5 | button, .button, .btn { 6 | margin-bottom: 1rem; 7 | } 8 | .btn, .button, button, input[type="submit"], input[type="reset"], input[type="button"] { 9 | display: inline-block; 10 | height: pxToRem(38); 11 | padding: 0 pxToRem(30); 12 | color: #333; 13 | text-align: center; 14 | font-size: pxToRem(11); 15 | font-weight: 600; 16 | line-height: pxToRem(38); 17 | letter-spacing: .1rem; 18 | text-transform: uppercase; 19 | text-decoration: none; 20 | white-space: nowrap; 21 | background-color: transparent; 22 | border-radius: pxToRem(4); 23 | border: 1px solid #333; 24 | cursor: pointer; 25 | box-sizing: border-box; 26 | } 27 | .block-wrap { 28 | .block-title { 29 | h2 { 30 | text-align: center; 31 | margin-top: pxToRem(20); 32 | margin-bottom: pxToRem(20); 33 | } 34 | } 35 | .block-content { 36 | padding: pxToRem(20); 37 | } 38 | } 39 | .block-with-overlay { 40 | position: relative; 41 | &:before { 42 | content: ''; 43 | position: absolute; 44 | width: 100%; 45 | height: 100%; 46 | } 47 | .block-content { 48 | position: relative; 49 | z-index: 20; 50 | } 51 | } 52 | .block-with-parallax { 53 | background-size: cover; 54 | background-repeat: no-repeat; 55 | }// block-with-parallax -------------------------------------------------------------------------------- /assets/css/scss/base/_mixins.scss: -------------------------------------------------------------------------------- 1 | //** PIXTOREM **// 2 | $gridUnit:16; 3 | $fontSize:16; 4 | 5 | @function pxToRem($pixels) { 6 | @return #{$pixels / $fontSize}rem; 7 | } 8 | 9 | @function gridUnit($grids) { 10 | @return pxToRem($grids * $gridUnit); 11 | } 12 | 13 | //*** TRANISTIONS ***// 14 | @mixin transition( $speed: 0.3s ) { 15 | transition: all $speed ease-in-out; 16 | } 17 | 18 | //** BREAKPOINTS **// 19 | @mixin for-phone-portrait { 20 | @media (max-width: 544px) { @content; } 21 | } 22 | 23 | @mixin for-phone-landscape { 24 | @media (min-width: 544px) and (max-width: 768px) { @content; } 25 | } 26 | 27 | @mixin for-phone-landscape-down { 28 | @media (max-width: 768px) { @content; } 29 | } 30 | 31 | @mixin for-tablets-down { 32 | @media (max-width: 992px) { @content; } 33 | } 34 | 35 | @mixin for-tablets { 36 | @media (min-width: 768px) and (max-width: 992px) { @content; } 37 | } 38 | 39 | @mixin for-tablets-up { 40 | @media (min-width: 768px) { @content; } 41 | } 42 | 43 | @mixin for-desktop { 44 | @media (min-width: 992px) and (max-width: 1200px) { @content; } 45 | } 46 | 47 | @mixin for-desktop-up { 48 | @media (min-width: 992px) { @content; } 49 | } 50 | 51 | @mixin for-large-devices { 52 | @media (min-width: 1200px) { @content; } 53 | } 54 | 55 | 56 | //** FLEXBOX **// 57 | @mixin flex_stretch { 58 | display: flex; 59 | align-items: stretch; 60 | } 61 | 62 | @mixin flex_columns { 63 | display: flex; 64 | flex-direction: column; 65 | } 66 | 67 | @mixin flex_start_start { 68 | display: flex; 69 | justify-content: flex-start; 70 | align-items: flex-start; 71 | } 72 | 73 | @mixin flex_start_end { 74 | display: flex; 75 | justify-content: flex-end; 76 | align-items: flex-start; 77 | } 78 | 79 | @mixin flex_end_center { 80 | display: flex; 81 | justify-content: flex-end; 82 | align-items: center; 83 | } 84 | 85 | @mixin flex_start_center { 86 | display: flex; 87 | justify-content: flex-start; 88 | align-items: center; 89 | } 90 | 91 | @mixin flex_center_space_around() { 92 | display: flex; 93 | align-items: center; 94 | justify-content: space-around; 95 | flex-direction: row; 96 | } 97 | 98 | @mixin flex_start_space_between() { 99 | display: flex; 100 | align-items: flex-start; 101 | justify-content: space-between; 102 | flex-direction: row; 103 | } 104 | 105 | @mixin flex_center_space_between() { 106 | display: flex; 107 | align-items: center; 108 | justify-content: space-between; 109 | flex-direction: row; 110 | } 111 | 112 | @mixin flex_center_center() { 113 | display: flex; 114 | align-items: center; 115 | justify-content: center; 116 | flex-direction: row; 117 | } 118 | 119 | @mixin flex_center_start(){ 120 | display: flex; 121 | justify-content: center; 122 | align-items: flex-start; 123 | } 124 | 125 | @mixin flex_center_end(){ 126 | display: flex; 127 | justify-content: center; 128 | align-items: flex-end; 129 | } 130 | 131 | @mixin flex_wrap(){ 132 | flex-wrap: wrap; 133 | } -------------------------------------------------------------------------------- /assets/css/scss/base/_slick.scss: -------------------------------------------------------------------------------- 1 | /* Slider */ 2 | 3 | .slick-slider { 4 | position: relative; 5 | display: block; 6 | box-sizing: border-box; 7 | -webkit-touch-callout: none; 8 | -webkit-user-select: none; 9 | -khtml-user-select: none; 10 | -moz-user-select: none; 11 | -ms-user-select: none; 12 | user-select: none; 13 | -ms-touch-action: pan-y; 14 | touch-action: pan-y; 15 | -webkit-tap-highlight-color: transparent; 16 | } 17 | .slick-list { 18 | position: relative; 19 | overflow: hidden; 20 | display: block; 21 | margin: 0; 22 | padding: 0; 23 | 24 | &:focus { 25 | outline: none; 26 | } 27 | 28 | &.dragging { 29 | cursor: pointer; 30 | cursor: hand; 31 | } 32 | } 33 | .slick-slider .slick-track, 34 | .slick-slider .slick-list { 35 | -webkit-transform: translate3d(0, 0, 0); 36 | -moz-transform: translate3d(0, 0, 0); 37 | -ms-transform: translate3d(0, 0, 0); 38 | -o-transform: translate3d(0, 0, 0); 39 | transform: translate3d(0, 0, 0); 40 | } 41 | 42 | .slick-track { 43 | position: relative; 44 | left: 0; 45 | top: 0; 46 | display: block; 47 | margin-left: auto; 48 | margin-right: auto; 49 | 50 | &:before, 51 | &:after { 52 | content: ""; 53 | display: table; 54 | } 55 | 56 | &:after { 57 | clear: both; 58 | } 59 | 60 | .slick-loading & { 61 | visibility: hidden; 62 | } 63 | } 64 | .slick-slide { 65 | float: left; 66 | height: 100%; 67 | min-height: 1px; 68 | [dir="rtl"] & { 69 | float: right; 70 | } 71 | img { 72 | display: block; 73 | } 74 | &.slick-loading img { 75 | display: none; 76 | } 77 | 78 | display: none; 79 | 80 | &.dragging img { 81 | pointer-events: none; 82 | } 83 | 84 | .slick-initialized & { 85 | display: block; 86 | } 87 | 88 | .slick-loading & { 89 | visibility: hidden; 90 | } 91 | 92 | .slick-vertical & { 93 | display: block; 94 | height: auto; 95 | border: 1px solid transparent; 96 | } 97 | } 98 | .slick-arrow.slick-hidden { 99 | display: none; 100 | } -------------------------------------------------------------------------------- /assets/css/scss/base/modaal.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | Modaal - accessible modals - v0.3.1 3 | by Humaan, for all humans. 4 | http://humaan.com 5 | */ 6 | 7 | // Modaal Variables 8 | // -------------------------------------------------------- 9 | 10 | $modaal-overlay-color: rgba(0,0,0, 0.8); 11 | 12 | $modaal-radius: 0px; //5px 13 | $modaal-main-bg: #fff; 14 | $modaal-main-text: #000; 15 | $modaal-max-width: 1000px; 16 | $modaal-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); 17 | $modaal-padding: 30px; 18 | $modaal-hover-color: rgba(0,0,0, 0.7); 19 | 20 | $modaal-light: #fff; 21 | $modaal-primary: #555; 22 | $modaal-grey: #afb7bc; 23 | 24 | 25 | // Modaal Mixins 26 | // -------------------------------------------------------- 27 | @mixin modaal-transition($type, $speed: .2s, $ease: ease-in-out) { 28 | transition: $type #{$speed} #{$ease}; 29 | } 30 | @mixin modaal-hidetext() { 31 | position: absolute !important; 32 | clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ 33 | clip: rect(1px, 1px, 1px, 1px); 34 | padding:0 !important; 35 | border:0 !important; 36 | height: 1px !important; 37 | width: 1px !important; 38 | overflow: hidden; 39 | } 40 | 41 | 42 | // Modaal Structure 43 | // -------------------------------------------------------- 44 | .modaal-noscroll { 45 | overflow: hidden; 46 | } 47 | .modaal-accessible-hide { 48 | @include modaal-hidetext; 49 | } 50 | 51 | .modaal-overlay { 52 | position: fixed; 53 | top: 0; 54 | left: 0; 55 | width: 100%; 56 | height: 100%; 57 | z-index: 999; 58 | opacity: 0; 59 | } 60 | .modaal-wrapper { 61 | display: block; 62 | position: fixed; 63 | top: 0; 64 | left: 0; 65 | width: 100%; 66 | height: 100%; 67 | z-index: 9999; 68 | overflow: auto; 69 | opacity: 1; 70 | box-sizing: border-box; 71 | -webkit-overflow-scrolling: touch; 72 | @include modaal-transition(all, 0.3s); 73 | & * { 74 | box-sizing: border-box; 75 | -webkit-font-smoothing: antialiased; 76 | -moz-osx-font-smoothing: grayscale; 77 | -webkit-backface-visibility: hidden; 78 | } 79 | .modaal-close { 80 | border: none; 81 | background: transparent; 82 | padding: 0; 83 | -webkit-appearance: none; 84 | } 85 | 86 | &.modaal-start_none { 87 | display: none; 88 | opacity: 1; 89 | } 90 | &.modaal-start_fade { 91 | opacity: 0; 92 | } 93 | 94 | & *[tabindex="0"] { 95 | outline: none !important; 96 | } 97 | 98 | // is fullscreen 99 | &.modaal-fullscreen { 100 | overflow: hidden; 101 | } 102 | } 103 | .modaal-outer-wrapper { 104 | display: table; 105 | position: relative; 106 | width: 100%; 107 | height: 100%; 108 | .modaal-fullscreen & { 109 | display: block; 110 | } 111 | } 112 | .modaal-inner-wrapper { 113 | display: table-cell; 114 | width: 100%; 115 | height: 100%; 116 | position: relative; 117 | vertical-align: middle; 118 | text-align: center; 119 | padding: 80px 25px; 120 | 121 | // when is fullscreen 122 | .modaal-fullscreen & { 123 | padding: 0; 124 | display: block; 125 | vertical-align: top; 126 | } 127 | } 128 | .modaal-container { 129 | position: relative; 130 | display: inline-block; 131 | width: 100%; 132 | margin: auto; 133 | text-align: left; 134 | color: $modaal-main-text; 135 | max-width: $modaal-max-width; 136 | border-radius: $modaal-radius; 137 | background: $modaal-main-bg; 138 | box-shadow: $modaal-shadow; 139 | cursor: auto; 140 | 141 | // while loading 142 | &.is_loading { 143 | height: 100px; 144 | width: 100px; 145 | overflow: hidden; 146 | } 147 | // when is fullscreen 148 | .modaal-fullscreen & { 149 | max-width: none; 150 | height: 100%; 151 | overflow: auto; 152 | } 153 | } 154 | 155 | .modaal-close { 156 | position: fixed; 157 | right: 20px; 158 | top: 20px; 159 | color: $modaal-light; 160 | cursor: pointer; 161 | opacity: 1; 162 | width: 50px; 163 | height: 50px; 164 | background: rgba(0,0,0, 0); 165 | border-radius: 100%; 166 | @include modaal-transition(all); 167 | &:focus, 168 | &:hover { 169 | outline: none; 170 | background: #fff; 171 | &:before, 172 | &:after { background: #b93d0c; } 173 | } 174 | span { 175 | @include modaal-hidetext; 176 | } 177 | &:before, 178 | &:after { 179 | display: block; 180 | content: " "; 181 | position: absolute; 182 | top: 14px; 183 | left: 23px; 184 | width: 4px; 185 | height: 22px; 186 | border-radius: 4px; 187 | background: #fff; 188 | @include modaal-transition(background); 189 | } 190 | &:before { 191 | transform: rotate(-45deg); 192 | } 193 | &:after { 194 | transform: rotate(45deg); 195 | } 196 | .modaal-fullscreen & { 197 | background: $modaal-grey; 198 | right: 10px; 199 | top: 10px; 200 | } 201 | } 202 | 203 | .modaal-content-container { 204 | padding: $modaal-padding; 205 | } 206 | 207 | 208 | // Confirm Modaal 209 | // -------------------------------------------------------- 210 | 211 | .modaal-confirm-wrap { 212 | padding: 30px 0 0; 213 | text-align: center; 214 | font-size: 0; 215 | } 216 | .modaal-confirm-btn { 217 | font-size: 14px; 218 | display: inline-block; 219 | margin: 0 10px; 220 | vertical-align: middle; 221 | cursor: pointer; 222 | border: none; 223 | background: transparent; 224 | 225 | // Ok Button 226 | &.modaal-ok { 227 | padding: 10px 15px; 228 | color: $modaal-light; 229 | background: $modaal-primary; 230 | border-radius: 3px; 231 | @include modaal-transition(background); 232 | &:hover { 233 | background: darken($modaal-primary, 15%); 234 | } 235 | } 236 | &.modaal-cancel { 237 | text-decoration: underline; 238 | &:hover { 239 | text-decoration: none; 240 | color: darken($modaal-primary, 15%); 241 | } 242 | } 243 | } 244 | 245 | 246 | 247 | @keyframes instaReveal { 248 | 0% { opacity: 0; } 249 | 100% { opacity: 1; } 250 | } 251 | @-o-keyframes instaReveal { 252 | 0% { opacity: 0; } 253 | 100% { opacity: 1; } 254 | } 255 | @-moz-keyframes instaReveal { 256 | 0% { opacity: 0; } 257 | 100% { opacity: 1; } 258 | } 259 | @-webkit-keyframes instaReveal { 260 | 0% { opacity: 0; } 261 | 100% { opacity: 1; } 262 | } 263 | @-ms-keyframes instaReveal { 264 | 0% { opacity: 0; } 265 | 100% { opacity: 1; } 266 | } 267 | 268 | // Instagram Photo 269 | // -------------------------------------------------------- 270 | 271 | .modaal-instagram { 272 | .modaal-container { 273 | width: auto; 274 | background: transparent; 275 | box-shadow: none !important; 276 | } 277 | .modaal-content-container { 278 | padding: 0; 279 | background: transparent; 280 | } 281 | .modaal-content-container > blockquote { 282 | width: 1px !important; 283 | height: 1px !important; 284 | opacity: 0 !important; 285 | } 286 | iframe { 287 | opacity: 0; 288 | margin: -6px !important; 289 | border-radius: 0 !important; 290 | width: 1000px !important; 291 | max-width: 800px !important; 292 | box-shadow: none !important; 293 | 294 | animation: instaReveal 1s linear forwards; 295 | } 296 | } 297 | 298 | 299 | 300 | // Gallery 301 | // -------------------------------------------------------- 302 | .modaal-image { 303 | .modaal-inner-wrapper { 304 | padding-left: 140px; 305 | padding-right: 140px; 306 | } 307 | .modaal-container { 308 | width: auto; 309 | max-width: 100%; 310 | } 311 | } 312 | 313 | .modaal-gallery-wrap { 314 | position: relative; 315 | color: $modaal-light; 316 | } 317 | .modaal-gallery-item { 318 | display: none; 319 | img { 320 | display: block; 321 | //width: 100%; 322 | } 323 | &.is_active { 324 | display: block; 325 | } 326 | } 327 | .modaal-gallery-label { 328 | position: absolute; 329 | left: 0; 330 | width: 100%; 331 | margin: 20px 0 0; 332 | font-size: 18px; 333 | text-align: center; 334 | color: #fff; 335 | &:focus { 336 | outline: none; 337 | } 338 | } 339 | .modaal-gallery-control { 340 | position: absolute; 341 | top: 50%; 342 | transform: translateY(-50%); 343 | opacity: 1; 344 | cursor: pointer; 345 | color: $modaal-light; 346 | width: 50px; 347 | height: 50px; 348 | background: rgba(0,0,0, 0); 349 | border: none; 350 | border-radius: 100%; 351 | @include modaal-transition(all); 352 | &.is_hidden { 353 | opacity: 0; 354 | cursor: default; 355 | } 356 | &:focus, 357 | &:hover { 358 | outline: none; 359 | background: #fff; 360 | &:before, 361 | &:after { 362 | background: $modaal-grey; 363 | } 364 | } 365 | span { 366 | @include modaal-hidetext; 367 | } 368 | 369 | &:before, 370 | &:after { 371 | display: block; 372 | content: " "; 373 | position: absolute; 374 | top: 16px; 375 | left: 25px; 376 | width: 4px; 377 | height: 18px; 378 | border-radius: 4px; 379 | background: #fff; 380 | @include modaal-transition(background); 381 | } 382 | &:before { 383 | margin: -5px 0 0; 384 | transform: rotate(-45deg); 385 | } 386 | &:after { 387 | margin: 5px 0 0; 388 | transform: rotate(45deg); 389 | } 390 | } 391 | .modaal-gallery-next { 392 | left: 100%; 393 | margin-left: 40px; 394 | } 395 | .modaal-gallery-prev { 396 | right: 100%; 397 | margin-right: 40px; 398 | 399 | &:before, 400 | &:after { left: 22px; } 401 | &:before { 402 | margin: 5px 0 0; 403 | transform: rotate(-45deg); 404 | } 405 | &:after { 406 | margin: -5px 0 0; 407 | transform: rotate(45deg); 408 | } 409 | } 410 | 411 | 412 | // Video 413 | // -------------------------------------------------------- 414 | .modaal-video-wrap { 415 | margin: auto 50px; 416 | position: relative; 417 | } 418 | 419 | .modaal-video-container { 420 | position: relative; 421 | padding-bottom: 56.25%; 422 | height: 0; 423 | overflow: hidden; 424 | max-width: 100%; 425 | box-shadow: 0 0 10px rgba(0,0,0, 0.3); 426 | background: #000; 427 | max-width: 1300px; 428 | margin-left: auto; 429 | margin-right: auto; 430 | iframe, 431 | object, 432 | embed { 433 | position: absolute; 434 | top: 0; 435 | left: 0; 436 | width: 100%; 437 | height: 100%; 438 | } 439 | } 440 | 441 | // Modaal iFrame 442 | // -------------------------------------------------------- 443 | .modaal-iframe .modaal-content { 444 | width: 100%; 445 | height: 100%; 446 | } 447 | .modaal-iframe-elem { 448 | width: 100%; 449 | height: 100%; 450 | display: block; 451 | } 452 | 453 | 454 | // Responsive styles 455 | // -------------------------------------------------------- 456 | @media only screen and (min-width: 1400px) { 457 | .modaal-video-container { 458 | padding-bottom: 0; 459 | height: 731px; 460 | } 461 | } 462 | 463 | @media only screen and (max-width: 1140px) { 464 | .modaal-image { 465 | .modaal-inner-wrapper { 466 | padding-left: 25px; 467 | padding-right: 25px; 468 | } 469 | } 470 | .modaal-gallery-control { 471 | top: auto; 472 | bottom: 20px; 473 | transform: none; 474 | background: rgba(0,0,0, 0.7);; 475 | &:before, 476 | &:after { 477 | background: #fff; 478 | } 479 | } 480 | .modaal-gallery-next { 481 | left: auto; 482 | right: 20px; 483 | } 484 | .modaal-gallery-prev { 485 | left: 20px; 486 | right: auto; 487 | } 488 | } 489 | 490 | @media screen and (max-width: 900px) { 491 | .modaal-instagram iframe { 492 | width: 500px !important; 493 | } 494 | } 495 | @media screen and (max-height: 1100px) { 496 | .modaal-instagram iframe { 497 | width: 700px !important; 498 | } 499 | } 500 | @media screen and (max-height: 1000px) { 501 | .modaal-inner-wrapper { 502 | padding-top: 60px; 503 | padding-bottom: 60px; 504 | } 505 | .modaal-instagram iframe { 506 | width: 600px !important; 507 | } 508 | } 509 | @media screen and (max-height: 900px) { 510 | .modaal-instagram iframe { 511 | width: 500px !important; 512 | } 513 | .modaal-video-container { 514 | max-width: 900px; 515 | max-height: 510px; 516 | } 517 | } 518 | 519 | @media only screen and (max-width: 600px) { 520 | .modaal-instagram iframe { 521 | width: 280px !important; 522 | } 523 | } 524 | @media only screen and (max-height: 820px) { 525 | .modaal-gallery-label { 526 | display: none; 527 | } 528 | } 529 | 530 | 531 | 532 | // CSS loading gif 533 | // -------------------------------------------------------- 534 | .modaal-loading-spinner { 535 | background: none; 536 | position: absolute; 537 | width: 200px; 538 | height: 200px; 539 | top: 50%; 540 | left: 50%; 541 | margin: -100px 0 0 -100px; 542 | transform: scale(0.25); 543 | } 544 | @-ms-keyframes modaal-loading-spinner{0%{opacity:1;-ms-transform:scale(1.5);-moz-transform:scale(1.5);-webkit-transform:scale(1.5);-o-transform:scale(1.5);transform:scale(1.5)}100%{opacity:.1;-ms-transform:scale(1);-moz-transform:scale(1);-webkit-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@-moz-keyframes modaal-loading-spinner{0%{opacity:1;-ms-transform:scale(1.5);-moz-transform:scale(1.5);-webkit-transform:scale(1.5);-o-transform:scale(1.5);transform:scale(1.5)}100%{opacity:.1;-ms-transform:scale(1);-moz-transform:scale(1);-webkit-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@-webkit-keyframes modaal-loading-spinner{0%{opacity:1;-ms-transform:scale(1.5);-moz-transform:scale(1.5);-webkit-transform:scale(1.5);-o-transform:scale(1.5);transform:scale(1.5)}100%{opacity:.1;-ms-transform:scale(1);-moz-transform:scale(1);-webkit-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@-o-keyframes modaal-loading-spinner{0%{opacity:1;-ms-transform:scale(1.5);-moz-transform:scale(1.5);-webkit-transform:scale(1.5);-o-transform:scale(1.5);transform:scale(1.5)}100%{opacity:.1;-ms-transform:scale(1);-moz-transform:scale(1);-webkit-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@keyframes modaal-loading-spinner{0%{opacity:1;-ms-transform:scale(1.5);-moz-transform:scale(1.5);-webkit-transform:scale(1.5);-o-transform:scale(1.5);transform:scale(1.5)}100%{opacity:.1;-ms-transform:scale(1);-moz-transform:scale(1);-webkit-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}.modaal-loading-spinner>div{width:24px;height:24px;margin-left:4px;margin-top:4px;position:absolute}.modaal-loading-spinner>div>div{width:100%;height:100%;border-radius:15px;background:#fff}.modaal-loading-spinner>div:nth-of-type(1)>div{-ms-animation:modaal-loading-spinner 1s linear infinite;-moz-animation:modaal-loading-spinner 1s linear infinite;-webkit-animation:modaal-loading-spinner 1s linear infinite;-o-animation:modaal-loading-spinner 1s linear infinite;animation:modaal-loading-spinner 1s linear infinite;-ms-animation-delay:0s;-moz-animation-delay:0s;-webkit-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s}.modaal-loading-spinner>div:nth-of-type(2)>div,.modaal-loading-spinner>div:nth-of-type(3)>div{-ms-animation:modaal-loading-spinner 1s linear infinite;-moz-animation:modaal-loading-spinner 1s linear infinite;-webkit-animation:modaal-loading-spinner 1s linear infinite;-o-animation:modaal-loading-spinner 1s linear infinite}.modaal-loading-spinner>div:nth-of-type(1){-ms-transform:translate(84px,84px) rotate(45deg) translate(70px,0);-moz-transform:translate(84px,84px) rotate(45deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(45deg) translate(70px,0);-o-transform:translate(84px,84px) rotate(45deg) translate(70px,0);transform:translate(84px,84px) rotate(45deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(2)>div{animation:modaal-loading-spinner 1s linear infinite;-ms-animation-delay:.12s;-moz-animation-delay:.12s;-webkit-animation-delay:.12s;-o-animation-delay:.12s;animation-delay:.12s}.modaal-loading-spinner>div:nth-of-type(2){-ms-transform:translate(84px,84px) rotate(90deg) translate(70px,0);-moz-transform:translate(84px,84px) rotate(90deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(90deg) translate(70px,0);-o-transform:translate(84px,84px) rotate(90deg) translate(70px,0);transform:translate(84px,84px) rotate(90deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(3)>div{animation:modaal-loading-spinner 1s linear infinite;-ms-animation-delay:.25s;-moz-animation-delay:.25s;-webkit-animation-delay:.25s;-o-animation-delay:.25s;animation-delay:.25s}.modaal-loading-spinner>div:nth-of-type(4)>div,.modaal-loading-spinner>div:nth-of-type(5)>div{-ms-animation:modaal-loading-spinner 1s linear infinite;-moz-animation:modaal-loading-spinner 1s linear infinite;-webkit-animation:modaal-loading-spinner 1s linear infinite;-o-animation:modaal-loading-spinner 1s linear infinite}.modaal-loading-spinner>div:nth-of-type(3){-ms-transform:translate(84px,84px) rotate(135deg) translate(70px,0);-moz-transform:translate(84px,84px) rotate(135deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(135deg) translate(70px,0);-o-transform:translate(84px,84px) rotate(135deg) translate(70px,0);transform:translate(84px,84px) rotate(135deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(4)>div{animation:modaal-loading-spinner 1s linear infinite;-ms-animation-delay:.37s;-moz-animation-delay:.37s;-webkit-animation-delay:.37s;-o-animation-delay:.37s;animation-delay:.37s}.modaal-loading-spinner>div:nth-of-type(4){-ms-transform:translate(84px,84px) rotate(180deg) translate(70px,0);-moz-transform:translate(84px,84px) rotate(180deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(180deg) translate(70px,0);-o-transform:translate(84px,84px) rotate(180deg) translate(70px,0);transform:translate(84px,84px) rotate(180deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(5)>div{animation:modaal-loading-spinner 1s linear infinite;-ms-animation-delay:.5s;-moz-animation-delay:.5s;-webkit-animation-delay:.5s;-o-animation-delay:.5s;animation-delay:.5s}.modaal-loading-spinner>div:nth-of-type(6)>div,.modaal-loading-spinner>div:nth-of-type(7)>div{-ms-animation:modaal-loading-spinner 1s linear infinite;-moz-animation:modaal-loading-spinner 1s linear infinite;-webkit-animation:modaal-loading-spinner 1s linear infinite;-o-animation:modaal-loading-spinner 1s linear infinite}.modaal-loading-spinner>div:nth-of-type(5){-ms-transform:translate(84px,84px) rotate(225deg) translate(70px,0);-moz-transform:translate(84px,84px) rotate(225deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(225deg) translate(70px,0);-o-transform:translate(84px,84px) rotate(225deg) translate(70px,0);transform:translate(84px,84px) rotate(225deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(6)>div{animation:modaal-loading-spinner 1s linear infinite;-ms-animation-delay:.62s;-moz-animation-delay:.62s;-webkit-animation-delay:.62s;-o-animation-delay:.62s;animation-delay:.62s}.modaal-loading-spinner>div:nth-of-type(6){-ms-transform:translate(84px,84px) rotate(270deg) translate(70px,0);-moz-transform:translate(84px,84px) rotate(270deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(270deg) translate(70px,0);-o-transform:translate(84px,84px) rotate(270deg) translate(70px,0);transform:translate(84px,84px) rotate(270deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(7)>div{animation:modaal-loading-spinner 1s linear infinite;-ms-animation-delay:.75s;-moz-animation-delay:.75s;-webkit-animation-delay:.75s;-o-animation-delay:.75s;animation-delay:.75s}.modaal-loading-spinner>div:nth-of-type(7){-ms-transform:translate(84px,84px) rotate(315deg) translate(70px,0);-moz-transform:translate(84px,84px) rotate(315deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(315deg) translate(70px,0);-o-transform:translate(84px,84px) rotate(315deg) translate(70px,0);transform:translate(84px,84px) rotate(315deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(8)>div{-ms-animation:modaal-loading-spinner 1s linear infinite;-moz-animation:modaal-loading-spinner 1s linear infinite;-webkit-animation:modaal-loading-spinner 1s linear infinite;-o-animation:modaal-loading-spinner 1s linear infinite;animation:modaal-loading-spinner 1s linear infinite;-ms-animation-delay:.87s;-moz-animation-delay:.87s;-webkit-animation-delay:.87s;-o-animation-delay:.87s;animation-delay:.87s}.modaal-loading-spinner>div:nth-of-type(8){-ms-transform:translate(84px,84px) rotate(360deg) translate(70px,0);-moz-transform:translate(84px,84px) rotate(360deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(360deg) translate(70px,0);-o-transform:translate(84px,84px) rotate(360deg) translate(70px,0);transform:translate(84px,84px) rotate(360deg) translate(70px,0)} 545 | -------------------------------------------------------------------------------- /assets/css/scss/blocks/_cards.scss: -------------------------------------------------------------------------------- 1 | .block-cards { 2 | display: block; 3 | ul.cards { 4 | list-style: none; 5 | padding: 0; 6 | margin: 0; 7 | display: flex; 8 | flex-direction: row; 9 | flex-wrap: wrap; 10 | li { 11 | margin-top: pxToRem(10); 12 | margin-bottom: pxToRem(10); 13 | @include for-phone-landscape-down { 14 | width: 100%; 15 | } 16 | @include for-tablets { 17 | width: 50%; 18 | } 19 | @include for-desktop-up { 20 | width: 33.333%; 21 | } 22 | .card { 23 | box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2); 24 | @include transition; 25 | background: #fff; 26 | margin: pxToRem(20); 27 | &:hover { 28 | box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2); 29 | cursor: pointer; 30 | } 31 | figure { 32 | img { 33 | width: 100%; 34 | height: auto; 35 | display: block; 36 | } 37 | } 38 | header { 39 | padding: pxToRem(10); 40 | text-align: center; 41 | .post-title { 42 | margin-top: pxToRem(20); 43 | margin-bottom: pxToRem(20); 44 | } 45 | } 46 | article { 47 | padding: pxToRem(10); 48 | } 49 | } 50 | } 51 | }// featured-content-list 52 | }// block-featured-content -------------------------------------------------------------------------------- /assets/css/scss/blocks/_collapsibles.scss: -------------------------------------------------------------------------------- 1 | .block-collapsibles { 2 | .accordion-link { 3 | color: #333; 4 | padding: 0 1.88rem; 5 | font-size: 0.69rem; 6 | font-weight: 600; 7 | line-height: 2.38rem; 8 | letter-spacing: .1rem; 9 | text-transform: uppercase; 10 | text-decoration: none; 11 | white-space: nowrap; 12 | background-color: #ccc; 13 | cursor: pointer; 14 | box-sizing: border-box; 15 | display: block; 16 | @include transition; 17 | position: relative; 18 | &:after { 19 | content: '+'; 20 | right: 1.88rem; 21 | position: absolute; 22 | font-size: pxToRem(24); 23 | font-weight: normal; 24 | } 25 | &.active { 26 | color: #fff; 27 | background-color: gray; 28 | &:after { 29 | content: '-'; 30 | } 31 | } 32 | }// accordion-link 33 | .tab-content { 34 | padding: 15px; 35 | box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2); 36 | margin-top: pxToRem(20); 37 | margin-bottom: pxToRem(20); 38 | }// tab-content 39 | }// block-collapsibles -------------------------------------------------------------------------------- /assets/css/scss/blocks/_content-with-media.scss: -------------------------------------------------------------------------------- 1 | .block-content_with_media { 2 | .block-inner { 3 | display: flex; 4 | justify-content: center; 5 | align-items: center; 6 | flex-wrap: wrap; 7 | box-sizing: border-box; 8 | .block-the-content { 9 | max-width: 50%; 10 | }// block-the-content 11 | .block-addon { 12 | max-width: 50%; 13 | }// block-addon 14 | @include for-phone-landscape-down { 15 | flex-direction: column-reverse; 16 | .block-the-content { 17 | max-width: 100%; 18 | }// block-the-content 19 | .block-addon { 20 | max-width: 100%; 21 | }// block-addon 22 | } 23 | }// block-inner 24 | }// block-content_with_media -------------------------------------------------------------------------------- /assets/css/scss/blocks/_content.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/westcoastdigital/ACF-Page-Builder/9e9f26f8471918203df301cd6ff43236c719a365/assets/css/scss/blocks/_content.scss -------------------------------------------------------------------------------- /assets/css/scss/blocks/_featured-posts.scss: -------------------------------------------------------------------------------- 1 | .block-featured-content { 2 | display: block; 3 | ul.featured-content-list { 4 | list-style: none; 5 | padding: 0; 6 | margin: 0; 7 | display: flex; 8 | flex-direction: row; 9 | flex-wrap: wrap; 10 | li { 11 | margin-top: pxToRem(10); 12 | margin-bottom: pxToRem(10); 13 | @include for-phone-landscape-down { 14 | width: 100%; 15 | } 16 | @include for-tablets { 17 | width: 50%; 18 | } 19 | @include for-desktop-up { 20 | width: 33.333%; 21 | } 22 | .card { 23 | box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2); 24 | @include transition; 25 | background: #fff; 26 | margin: pxToRem(20); 27 | &:hover { 28 | box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2); 29 | cursor: pointer; 30 | } 31 | figure { 32 | img { 33 | width: 100%; 34 | height: auto; 35 | display: block; 36 | } 37 | } 38 | header { 39 | padding: pxToRem(10); 40 | text-align: center; 41 | .post-title { 42 | margin-top: pxToRem(20); 43 | margin-bottom: pxToRem(20); 44 | } 45 | } 46 | article { 47 | padding: pxToRem(10); 48 | } 49 | } 50 | } 51 | }// featured-content-list 52 | }// block-featured-content -------------------------------------------------------------------------------- /assets/css/scss/blocks/_gallery.scss: -------------------------------------------------------------------------------- 1 | .block { 2 | @include for-phone-landscape-down { 3 | .masonry[data-columns]::before { 4 | content: '1 .column.size-1of1'; 5 | } 6 | } 7 | @include for-tablets { 8 | .masonry[data-columns]::before { 9 | content: '2 .column.size-1of2'; 10 | } 11 | } 12 | @include for-desktop-up { 13 | .masonry[data-columns]::before { 14 | content: '3 .column.size-1of3'; 15 | } 16 | } 17 | .masonry { 18 | display: flex; 19 | flex-wrap: wrap; 20 | align-items: flex-start; 21 | &:hover { 22 | .hover { 23 | .image { 24 | opacity: 0.7; 25 | } 26 | } 27 | } 28 | .item { 29 | margin: 0; 30 | height: 100%; 31 | width: 100%; 32 | overflow: hidden; 33 | display: block; 34 | .image { 35 | display: block; 36 | @include transition(0.8s); 37 | } 38 | &:hover { 39 | .image { 40 | transform: scale(1.1); 41 | } 42 | } 43 | } 44 | } 45 | .size-1of1 { 46 | width: 100%; 47 | overflow: hidden; 48 | } 49 | .size-1of2 { 50 | width: 50%; 51 | overflow: hidden; 52 | } 53 | .size-1of3 { 54 | width: 33.333%; 55 | overflow: hidden; 56 | } 57 | }// block -------------------------------------------------------------------------------- /assets/css/scss/blocks/_posts-lists.scss: -------------------------------------------------------------------------------- 1 | .post-list { 2 | list-style: none; 3 | padding: 0; 4 | margin: 0; 5 | display: flex; 6 | flex-direction: row; 7 | flex-wrap: wrap; 8 | li { 9 | margin-top: pxToRem(10); 10 | margin-bottom: pxToRem(10); 11 | @include for-phone-landscape-down { 12 | width: 100%; 13 | } 14 | @include for-tablets { 15 | width: 50%; 16 | } 17 | @include for-desktop-up { 18 | width: 33.333%; 19 | } 20 | .card { 21 | box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2); 22 | @include transition; 23 | background: #fff; 24 | margin: pxToRem(20); 25 | &:hover { 26 | box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2); 27 | cursor: pointer; 28 | } 29 | figure { 30 | img { 31 | width: 100%; 32 | height: auto; 33 | display: block; 34 | } 35 | } 36 | header { 37 | padding: pxToRem(10); 38 | text-align: center; 39 | .post-title { 40 | margin-top: pxToRem(20); 41 | margin-bottom: pxToRem(20); 42 | } 43 | .post-meta { 44 | display: flex; 45 | justify-content: space-around; 46 | } 47 | } 48 | article { 49 | padding: pxToRem(10); 50 | } 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /assets/css/scss/blocks/_slider.scss: -------------------------------------------------------------------------------- 1 | .block-slider { 2 | .slick { 3 | .item { 4 | .slide-container { 5 | display: flex; 6 | justify-content: space-between; 7 | align-items: center; 8 | .block-addon { 9 | flex: 1; 10 | } 11 | .content { 12 | margin: pxToRem(10); 13 | flex: 1; 14 | }// content 15 | @include for-phone-portrait { 16 | flex-direction: column; 17 | justify-content: center; 18 | } 19 | }// slide-container 20 | }// item 21 | }// slick 22 | .slick-navigation { 23 | display: flex; 24 | justify-content: space-between; 25 | align-items: center; 26 | margin-top: pxToRem(20); 27 | } 28 | }// block-slider -------------------------------------------------------------------------------- /assets/css/scss/blocks/_strap.scss: -------------------------------------------------------------------------------- 1 | .block-strap { 2 | .block-inner { 3 | display: flex; 4 | justify-content: center; 5 | flex-wrap: wrap; 6 | margin-top: pxToRem(15); 7 | padding: 1.5%; 8 | box-sizing: border-box; 9 | .block-strap-column { 10 | position: relative; 11 | margin-bottom: pxToRem(20); 12 | background: #fefff9; 13 | text-decoration: none; 14 | box-shadow: rgba(0, 0, 0, 0.19) 0 0 8px 0; 15 | border-radius: pxToRem(4); 16 | @include for-phone-landscape-down { 17 | width: 100%; 18 | }// for-phone-landscape-down 19 | @include for-tablets-up { 20 | max-width: pxToRem(320); 21 | margin-right: pxToRem(20); 22 | margin-bottom: pxToRem(20); 23 | &:nth-child(even) { 24 | margin-right: 0; 25 | }// nth-child(even) 26 | }// for-tablets-up 27 | @include for-desktop-up { 28 | &:nth-child(even) { 29 | margin-right: pxToRem(20); 30 | }// nth-child(even) 31 | }// for-desktop-up 32 | }// block-strap-column 33 | }// block-inner 34 | }// block-strap -------------------------------------------------------------------------------- /assets/css/scss/blocks/_tabs.scss: -------------------------------------------------------------------------------- 1 | .block-tabs { 2 | .r-tabs { 3 | .r-tabs-nav { 4 | margin: 0; 5 | padding: 0; 6 | display: flex; 7 | justify-content: space-around; 8 | .r-tabs-tab { 9 | margin: 0; 10 | list-style: none; 11 | flex: 1; 12 | &.r-tabs-state-default { 13 | a { 14 | color: #333; 15 | padding: 0 1.88rem; 16 | text-align: center; 17 | font-size: 0.69rem; 18 | font-weight: 600; 19 | line-height: 2.38rem; 20 | letter-spacing: .1rem; 21 | text-transform: uppercase; 22 | text-decoration: none; 23 | white-space: nowrap; 24 | background-color: #ccc; 25 | cursor: pointer; 26 | box-sizing: border-box; 27 | display: block; 28 | @include transition; 29 | } 30 | }// r-tabs-state-default 31 | &.r-tabs-state-active { 32 | a { 33 | color: #fff; 34 | padding: 0 1.88rem; 35 | text-align: center; 36 | font-size: 0.69rem; 37 | font-weight: 600; 38 | line-height: 2.38rem; 39 | letter-spacing: .1rem; 40 | text-transform: uppercase; 41 | text-decoration: none; 42 | white-space: nowrap; 43 | background-color: gray; 44 | cursor: pointer; 45 | box-sizing: border-box; 46 | display: block; 47 | @include transition; 48 | } 49 | }// r-tabs-state-active 50 | }// r-tabs-tab 51 | }// r-tabs-nav 52 | .r-tabs-accordion-title { 53 | cursor: pointer; 54 | } 55 | .r-tabs-panel { 56 | padding: 15px; 57 | display: none; 58 | box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2); 59 | margin-top: pxToRem(20); 60 | margin-bottom: pxToRem(20); 61 | &.r-tabs-state-active { 62 | display: block; 63 | } 64 | } 65 | .r-tabs-accordion-title { 66 | display: none; 67 | } 68 | } 69 | @include for-phone-landscape-down { 70 | .r-tabs { 71 | .r-tabs-nav { 72 | display: none; 73 | } 74 | .r-tabs-accordion-title { 75 | display: block; 76 | a { 77 | color: #333; 78 | display: block; 79 | background-color: #ccc; 80 | padding: pxToRem(10); 81 | position: relative; 82 | &:after { 83 | content: '+'; 84 | right: 1.88rem; 85 | position: absolute; 86 | font-size: pxToRem(24); 87 | font-weight: normal; 88 | line-height: 2.38rem; 89 | top: 50%; 90 | transform: translateY(-50%); 91 | } 92 | } 93 | &.r-tabs-state-active { 94 | a { 95 | color: #fff; 96 | background-color: #333; 97 | &:after { 98 | content: '-'; 99 | } 100 | } 101 | } 102 | } 103 | } 104 | } 105 | }// block-tabs -------------------------------------------------------------------------------- /assets/css/scss/project.scss: -------------------------------------------------------------------------------- 1 | 2 | /*-------------------------------------------------------------- 3 | # Base 4 | --------------------------------------------------------------*/ 5 | @import "base/mixins"; 6 | @import "base/modaal"; 7 | @import "base/slick"; 8 | @import "base/global"; 9 | 10 | /*-------------------------------------------------------------- 11 | # Blocks 12 | --------------------------------------------------------------*/ 13 | @import "blocks/content"; 14 | @import "blocks/strap"; 15 | @import "blocks/content-with-media"; 16 | @import "blocks/gallery"; 17 | @import "blocks/featured-posts"; 18 | @import "blocks/cards"; 19 | @import "blocks/slider"; 20 | @import "blocks/tabs"; 21 | @import "blocks/collapsibles"; 22 | @import "blocks/posts-lists"; -------------------------------------------------------------------------------- /assets/images/averie-woodard-142413.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/westcoastdigital/ACF-Page-Builder/9e9f26f8471918203df301cd6ff43236c719a365/assets/images/averie-woodard-142413.jpg -------------------------------------------------------------------------------- /assets/images/dmitriy-ilkevich-437760.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/westcoastdigital/ACF-Page-Builder/9e9f26f8471918203df301cd6ff43236c719a365/assets/images/dmitriy-ilkevich-437760.jpg -------------------------------------------------------------------------------- /assets/images/hipster-mum-236831.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/westcoastdigital/ACF-Page-Builder/9e9f26f8471918203df301cd6ff43236c719a365/assets/images/hipster-mum-236831.jpg -------------------------------------------------------------------------------- /assets/images/pete-bellis-143262.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/westcoastdigital/ACF-Page-Builder/9e9f26f8471918203df301cd6ff43236c719a365/assets/images/pete-bellis-143262.jpg -------------------------------------------------------------------------------- /assets/images/pete-bellis-189610.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/westcoastdigital/ACF-Page-Builder/9e9f26f8471918203df301cd6ff43236c719a365/assets/images/pete-bellis-189610.jpg -------------------------------------------------------------------------------- /assets/images/toa-heftiba-195132.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/westcoastdigital/ACF-Page-Builder/9e9f26f8471918203df301cd6ff43236c719a365/assets/images/toa-heftiba-195132.jpg -------------------------------------------------------------------------------- /assets/js/admin-script.js: -------------------------------------------------------------------------------- 1 | function appendAce( $el ) { 2 | jQuery( $el ).each(function () { 3 | if(jQuery(jQuery(this)).is(":visible")) { 4 | var textarea = jQuery(this); 5 | var mode = textarea.data('editor'); 6 | var editDiv = jQuery('
', { 7 | position: 'absolute', 8 | width: '100%', 9 | height: textarea.closest('.acf-field').height(), 10 | 'class': textarea.attr('class') 11 | }).insertBefore(textarea); 12 | textarea.css('display', 'none').removeClass('aced'); 13 | var editor = ace.edit(editDiv[0]); 14 | editor.renderer.setShowGutter(true); 15 | editor.getSession().setValue(textarea.val()); 16 | editor.getSession().setMode("ace/mode/html"); 17 | editor.setTheme("ace/theme/ambiance"); 18 | // editor.setTheme("ace/theme/idle_fingers"); 19 | 20 | // copy back to textarea on form submit... 21 | textarea.closest('form').submit(function () { 22 | textarea.val(editor.getSession().getValue()); 23 | }) 24 | } 25 | }); 26 | } 27 | 28 | jQuery( document ).ready(function() { 29 | jQuery('.acf-code textarea').addClass('aced'); 30 | 31 | appendAce('.acf-code textarea.aced'); 32 | 33 | if(typeof acf !== 'undefined') { 34 | acf.add_action('append', function( $el ){ 35 | appendAce('.acf-code textarea.aced'); 36 | }) 37 | } 38 | 39 | if(typeof acf !== 'undefined') { 40 | acf.add_action('show_field', function( $field, context ){ 41 | appendAce('.acf-code textarea.aced'); 42 | }); 43 | } 44 | 45 | }); 46 | -------------------------------------------------------------------------------- /assets/js/src/project.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | ( function( $ ) { 3 | $( function() { 4 | $( '.modaal' ).modaal( { 5 | type: 'image' 6 | } ); 7 | $( '.masonry .item' ).hover( function() { 8 | $( this ).toggleClass( 'hover' ); 9 | } ); 10 | $( '.card' ).click( function() { 11 | window.location = $( this ).find( 'a' ).attr( 'href' ); 12 | return false; 13 | } ); 14 | $( '.r-tabs-accordion-title' ).click( function() { 15 | window.location = $( this ).find( 'a' ).attr( 'href' ); 16 | return false; 17 | } ); 18 | $( window ).load( function() { 19 | $( '.slick .item' ).equalHeights(); 20 | } ); 21 | 22 | $( window ).resize( function() { 23 | $( '.slick .item' ).equalHeights(); 24 | } ); 25 | $( '.slick' ).slick( { 26 | appendArrows: $( '.slick-navigation' ) 27 | } ); 28 | $.stellar( { 29 | horizontalScrolling: false, 30 | verticalOffset: 40 31 | } ); 32 | $( '.tabs-wrapper' ).responsiveTabs( { 33 | startCollapsed: 'accordion' 34 | } ); 35 | var allPanels = $( '.accordion-content' ).hide(); 36 | 37 | $( '.accordion-link' ).click( function() { 38 | allPanels.slideUp(); 39 | $( '.accordion-link' ).removeClass( 'active' ); 40 | $( this ).addClass( 'active' ); 41 | $( this ).parent().next().slideDown(); 42 | return false; 43 | } ); 44 | } ); 45 | } )( jQuery ); 46 | -------------------------------------------------------------------------------- /assets/js/vendor/equalHeights.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Simple jQuery Equal Heights 3 | * 4 | * Copyright (c) 2013 Matt Banks 5 | * Dual licensed under the MIT and GPL licenses. 6 | * Uses the same license as jQuery, see: 7 | * http://docs.jquery.com/License 8 | * 9 | * @version 1.5.1 10 | */ 11 | (function($) { 12 | 13 | $.fn.equalHeights = function() { 14 | var maxHeight = 0, 15 | $this = $(this); 16 | 17 | $this.each( function() { 18 | var height = $(this).innerHeight(); 19 | 20 | if ( height > maxHeight ) { maxHeight = height; } 21 | }); 22 | 23 | return $this.css('height', maxHeight); 24 | }; 25 | 26 | // auto-initialize plugin 27 | $('[data-equal]').each(function(){ 28 | var $this = $(this), 29 | target = $this.data('equal'); 30 | $this.find(target).equalHeights(); 31 | }); 32 | 33 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/vendor/masonry.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Salvattore 1.0.9 by @rnmp and @ppold 3 | * https://github.com/rnmp/salvattore 4 | */ 5 | (function(root, factory) { 6 | if (typeof define === 'function' && define.amd) { 7 | define([], factory); 8 | } else if (typeof exports === 'object') { 9 | module.exports = factory(); 10 | } else { 11 | root.salvattore = factory(); 12 | } 13 | }(this, function() { 14 | /*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license */ 15 | 16 | if (!window.matchMedia) { 17 | window.matchMedia = function() { 18 | "use strict"; 19 | 20 | // For browsers that support matchMedium api such as IE 9 and webkit 21 | var styleMedia = (window.styleMedia || window.media); 22 | 23 | // For those that don't support matchMedium 24 | if (!styleMedia) { 25 | var style = document.createElement('style'), 26 | script = document.getElementsByTagName('script')[0], 27 | info = null; 28 | 29 | style.type = 'text/css'; 30 | style.id = 'matchmediajs-test'; 31 | 32 | script.parentNode.insertBefore(style, script); 33 | 34 | // 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers 35 | info = ('getComputedStyle' in window) && window.getComputedStyle(style, null) || style.currentStyle; 36 | 37 | styleMedia = { 38 | matchMedium: function(media) { 39 | var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }'; 40 | 41 | // 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers 42 | if (style.styleSheet) { 43 | style.styleSheet.cssText = text; 44 | } else { 45 | style.textContent = text; 46 | } 47 | 48 | // Test if media query is true or false 49 | return info.width === '1px'; 50 | } 51 | }; 52 | } 53 | 54 | return function(media) { 55 | return { 56 | matches: styleMedia.matchMedium(media || 'all'), 57 | media: media || 'all' 58 | }; 59 | }; 60 | }(); 61 | } 62 | 63 | /*! matchMedia() polyfill addListener/removeListener extension. Author & copyright (c) 2012: Scott Jehl. Dual MIT/BSD license */ 64 | (function(){ 65 | "use strict"; 66 | 67 | // Bail out for browsers that have addListener support 68 | if (window.matchMedia && window.matchMedia('all').addListener) { 69 | return false; 70 | } 71 | 72 | var localMatchMedia = window.matchMedia, 73 | hasMediaQueries = localMatchMedia('only all').matches, 74 | isListening = false, 75 | timeoutID = 0, // setTimeout for debouncing 'handleChange' 76 | queries = [], // Contains each 'mql' and associated 'listeners' if 'addListener' is used 77 | handleChange = function(evt) { 78 | // Debounce 79 | clearTimeout(timeoutID); 80 | 81 | timeoutID = setTimeout(function() { 82 | for (var i = 0, il = queries.length; i < il; i++) { 83 | var mql = queries[i].mql, 84 | listeners = queries[i].listeners || [], 85 | matches = localMatchMedia(mql.media).matches; 86 | 87 | // Update mql.matches value and call listeners 88 | // Fire listeners only if transitioning to or from matched state 89 | if (matches !== mql.matches) { 90 | mql.matches = matches; 91 | 92 | for (var j = 0, jl = listeners.length; j < jl; j++) { 93 | listeners[j].call(window, mql); 94 | } 95 | } 96 | } 97 | }, 30); 98 | }; 99 | 100 | window.matchMedia = function(media) { 101 | var mql = localMatchMedia(media), 102 | listeners = [], 103 | index = 0; 104 | 105 | mql.addListener = function(listener) { 106 | // Changes would not occur to css media type so return now (Affects IE <= 8) 107 | if (!hasMediaQueries) { 108 | return; 109 | } 110 | 111 | // Set up 'resize' listener for browsers that support CSS3 media queries (Not for IE <= 8) 112 | // There should only ever be 1 resize listener running for performance 113 | if (!isListening) { 114 | isListening = true; 115 | window.addEventListener('resize', handleChange, true); 116 | } 117 | 118 | // Push object only if it has not been pushed already 119 | if (index === 0) { 120 | index = queries.push({ 121 | mql : mql, 122 | listeners : listeners 123 | }); 124 | } 125 | 126 | listeners.push(listener); 127 | }; 128 | 129 | mql.removeListener = function(listener) { 130 | for (var i = 0, il = listeners.length; i < il; i++){ 131 | if (listeners[i] === listener){ 132 | listeners.splice(i, 1); 133 | } 134 | } 135 | }; 136 | 137 | return mql; 138 | }; 139 | }()); 140 | 141 | // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ 142 | // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating 143 | 144 | // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel 145 | 146 | // MIT license 147 | 148 | (function() { 149 | "use strict"; 150 | 151 | var lastTime = 0; 152 | var vendors = ['ms', 'moz', 'webkit', 'o']; 153 | for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { 154 | window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; 155 | window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] || 156 | window[vendors[x]+'CancelRequestAnimationFrame']; 157 | } 158 | 159 | if (!window.requestAnimationFrame) 160 | window.requestAnimationFrame = function(callback, element) { 161 | var currTime = new Date().getTime(); 162 | var timeToCall = Math.max(0, 16 - (currTime - lastTime)); 163 | var id = window.setTimeout(function() { callback(currTime + timeToCall); }, 164 | timeToCall); 165 | lastTime = currTime + timeToCall; 166 | return id; 167 | }; 168 | 169 | if (!window.cancelAnimationFrame) 170 | window.cancelAnimationFrame = function(id) { 171 | clearTimeout(id); 172 | }; 173 | }()); 174 | 175 | // https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent 176 | 177 | if (typeof window.CustomEvent !== "function") { 178 | (function() { 179 | "use strict"; 180 | function CustomEvent(event, params) { 181 | params = params || { bubbles: false, cancelable: false, detail: undefined }; 182 | var evt = document.createEvent('CustomEvent'); 183 | evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); 184 | return evt; 185 | } 186 | 187 | CustomEvent.prototype = window.Event.prototype; 188 | 189 | window.CustomEvent = CustomEvent; 190 | })(); 191 | } 192 | 193 | /* jshint laxcomma: true */ 194 | var salvattore = (function (global, document, undefined) { 195 | "use strict"; 196 | 197 | var self = {}, 198 | grids = [], 199 | mediaRules = [], 200 | mediaQueries = [], 201 | add_to_dataset = function(element, key, value) { 202 | // uses dataset function or a fallback for >=", 60 | ">>>=", 61 | "&=", 62 | "|=", 63 | "^=", 64 | "+=", 65 | "+", 66 | "-", 67 | "*", 68 | "/", 69 | "%", 70 | "<<", 71 | ">>", 72 | ">>>", 73 | "&", 74 | "|", 75 | "^", 76 | "&&", 77 | "||", 78 | "===", 79 | "==", 80 | ">=", 81 | "<=", 82 | "<", 83 | ">", 84 | "!=", 85 | "!==" 86 | ], 87 | "requireSpaceBeforeBlockStatements": true, 88 | "requireSpaceBeforeObjectValues": true, 89 | "requireSpacesInAnonymousFunctionExpression": { 90 | "beforeOpeningCurlyBrace": true 91 | }, 92 | "requireSpacesInConditionalExpression": true, 93 | "requireSpacesInForStatement": true, 94 | "requireSpacesInFunctionDeclaration": { 95 | "beforeOpeningCurlyBrace": true 96 | }, 97 | "validateIndentation": "\t", 98 | "validateParameterSeparator": ", ", 99 | "validateQuoteMarks": "'" 100 | } 101 | -------------------------------------------------------------------------------- /lib/class-acffcb-flexible-content.php: -------------------------------------------------------------------------------- 1 | layout = $layout; 11 | $this->key = 'acffcb-'; 12 | $this->key .= 'layout-' . $layout; 13 | $this->key .= '-flexiblecontent-'; 14 | } 15 | 16 | public function getCallingFunctionName($completeTrace=false) 17 | { 18 | $trace=debug_backtrace(); 19 | if($completeTrace) 20 | { 21 | $str = ''; 22 | foreach($trace as $caller) 23 | { 24 | $str .= $caller['function']; 25 | if (isset($caller['class'])) 26 | $str .= '-' . $caller['class']; 27 | } 28 | } 29 | else 30 | { 31 | $caller=$trace[2]; 32 | $str = $caller['function']; 33 | if (isset($caller['class'])) 34 | $str .= '-' . $caller['class']; 35 | } 36 | return $str; 37 | } 38 | 39 | /** 40 | * 41 | * Flexible Content: Calls to Action 42 | * 43 | * @author Michael W. Delaney 44 | * @since 1.0 45 | * 46 | * Flexible Content field for Calls to Action 47 | */ 48 | function cta($thisKey = 'flexible') { 49 | $FCBFlexibleContentFields = new Fields($this->layout, __FUNCTION__); 50 | 51 | return( 52 | array ( 53 | 'key' => $this->key . $thisKey . '-' . $this->getCallingFunctionName() . __FUNCTION__, 54 | 'label' => 'Calls to Action', 55 | 'name' => 'calls_to_action', 56 | 'type' => 'flexible_content', 57 | 'instructions' => '', 58 | 'required' => 0, 59 | 'conditional_logic' => 0, 60 | 'wrapper' => array ( 61 | 'width' => '', 62 | 'class' => 'acf-cta', 63 | 'id' => '', 64 | ), 65 | 'min' => '', 66 | 'max' => '', 67 | 'button_label' => 'Add Call to Action', 68 | 'layouts' => array ( 69 | array ( 70 | 'key' => $this->key . $this->getCallingFunctionName() . __FUNCTION__ . '-internal_link', 71 | 'name' => 'internal_link', 72 | 'label' => 'Internal Link', 73 | 'display' => 'block', 74 | 'sub_fields' => array ( 75 | 76 | // Internal Link 77 | $FCBFlexibleContentFields->cta_type($thisKey . 'internal'), 78 | $FCBFlexibleContentFields->cta_text($thisKey . 'internal'), 79 | $FCBFlexibleContentFields->cta_link($thisKey . 'internal'), 80 | ), 81 | ), 82 | array ( 83 | 'key' => $this->key . $this->getCallingFunctionName() . __FUNCTION__ . '-external_link', 84 | 'name' => 'external_link', 85 | 'label' => 'External Link', 86 | 'display' => 'block', 87 | 'sub_fields' => array ( 88 | 89 | // External Link 90 | $FCBFlexibleContentFields->cta_type($thisKey . 'external'), 91 | $FCBFlexibleContentFields->cta_text($thisKey . 'external'), 92 | $FCBFlexibleContentFields->cta_external($thisKey . 'external'), 93 | ), 94 | ), 95 | 96 | ) 97 | ) 98 | ); 99 | } 100 | 101 | 102 | /** 103 | * 104 | * Flexible Content: Media 105 | * 106 | * @author Michael W. Delaney 107 | * @since 1.0 108 | * 109 | * Flexible Content field for Calls to Action 110 | */ 111 | function media($min = 0, $max = 1, $thisKey = 'flexible' ) { 112 | $FCBFlexibleContentFields = new Fields($this->layout, __FUNCTION__); 113 | 114 | return( 115 | array ( 116 | 'key' => $this->key . $thisKey . '-' . $this->getCallingFunctionName() . __FUNCTION__, 117 | 'label' => 'Media', 118 | 'name' => 'media', 119 | 'type' => 'flexible_content', 120 | 'instructions' => '', 121 | 'required' => 0, 122 | 'conditional_logic' => 0, 123 | 'wrapper' => array ( 124 | 'width' => '', 125 | 'class' => 'acf-media', 126 | 'id' => '', 127 | ), 128 | 'min' => $min, 129 | 'max' => $max, 130 | 'button_label' => 'Add Media', 131 | 'layouts' => array ( 132 | array ( 133 | 'key' => $this->key . $this->getCallingFunctionName() . __FUNCTION__ . '-image', 134 | 'name' => 'image', 135 | 'label' => 'Image', 136 | 'display' => 'block', 137 | 'sub_fields' => array ( 138 | 139 | // Image Field 140 | $FCBFlexibleContentFields->media_image(), 141 | 142 | ), 143 | ), 144 | array ( 145 | 'key' => $this->key . $this->getCallingFunctionName() . __FUNCTION__ . '-video', 146 | 'name' => 'video', 147 | 'label' => 'Video', 148 | 'display' => 'block', 149 | 'sub_fields' => array ( 150 | 151 | // Image Field 152 | $FCBFlexibleContentFields->media_video(), 153 | 154 | ), 155 | ), 156 | array ( 157 | 'key' => $this->key . $this->getCallingFunctionName() . __FUNCTION__ . '-gallery', 158 | 'name' => 'gallery', 159 | 'label' => 'Gallery', 160 | 'display' => 'block', 161 | 'sub_fields' => array ( 162 | 163 | // Image Field 164 | $FCBFlexibleContentFields->gallery(), 165 | 166 | ), 167 | ), 168 | array ( 169 | 'key' => $this->key . $this->getCallingFunctionName() . __FUNCTION__ . '-content', 170 | 'name' => 'content', 171 | 'label' => 'Content', 172 | 'display' => 'block', 173 | 'sub_fields' => array ( 174 | 175 | // Image Field 176 | $FCBFlexibleContentFields->media_content(), 177 | 178 | ), 179 | ), 180 | array ( 181 | 'key' => $this->key . $this->getCallingFunctionName() . __FUNCTION__ . '-code', 182 | 'name' => 'code', 183 | 'label' => 'Code', 184 | 'display' => 'block', 185 | 'sub_fields' => array ( 186 | 187 | // Image Field 188 | $FCBFlexibleContentFields->media_code(), 189 | 190 | ), 191 | ), 192 | array ( 193 | 'key' => $this->key . $this->getCallingFunctionName() . __FUNCTION__ . '-map', 194 | 'name' => 'map', 195 | 'label' => 'Map', 196 | 'display' => 'block', 197 | 'sub_fields' => array ( 198 | 199 | // Image Field 200 | $FCBFlexibleContentFields->media_map(), 201 | 202 | ), 203 | ), 204 | ) 205 | ) 206 | ); 207 | } 208 | 209 | } 210 | -------------------------------------------------------------------------------- /lib/class-acffcb-layouts.php: -------------------------------------------------------------------------------- 1 | key = 'acffcb-'; 11 | $this->key .= 'layout-'; 12 | } 13 | 14 | /** 15 | * 16 | * Layout: Content 17 | * 18 | * @author Michael W. Delaney 19 | * @since 1.0 20 | * 21 | * Basic content block 22 | */ 23 | function content() { 24 | $FCBFields = new Fields(__FUNCTION__); 25 | $FCBRepeaters = new Repeaters(__FUNCTION__); 26 | $FCBFlexibleContent = new FlexibleContent(__FUNCTION__); 27 | 28 | return( 29 | array ( 'order' => '10', 30 | 'layout' => array ( 31 | 'key' => $this->key . __FUNCTION__, 32 | 'name' => 'content', 33 | 'label' => 'Content', 34 | 'display' => 'block', 35 | 'sub_fields' => array ( 36 | // Titles 37 | $FCBFields->title(), 38 | $FCBFields->navigation_title(), 39 | 40 | // Content tab 41 | $FCBFields->tab_content(), 42 | $FCBFields->content(), 43 | 44 | // Background tab 45 | $FCBFields->tab_background(), 46 | /**** EDITED BY JON TO LOAD BACKGROUND FIELDS */ 47 | $FCBFields->parallax_effect(), 48 | $FCBFields->background_overlay(), 49 | $FCBFields->overlay_opacity(), 50 | /**** END JONS CHANGES ****/ 51 | $FCBFields->background_image(), 52 | $FCBFields->background_color(), 53 | $FCBFields->background_color_placeholder(), 54 | $FCBFields->theme_color(), 55 | $FCBFields->choose_color(), 56 | 57 | // Call to Action 58 | $FCBFields->tab_cta(), 59 | $FCBFlexibleContent->cta(), 60 | 61 | // Dev Mode tab 62 | $FCBFields->tab_dev(), 63 | $FCBFields->dev_block_message(), 64 | $FCBRepeaters->block_data_attributes(), 65 | $FCBFields->block_classes(), 66 | 67 | $FCBFields->dev_content_message(), 68 | $FCBRepeaters->content_data_attributes(), 69 | $FCBFields->content_classes(), 70 | 71 | // Tab Endpoint 72 | $FCBFields->tab_endpoint(), 73 | 74 | ) 75 | ) 76 | ) 77 | ); 78 | } 79 | 80 | 81 | 82 | /** 83 | * 84 | * Layout: Strap 85 | * 86 | * @author Michael W. Delaney 87 | * @since 1.0 88 | * 89 | * Basic content block 90 | */ 91 | function strap() { 92 | $FCBFields = new Fields(__FUNCTION__); 93 | $FCBRepeaters = new Repeaters(__FUNCTION__); 94 | $FCBFlexibleContent = new FlexibleContent(__FUNCTION__); 95 | 96 | return( 97 | array ( 'order' => '10', 98 | 'layout' => array ( 99 | 'key' => $this->key . __FUNCTION__, 100 | 'name' => 'strap', 101 | 'label' => 'Strap', 102 | 'display' => 'block', 103 | 'sub_fields' => array ( 104 | 105 | // Content tab 106 | $FCBFields->tab_content(), 107 | $FCBFlexibleContent->media('0', '12'), 108 | 109 | // Background tab 110 | $FCBFields->tab_background(), 111 | /**** EDITED BY JON TO LOAD BACKGROUND FIELDS */ 112 | $FCBFields->parallax_effect(), 113 | $FCBFields->background_overlay(), 114 | $FCBFields->overlay_opacity(), 115 | /**** END JONS CHANGES ****/ 116 | $FCBFields->background_image(), 117 | $FCBFields->background_color(), 118 | $FCBFields->background_color_placeholder(), 119 | $FCBFields->theme_color(), 120 | $FCBFields->choose_color(), 121 | 122 | // Dev Mode tab 123 | $FCBFields->tab_dev(), 124 | $FCBFields->dev_block_message(), 125 | $FCBRepeaters->block_data_attributes(), 126 | $FCBFields->block_classes(), 127 | 128 | $FCBFields->dev_content_message(), 129 | $FCBRepeaters->content_data_attributes(), 130 | $FCBFields->content_classes(), 131 | 132 | // Tab Endpoint 133 | $FCBFields->tab_endpoint(), 134 | 135 | ) 136 | ) 137 | ) 138 | ); 139 | } 140 | 141 | 142 | /** 143 | * 144 | * Layout: Tabs 145 | * 146 | * @author Michael W. Delaney 147 | * @since 1.0 148 | * 149 | * Layout for tabbed content 150 | */ 151 | function tabs() { 152 | $FCBFields = new Fields(__FUNCTION__); 153 | $FCBRepeaters = new Repeaters(__FUNCTION__); 154 | $FCBFlexibleContent = new FlexibleContent(__FUNCTION__); 155 | 156 | return( 157 | array ( 'order' => '300', 158 | 'layout' => array ( 159 | 'key' => $this->key . __FUNCTION__, 160 | 'name' => 'tabs', 161 | 'label' => 'Tabs', 162 | 'display' => 'block', 163 | 'sub_fields' => array ( 164 | // Titles 165 | $FCBFields->title(), 166 | $FCBFields->navigation_title(), 167 | 168 | // Content tab 169 | $FCBFields->tab_content(), 170 | $FCBFields->content(), 171 | 172 | // Tabs tab 173 | $FCBFields->tab_tabs(), 174 | $FCBRepeaters->tabs(), 175 | 176 | // Background tab 177 | $FCBFields->tab_background(), 178 | /**** EDITED BY JON TO LOAD BACKGROUND FIELDS */ 179 | $FCBFields->parallax_effect(), 180 | $FCBFields->background_overlay(), 181 | $FCBFields->overlay_opacity(), 182 | /**** END JONS CHANGES ****/ 183 | $FCBFields->background_image(), 184 | $FCBFields->background_color(), 185 | $FCBFields->background_color_placeholder(), 186 | $FCBFields->theme_color(), 187 | $FCBFields->choose_color(), 188 | 189 | // Call to Action 190 | $FCBFields->tab_cta(), 191 | $FCBFlexibleContent->cta(), 192 | 193 | // Dev Mode tab 194 | $FCBFields->tab_dev(), 195 | $FCBFields->dev_block_message(), 196 | $FCBRepeaters->block_data_attributes(), 197 | $FCBFields->block_classes(), 198 | 199 | // Tab Endpoint 200 | $FCBFields->tab_endpoint(), 201 | 202 | ) 203 | ) 204 | ) 205 | ); 206 | } 207 | 208 | 209 | 210 | /** 211 | * 212 | * Layout: Gallery 213 | * 214 | * @author Michael W. Delaney 215 | * @since 1.0 216 | * 217 | * Image gallery layout 218 | */ 219 | function gallery() { 220 | $FCBFields = new Fields(__FUNCTION__); 221 | $FCBRepeaters = new Repeaters(__FUNCTION__); 222 | $FCBFlexibleContent = new FlexibleContent(__FUNCTION__); 223 | 224 | return( 225 | array ( 'order' => '70', 226 | 'layout' => array ( 227 | 'key' => $this->key . __FUNCTION__, 228 | 'name' => 'gallery', 229 | 'label' => 'Gallery', 230 | 'display' => 'block', 231 | 'sub_fields' => array ( 232 | // Titles 233 | $FCBFields->title(), 234 | $FCBFields->navigation_title(), 235 | 236 | // Content tab 237 | $FCBFields->tab_content(), 238 | $FCBFields->content(), 239 | $FCBRepeaters->content_data_attributes(), 240 | 241 | // Gallery tab 242 | $FCBFields->tab_gallery(), 243 | $FCBFields->gallery(), 244 | 245 | // Background tab 246 | $FCBFields->tab_background(), 247 | /**** EDITED BY JON TO LOAD BACKGROUND FIELDS */ 248 | $FCBFields->parallax_effect(), 249 | $FCBFields->background_overlay(), 250 | $FCBFields->overlay_opacity(), 251 | /**** END JONS CHANGES ****/ 252 | $FCBFields->background_image(), 253 | $FCBFields->background_color(), 254 | $FCBFields->background_color_placeholder(), 255 | $FCBFields->theme_color(), 256 | $FCBFields->choose_color(), 257 | 258 | // Call to Action 259 | // $FCBFields->tab_cta(), 260 | // $FCBFlexibleContent->cta(), 261 | 262 | // Dev Mode tab 263 | $FCBFields->tab_dev(), 264 | $FCBFields->dev_block_message(), 265 | $FCBRepeaters->block_data_attributes(), 266 | $FCBFields->block_classes(), 267 | 268 | // Tab Endpoint 269 | $FCBFields->tab_endpoint(), 270 | 271 | ) 272 | ) 273 | ) 274 | ); 275 | } 276 | 277 | 278 | 279 | /** 280 | * 281 | * Layout: Collapsibles 282 | * 283 | * @author Michael W. Delaney 284 | * @since 1.0 285 | * 286 | * Layout for collapsible or "accordion" content 287 | */ 288 | function collapsibles() { 289 | $FCBFields = new Fields(__FUNCTION__); 290 | $FCBRepeaters = new Repeaters(__FUNCTION__); 291 | $FCBFlexibleContent = new FlexibleContent(__FUNCTION__); 292 | 293 | return( 294 | array ( 'order' => '400', 295 | 'layout' => array ( 296 | 'key' => $this->key . __FUNCTION__, 297 | 'name' => 'collapsibles', 298 | 'label' => 'Collapsibles', 299 | 'display' => 'block', 300 | 'sub_fields' => array ( 301 | // Titles 302 | $FCBFields->title(), 303 | $FCBFields->navigation_title(), 304 | 305 | // Content tab 306 | $FCBFields->tab_content(), 307 | $FCBFields->content(), 308 | $FCBRepeaters->content_data_attributes(), 309 | 310 | // Collapsibles tab 311 | $FCBFields->tab_collapsibles(), 312 | $FCBRepeaters->collapsibles(), 313 | 314 | // Background tab 315 | $FCBFields->tab_background(), 316 | /**** EDITED BY JON TO LOAD BACKGROUND FIELDS */ 317 | $FCBFields->parallax_effect(), 318 | $FCBFields->background_overlay(), 319 | $FCBFields->overlay_opacity(), 320 | /**** END JONS CHANGES ****/ 321 | $FCBFields->background_image(), 322 | $FCBFields->background_color(), 323 | $FCBFields->background_color_placeholder(), 324 | $FCBFields->theme_color(), 325 | $FCBFields->choose_color(), 326 | 327 | // Call to Action 328 | $FCBFields->tab_cta(), 329 | $FCBFlexibleContent->cta(), 330 | 331 | // Dev Mode tab 332 | $FCBFields->tab_dev(), 333 | $FCBFields->dev_block_message(), 334 | $FCBRepeaters->block_data_attributes(), 335 | $FCBFields->block_classes(), 336 | 337 | // Tab Endpoint 338 | $FCBFields->tab_endpoint(), 339 | 340 | ) 341 | ) 342 | ) 343 | ); 344 | } 345 | 346 | 347 | /*** SLIDES HAS NO CONTENT SO REMOVED ***/ 348 | // /** 349 | // * 350 | // * Layout: Slides 351 | // * 352 | // * @author Michael W. Delaney 353 | // * @since 1.0 354 | // * 355 | // * Layout for a carousel of images or other media content 356 | // */ 357 | // function slides() { 358 | // $FCBFields = new Fields(__FUNCTION__); 359 | // $FCBRepeaters = new Repeaters(__FUNCTION__); 360 | // $FCBFlexibleContent = new FlexibleContent(__FUNCTION__); 361 | 362 | // return( 363 | // array ( 'order' => '90', 364 | // 'layout' => array ( 365 | // 'key' => $this->key . __FUNCTION__, 366 | // 'name' => 'slides', 367 | // 'label' => 'Slides', 368 | // 'display' => 'block', 369 | // 'sub_fields' => array ( 370 | // // Titles 371 | // $FCBFields->title(), 372 | // $FCBFields->navigation_title(), 373 | 374 | // // Content tab 375 | // $FCBFields->tab_content(), 376 | // $FCBFields->content(), 377 | 378 | // // Slides tab 379 | // $FCBFields->tab_slides(), 380 | // $FCBRepeaters->slides(), 381 | 382 | // // Background tab 383 | // $FCBFields->tab_background(), 384 | // /**** EDITED BY JON TO LOAD BACKGROUND FIELDS */ 385 | // $FCBFields->parallax_effect(), 386 | // $FCBFields->background_overlay(), 387 | // $FCBFields->overlay_opacity(), 388 | // /**** END JONS CHANGES ****/ 389 | // $FCBFields->background_image(), 390 | // $FCBFields->background_color(), 391 | // $FCBFields->background_color_placeholder(), 392 | // $FCBFields->theme_color(), 393 | // $FCBFields->choose_color(), 394 | 395 | // // Call to Action 396 | // $FCBFields->tab_cta(), 397 | // $FCBFlexibleContent->cta(), 398 | 399 | // // Dev Mode tab 400 | // $FCBFields->tab_dev(), 401 | // $FCBFields->dev_block_message(), 402 | // $FCBRepeaters->block_data_attributes(), 403 | // $FCBFields->block_classes(), 404 | 405 | // // Tab Endpoint 406 | // $FCBFields->tab_endpoint(), 407 | 408 | // ) 409 | // ) 410 | // ) 411 | // ); 412 | // } 413 | 414 | 415 | 416 | /** 417 | * 418 | * Layout: Content With Media 419 | * 420 | * @author Michael W. Delaney 421 | * @since 1.0 422 | * 423 | * A simple content block with optional media include (image or video) and optional Call to Action button 424 | */ 425 | function content_with_media() { 426 | $FCBFields = new Fields(__FUNCTION__); 427 | $FCBRepeaters = new Repeaters(__FUNCTION__); 428 | $FCBFlexibleContent = new FlexibleContent(__FUNCTION__); 429 | 430 | return( 431 | array ( 'order' => '20', 432 | 'layout' => array ( 433 | 'key' => $this->key . __FUNCTION__, 434 | 'name' => 'content_with_media', 435 | 'label' => 'Content with Media', 436 | 'display' => 'block', 437 | 'sub_fields' => array ( 438 | // Titles 439 | $FCBFields->title(), 440 | $FCBFields->navigation_title(), 441 | 442 | // Content tab 443 | $FCBFields->tab_content(), 444 | $FCBFields->content(), 445 | 446 | // Media tab 447 | $FCBFields->tab_media(), 448 | $FCBFlexibleContent->media(), 449 | 450 | // Background tab 451 | $FCBFields->tab_background(), 452 | /**** EDITED BY JON TO LOAD BACKGROUND FIELDS */ 453 | $FCBFields->parallax_effect(), 454 | $FCBFields->background_overlay(), 455 | $FCBFields->overlay_opacity(), 456 | /**** END JONS CHANGES ****/ 457 | $FCBFields->background_image(), 458 | $FCBFields->background_color(), 459 | $FCBFields->background_color_placeholder(), 460 | $FCBFields->theme_color(), 461 | $FCBFields->choose_color(), 462 | 463 | // Call to Action 464 | $FCBFields->tab_cta(), 465 | $FCBFlexibleContent->cta(), 466 | 467 | // Dev Mode tab 468 | $FCBFields->tab_dev(), 469 | $FCBFields->dev_block_message(), 470 | $FCBRepeaters->block_data_attributes(), 471 | $FCBFields->block_classes(), 472 | 473 | $FCBFields->dev_content_message(), 474 | $FCBRepeaters->content_data_attributes(), 475 | $FCBFields->content_classes(), 476 | 477 | $FCBFields->dev_media_message(), 478 | $FCBRepeaters->media_data_attributes(), 479 | $FCBFields->media_classes(), 480 | 481 | 482 | // Tab Endpoint 483 | $FCBFields->tab_endpoint(), 484 | 485 | ) 486 | ) 487 | ) 488 | ); 489 | } 490 | 491 | 492 | 493 | /** 494 | * 495 | * Layout: Featured Content 496 | * 497 | * @author Michael W. Delaney 498 | * @since 1.0 499 | * 500 | * Content block with relationship field to feature other site content and optional Call to Action button 501 | */ 502 | function featured_content() { 503 | $FCBFields = new Fields(__FUNCTION__); 504 | $FCBRepeaters = new Repeaters(__FUNCTION__); 505 | $FCBFlexibleContent = new FlexibleContent(__FUNCTION__); 506 | 507 | return( 508 | array ( 'order' => '100', 509 | 'layout' => array ( 510 | 'key' => $this->key . __FUNCTION__, 511 | 'name' => 'featured_content', 512 | 'label' => 'Featured Content', 513 | 'display' => 'block', 514 | 'sub_fields' => array ( 515 | // Titles 516 | $FCBFields->title(), 517 | $FCBFields->navigation_title(), 518 | 519 | // Content tab 520 | $FCBFields->tab_content(), 521 | $FCBFields->content(), 522 | 523 | // Features tab 524 | $FCBFields->tab_features(), 525 | $FCBFields->featured_content(), 526 | 527 | // Background tab 528 | $FCBFields->tab_background(), 529 | /**** EDITED BY JON TO LOAD BACKGROUND FIELDS */ 530 | $FCBFields->parallax_effect(), 531 | $FCBFields->background_overlay(), 532 | $FCBFields->overlay_opacity(), 533 | /**** END JONS CHANGES ****/ 534 | $FCBFields->background_image(), 535 | $FCBFields->background_color(), 536 | $FCBFields->background_color_placeholder(), 537 | $FCBFields->theme_color(), 538 | $FCBFields->choose_color(), 539 | 540 | // Call to Action 541 | // $FCBFields->tab_cta(), 542 | // $FCBFlexibleContent->cta(), 543 | 544 | // Dev Mode tab 545 | $FCBFields->tab_dev(), 546 | $FCBFields->dev_block_message(), 547 | $FCBRepeaters->block_data_attributes(), 548 | $FCBFields->block_classes(), 549 | 550 | // Tab Endpoint 551 | $FCBFields->tab_endpoint(), 552 | 553 | ) 554 | ) 555 | ) 556 | ); 557 | } 558 | 559 | 560 | 561 | /** 562 | * 563 | * Layout: Cards 564 | * 565 | * @author Michael W. Delaney 566 | * @since 1.0 567 | * 568 | * List of links with titles and content 569 | */ 570 | function cards() { 571 | $FCBFields = new Fields(__FUNCTION__); 572 | $FCBRepeaters = new Repeaters(__FUNCTION__); 573 | $FCBFlexibleContent = new FlexibleContent(__FUNCTION__); 574 | 575 | return( 576 | array ( 'order' => '100', 577 | 'layout' => array ( 578 | 'key' => $this->key . __FUNCTION__, 579 | 'name' => 'cards', 580 | 'label' => 'Cards', 581 | 'display' => 'block', 582 | 'sub_fields' => array ( 583 | // Titles 584 | $FCBFields->title(), 585 | $FCBFields->navigation_title(), 586 | 587 | // Content tab 588 | $FCBFields->tab_content(), 589 | $FCBFields->content(), 590 | 591 | // Linked Items repeater 592 | $FCBFields->tab_cards(), 593 | $FCBRepeaters->cards(), 594 | 595 | // Background tab 596 | $FCBFields->tab_background(), 597 | /**** EDITED BY JON TO LOAD BACKGROUND FIELDS */ 598 | $FCBFields->parallax_effect(), 599 | $FCBFields->background_overlay(), 600 | $FCBFields->overlay_opacity(), 601 | /**** END JONS CHANGES ****/ 602 | $FCBFields->background_image(), 603 | $FCBFields->background_color(), 604 | $FCBFields->background_color_placeholder(), 605 | $FCBFields->theme_color(), 606 | $FCBFields->choose_color(), 607 | 608 | // // Call to Action 609 | // $FCBFields->tab_cta(), 610 | // $FCBFlexibleContent->cta(), 611 | 612 | // Dev Mode tab 613 | $FCBFields->tab_dev(), 614 | $FCBFields->dev_block_message(), 615 | $FCBRepeaters->block_data_attributes(), 616 | $FCBFields->block_classes(), 617 | 618 | // Tab Endpoint 619 | $FCBFields->tab_endpoint(), 620 | 621 | ) 622 | ) 623 | ) 624 | ); 625 | } 626 | 627 | 628 | 629 | 630 | /** 631 | * 632 | * Layout: Media 633 | * 634 | * @author Michael W. Delaney 635 | * @since 1.0 636 | * 637 | * A simple media block optional Call to Action button 638 | */ 639 | function media() { 640 | $FCBFields = new Fields(__FUNCTION__); 641 | $FCBRepeaters = new Repeaters(__FUNCTION__); 642 | $FCBFlexibleContent = new FlexibleContent(__FUNCTION__); 643 | 644 | return( 645 | array ( 'order' => '60', 646 | 'layout' => array ( 647 | 'key' => $this->key . __FUNCTION__, 648 | 'name' => 'media', 649 | 'label' => 'Media', 650 | 'display' => 'block', 651 | 'sub_fields' => array ( 652 | // Titles 653 | $FCBFields->title(), 654 | $FCBFields->navigation_title(), 655 | 656 | // Media tab 657 | $FCBFields->tab_media(), 658 | $FCBFlexibleContent->media(), 659 | 660 | // Background tab 661 | $FCBFields->tab_background(), 662 | /**** EDITED BY JON TO LOAD BACKGROUND FIELDS */ 663 | $FCBFields->parallax_effect(), 664 | $FCBFields->background_overlay(), 665 | $FCBFields->overlay_opacity(), 666 | /**** END JONS CHANGES ****/ 667 | $FCBFields->background_image(), 668 | $FCBFields->background_color(), 669 | $FCBFields->background_color_placeholder(), 670 | $FCBFields->theme_color(), 671 | $FCBFields->choose_color(), 672 | 673 | // Call to Action 674 | // $FCBFields->tab_cta(), 675 | // $FCBFlexibleContent->cta(), 676 | 677 | // Dev Mode tab 678 | $FCBFields->tab_dev(), 679 | $FCBFields->dev_block_message(), 680 | $FCBRepeaters->block_data_attributes(), 681 | $FCBFields->block_classes(), 682 | 683 | // Tab Endpoint 684 | $FCBFields->tab_endpoint(), 685 | 686 | ) 687 | ) 688 | ) 689 | ); 690 | } 691 | 692 | 693 | 694 | /** 695 | * 696 | * Layout: Slider 697 | * 698 | * @author Michael W. Delaney 699 | * @since 1.0 700 | * 701 | * Media slider with optional Call to Action button 702 | */ 703 | function slider() { 704 | $FCBFields = new Fields(__FUNCTION__); 705 | $FCBRepeaters = new Repeaters(__FUNCTION__); 706 | $FCBFlexibleContent = new FlexibleContent(__FUNCTION__); 707 | 708 | return( 709 | array ( 'order' => '200', 710 | 'layout' => array ( 711 | 'key' => $this->key . __FUNCTION__, 712 | 'name' => 'slider', 713 | 'label' => 'Slider', 714 | 'display' => 'block', 715 | 'sub_fields' => array ( 716 | // Titles 717 | $FCBFields->title(), 718 | $FCBFields->navigation_title(), 719 | 720 | // Content tab 721 | $FCBFields->tab_content(), 722 | $FCBFields->content(), 723 | 724 | // Slides tab 725 | $FCBFields->tab_slides(), 726 | $FCBRepeaters->slides(), 727 | 728 | // Background tab 729 | $FCBFields->tab_background(), 730 | $FCBFields->background_image(), 731 | $FCBFields->background_color(), 732 | $FCBFields->background_color_placeholder(), 733 | $FCBFields->theme_color(), 734 | $FCBFields->choose_color(), 735 | 736 | // Call to Action 737 | $FCBFields->tab_cta(), 738 | $FCBFlexibleContent->cta(), 739 | 740 | // Dev Mode tab 741 | $FCBFields->tab_dev(), 742 | $FCBFields->dev_block_message(), 743 | $FCBRepeaters->block_data_attributes(), 744 | $FCBFields->block_classes(), 745 | 746 | // Tab Endpoint 747 | $FCBFields->tab_endpoint(), 748 | 749 | ) 750 | ) 751 | ) 752 | ); 753 | } 754 | 755 | 756 | /** 757 | * 758 | * Layout: Post List 759 | * 760 | * @author Michael W. Delaney 761 | * @since 1.0 762 | * 763 | * List of posts 764 | */ 765 | function post_list() { 766 | $FCBFields = new Fields(__FUNCTION__); 767 | $FCBRepeaters = new Repeaters(__FUNCTION__); 768 | $FCBFlexibleContent = new FlexibleContent(__FUNCTION__); 769 | 770 | return( 771 | array ( 'order' => '500', 772 | 'layout' => array ( 773 | 'key' => $this->key . __FUNCTION__, 774 | 'name' => 'post_list', 775 | 'label' => 'Post List', 776 | 'display' => 'block', 777 | 'sub_fields' => array ( 778 | // Titles 779 | $FCBFields->title(), 780 | $FCBFields->navigation_title(), 781 | 782 | // Content tab 783 | $FCBFields->tab_content(), 784 | $FCBFields->content(), 785 | 786 | // Post List Tab 787 | $FCBFields->tab_post_list(), 788 | $FCBFields->posts_per_page(), 789 | $FCBFields->show_author(), 790 | $FCBFields->show_date(), 791 | $FCBFields->show_featured_image(), 792 | $FCBFields->category(), 793 | 794 | // Background tab 795 | $FCBFields->tab_background(), 796 | /**** EDITED BY JON TO LOAD BACKGROUND FIELDS */ 797 | $FCBFields->parallax_effect(), 798 | $FCBFields->background_overlay(), 799 | $FCBFields->overlay_opacity(), 800 | /**** END JONS CHANGES ****/ 801 | $FCBFields->background_image(), 802 | $FCBFields->background_color(), 803 | $FCBFields->background_color_placeholder(), 804 | $FCBFields->theme_color(), 805 | $FCBFields->choose_color(), 806 | 807 | // Call to Action 808 | $FCBFields->tab_cta(), 809 | $FCBFlexibleContent->cta(), 810 | 811 | // Dev Mode tab 812 | $FCBFields->tab_dev(), 813 | $FCBFields->dev_block_message(), 814 | $FCBRepeaters->block_data_attributes(), 815 | $FCBFields->block_classes(), 816 | 817 | // Tab Endpoint 818 | $FCBFields->tab_endpoint(), 819 | 820 | ) 821 | ) 822 | ) 823 | ); 824 | } 825 | } 826 | -------------------------------------------------------------------------------- /lib/class-acffcb-repeaters.php: -------------------------------------------------------------------------------- 1 | layout = $layout; 11 | $this->key = 'acffcb-'; 12 | $this->key .= 'layout-' . $layout; 13 | $this->key .= '-repeater-'; 14 | } 15 | 16 | 17 | 18 | /** 19 | * 20 | * Repeater: Cards 21 | * 22 | * @author Michael W. Delaney 23 | * @since 1.0 24 | * 25 | * Linked content items repeater 26 | */ 27 | function cards() { 28 | $FCBRepeaterFields = new Fields($this->layout, __FUNCTION__); 29 | $FCBRepeaterFlexibleContent = new FlexibleContent(__FUNCTION__); 30 | 31 | return( 32 | array ( 33 | 'key' => $this->key . __FUNCTION__, 34 | 'label' => 'Cards', 35 | 'name' => 'cards', 36 | 'type' => 'repeater', 37 | 'instructions' => '', 38 | 'required' => 0, 39 | 'conditional_logic' => 0, 40 | 'wrapper' => array ( 41 | 'width' => '', 42 | 'class' => 'acf-media', 43 | 'id' => '', 44 | ), 45 | 'collapsed' => $this->key . __FUNCTION__ . '-field-title', 46 | 'min' => '', 47 | 'max' => '', 48 | 'layout' => 'block', 49 | 'button_label' => 'Add Card', 50 | 'sub_fields' => array ( 51 | // Title 52 | $FCBRepeaterFields->title(), 53 | $FCBRepeaterFields->navigation_title(), 54 | 55 | // Content Tab 56 | $FCBRepeaterFields->tab_content(), 57 | $FCBRepeaterFields->content(), 58 | 59 | // Media tab 60 | $FCBRepeaterFields->tab_media(), 61 | $FCBRepeaterFlexibleContent->media(), 62 | 63 | // Background Tab 64 | $FCBRepeaterFields->tab_background(), 65 | /**** EDITED BY JON TO LOAD BACKGROUND FIELDS */ 66 | $FCBRepeaterFields->parallax_effect(), 67 | $FCBRepeaterFields->background_overlay(), 68 | /**** END JONS CHANGES ****/ 69 | $FCBRepeaterFields->background_image(), 70 | $FCBRepeaterFields->background_color(), 71 | $FCBRepeaterFields->background_color_placeholder(), 72 | $FCBRepeaterFields->theme_color(), 73 | $FCBRepeaterFields->choose_color(), 74 | 75 | // Call to Action 76 | $FCBRepeaterFields->tab_cta(), 77 | $FCBRepeaterFlexibleContent->cta('card'), 78 | 79 | // Tab Endpoint 80 | $FCBRepeaterFields->tab_endpoint(), 81 | 82 | ) 83 | ) 84 | ); 85 | } 86 | 87 | 88 | 89 | /** 90 | * 91 | * Repeater: Tabs 92 | * 93 | * @author Michael W. Delaney 94 | * @since 1.0 95 | * 96 | * Tabs repeater 97 | */ 98 | function tabs() { 99 | $FCBRepeaterFields = new Fields($this->layout, __FUNCTION__); 100 | $FCBRepeaterFlexibleContent = new FlexibleContent(__FUNCTION__); 101 | 102 | return( 103 | array ( 104 | 'key' => $this->key . __FUNCTION__, 105 | 'label' => 'Tabs', 106 | 'name' => 'tabs', 107 | 'type' => 'repeater', 108 | 'instructions' => '', 109 | 'required' => 0, 110 | 'conditional_logic' => 0, 111 | 'wrapper' => array ( 112 | 'width' => '', 113 | 'class' => 'acf-media', 114 | 'id' => '', 115 | ), 116 | 'collapsed' => '', 117 | 'min' => '', 118 | 'max' => '', 119 | 'layout' => 'block', 120 | 'button_label' => 'Add Tab', 121 | 'sub_fields' => array ( 122 | 123 | // Title 124 | $FCBRepeaterFields->title(), 125 | $FCBRepeaterFields->navigation_title(), 126 | 127 | // Content Tab 128 | $FCBRepeaterFields->tab_content(), 129 | $FCBRepeaterFields->content(), 130 | 131 | // Media tab 132 | $FCBRepeaterFields->tab_media(), 133 | $FCBRepeaterFlexibleContent->media(), 134 | 135 | // Background Tab 136 | $FCBRepeaterFields->tab_background(), 137 | /**** EDITED BY JON TO LOAD BACKGROUND FIELDS */ 138 | $FCBRepeaterFields->parallax_effect(), 139 | $FCBRepeaterFields->background_overlay(), 140 | /**** END JONS CHANGES ****/ 141 | $FCBRepeaterFields->background_image(), 142 | $FCBRepeaterFields->background_color(), 143 | $FCBRepeaterFields->background_color_placeholder(), 144 | $FCBRepeaterFields->theme_color(), 145 | $FCBRepeaterFields->choose_color(), 146 | 147 | // Call to Action 148 | $FCBRepeaterFields->tab_cta(), 149 | $FCBRepeaterFlexibleContent->cta('tab'), 150 | 151 | // Tab Endpoint 152 | $FCBRepeaterFields->tab_endpoint(), 153 | 154 | ) 155 | ) 156 | ); 157 | } 158 | 159 | 160 | 161 | /** 162 | * 163 | * Repeater: Collapsibles 164 | * 165 | * @author Michael W. Delaney 166 | * @since 1.0 167 | * 168 | * Collapsibles repeater 169 | */ 170 | function collapsibles() { 171 | $FCBRepeaterFields = new Fields($this->layout, __FUNCTION__); 172 | $FCBRepeaterFlexibleContent = new FlexibleContent(__FUNCTION__); 173 | 174 | return( 175 | array ( 176 | 'key' => $this->key . __FUNCTION__, 177 | 'label' => 'Collapsibles', 178 | 'name' => 'collapsibles', 179 | 'type' => 'repeater', 180 | 'instructions' => '', 181 | 'required' => 0, 182 | 'conditional_logic' => 0, 183 | 'wrapper' => array ( 184 | 'width' => '', 185 | 'class' => 'acf-media', 186 | 'id' => '', 187 | ), 188 | 'collapsed' => '', 189 | 'min' => '', 190 | 'max' => '', 191 | 'layout' => 'block', 192 | 'button_label' => 'Add Collapsible', 193 | 'sub_fields' => array ( 194 | 195 | // Title 196 | $FCBRepeaterFields->title(), 197 | $FCBRepeaterFields->navigation_title(), 198 | $FCBRepeaterFields->panel_type(), 199 | 200 | // Content Tab 201 | $FCBRepeaterFields->tab_content(), 202 | $FCBRepeaterFields->content(), 203 | 204 | // Media tab 205 | $FCBRepeaterFields->tab_media(), 206 | $FCBRepeaterFlexibleContent->media(), 207 | 208 | // Background Tab 209 | $FCBRepeaterFields->tab_background(), 210 | /**** EDITED BY JON TO LOAD BACKGROUND FIELDS */ 211 | $FCBRepeaterFields->parallax_effect(), 212 | $FCBRepeaterFields->background_overlay(), 213 | /**** END JONS CHANGES ****/ 214 | $FCBRepeaterFields->background_image(), 215 | $FCBRepeaterFields->background_color(), 216 | $FCBRepeaterFields->background_color_placeholder(), 217 | $FCBRepeaterFields->theme_color(), 218 | $FCBRepeaterFields->choose_color(), 219 | 220 | // Call to Action 221 | $FCBRepeaterFields->tab_cta(), 222 | $FCBRepeaterFlexibleContent->cta('collapse'), 223 | 224 | // Tab Endpoint 225 | $FCBRepeaterFields->tab_endpoint(), 226 | 227 | ) 228 | ) 229 | ); 230 | } 231 | 232 | 233 | /** 234 | * 235 | * Repeater: Slides 236 | * 237 | * @author Michael W. Delaney 238 | * @since 1.0 239 | * 240 | * Repeater field for slides 241 | */ 242 | function slides() { 243 | $FCBRepeaterFields = new Fields($this->layout, __FUNCTION__); 244 | $FCBRepeaterFlexibleContent = new FlexibleContent(__FUNCTION__); 245 | 246 | return( 247 | array ( 248 | 'key' => $this->key . __FUNCTION__, 249 | 'label' => 'Slides', 250 | 'name' => 'slides', 251 | 'type' => 'repeater', 252 | 'instructions' => '', 253 | 'required' => 0, 254 | 'conditional_logic' => 0, 255 | 'wrapper' => array ( 256 | 'width' => '', 257 | 'class' => '', 258 | 'id' => '', 259 | ), 260 | 'collapsed' => 'field_573b50b3ebf4d', 261 | 'min' => '', 262 | 'max' => '', 263 | 'layout' => 'block', 264 | 'button_label' => 'Add Slide', 265 | 'sub_fields' => array ( 266 | // Title 267 | $FCBRepeaterFields->title(), 268 | 269 | // Content Tab 270 | $FCBRepeaterFields->tab_content(), 271 | $FCBRepeaterFields->content(), 272 | 273 | // Call to Action 274 | $FCBRepeaterFields->tab_cta(), 275 | $FCBRepeaterFlexibleContent->cta('slide'), 276 | 277 | // Media tab 278 | $FCBRepeaterFields->tab_media(), 279 | $FCBRepeaterFlexibleContent->media(), 280 | 281 | // Background Tab 282 | $FCBRepeaterFields->tab_background(), 283 | $FCBRepeaterFields->background_image(), 284 | $FCBRepeaterFields->background_color(), 285 | $FCBRepeaterFields->background_color_placeholder(), 286 | $FCBRepeaterFields->theme_color(), 287 | $FCBRepeaterFields->choose_color(), 288 | ) 289 | ) 290 | ); 291 | } 292 | 293 | 294 | /** 295 | * 296 | * Field: Block Data Attributes 297 | * 298 | * @author Michael W. Delaney 299 | * @since 1.0 300 | * 301 | * Repeater for data attributes on blocks 302 | */ 303 | function block_data_attributes() { 304 | $FCBRepeaterFields = new Fields($this->layout, __FUNCTION__); 305 | 306 | return( 307 | array ( 308 | 'key' => $this->key . __FUNCTION__, 309 | 'label' => 'Data Attributes', 310 | 'name' => 'data_attributes', 311 | 'type' => 'repeater', 312 | 'instructions' => '', 313 | 'required' => 0, 314 | 'conditional_logic' => 0, 315 | 'wrapper' => array ( 316 | 'width' => '', 317 | 'class' => 'acf-dev', 318 | 'id' => '', 319 | ), 320 | 'collapsed' => '', 321 | 'min' => '', 322 | 'max' => '', 323 | 'layout' => 'table', 324 | 'button_label' => 'Add Data Attribute', 325 | 'sub_fields' => array ( 326 | // Data Attributes 327 | $FCBRepeaterFields->data_attribute(), 328 | $FCBRepeaterFields->data_value(), 329 | ) 330 | ) 331 | ); 332 | } 333 | 334 | 335 | /** 336 | * 337 | * Field: Content Data Attributes 338 | * 339 | * @author Michael W. Delaney 340 | * @since 1.0 341 | * 342 | * Repeater for data attributes on content tabs 343 | */ 344 | function content_data_attributes() { 345 | $FCBRepeaterFields = new Fields($this->layout, __FUNCTION__); 346 | 347 | return( 348 | array ( 349 | 'key' => $this->key . __FUNCTION__, 350 | 'label' => 'Data Attributes', 351 | 'name' => 'data_attributes', 352 | 'type' => 'repeater', 353 | 'instructions' => '', 354 | 'required' => 0, 355 | 'conditional_logic' => 0, 356 | 'wrapper' => array ( 357 | 'width' => '', 358 | 'class' => 'acf-dev', 359 | 'id' => '', 360 | ), 361 | 'collapsed' => '', 362 | 'min' => '', 363 | 'max' => '', 364 | 'layout' => 'table', 365 | 'button_label' => 'Add Data Attribute', 366 | 'sub_fields' => array ( 367 | // Data Attributes 368 | $FCBRepeaterFields->data_attribute(), 369 | $FCBRepeaterFields->data_value(), 370 | ) 371 | ) 372 | ); 373 | } 374 | 375 | 376 | 377 | /** 378 | * 379 | * Field: Media Data Attributes 380 | * 381 | * @author Michael W. Delaney 382 | * @since 1.0 383 | * 384 | * Repeater for data attributes on media tabs 385 | */ 386 | function media_data_attributes() { 387 | $FCBRepeaterFields = new Fields($this->layout, __FUNCTION__); 388 | return( 389 | array ( 390 | 'key' => $this->key . __FUNCTION__, 391 | 'label' => 'Data Attributes', 392 | 'name' => 'data_attributes', 393 | 'type' => 'repeater', 394 | 'instructions' => '', 395 | 'required' => 0, 396 | 'conditional_logic' => 0, 397 | 'wrapper' => array ( 398 | 'width' => '', 399 | 'class' => 'acf-dev', 400 | 'id' => '', 401 | ), 402 | 'collapsed' => '', 403 | 'min' => '', 404 | 'max' => '', 405 | 'layout' => 'table', 406 | 'button_label' => 'Add Data Attribute', 407 | 'sub_fields' => array ( 408 | // Data Attributes 409 | $FCBRepeaterFields->data_attribute(), 410 | $FCBRepeaterFields->data_value(), 411 | ) 412 | ) 413 | ); 414 | } 415 | 416 | } 417 | -------------------------------------------------------------------------------- /lib/class-acffcb-template-loader.php: -------------------------------------------------------------------------------- 1 | unset_template_data(); 79 | } 80 | 81 | /** 82 | * Retrieve a template part. 83 | * 84 | * @since 1.0.0 85 | * 86 | * @param string $slug Template slug. 87 | * @param string $name Optional. Template variation name. Default null. 88 | * @param bool $load Optional. Whether to load template. Default true. 89 | * 90 | * @return string 91 | */ 92 | public function get_template_part( $slug, $name = null, $load = true ) { 93 | // Execute code for this part. 94 | do_action( 'get_template_part_' . $slug, $slug, $name ); 95 | 96 | // Get files names of templates, for given slug and name. 97 | $templates = $this->get_template_file_names( $slug, $name ); 98 | 99 | // Return the part that is found. 100 | return $this->locate_template( $templates, $load, false ); 101 | } 102 | 103 | /** 104 | * Make custom data available to template. 105 | * 106 | * Data is available to the template as properties under the `$data` variable. 107 | * i.e. A value provided here under `$data['foo']` is available as `$data->foo`. 108 | * 109 | * When an input key has a hyphen, you can use `$data->{foo-bar}` in the template. 110 | * 111 | * @since 1.2.0 112 | * 113 | * @param array $data Custom data for the template. 114 | * @param string $var_name Optional. Variable under which the custom data is available in the template. 115 | * Default is 'data'. 116 | */ 117 | public function set_template_data( array $data, $var_name = 'data' ) { 118 | global $wp_query; 119 | 120 | $wp_query->query_vars[ $var_name ] = (object) $data; 121 | } 122 | 123 | /** 124 | * Remove access to custom data in template. 125 | * 126 | * Good to use once the final template part has been requested. 127 | * 128 | * @since 1.2.0 129 | */ 130 | public function unset_template_data() { 131 | global $wp_query; 132 | 133 | if ( isset( $wp_query->query_vars['data'] ) ) { 134 | unset( $wp_query->query_vars['data'] ); 135 | } 136 | } 137 | 138 | /** 139 | * Given a slug and optional name, create the file names of templates. 140 | * 141 | * @since 1.0.0 142 | * 143 | * @param string $slug Template slug. 144 | * @param string $name Template variation name. 145 | * 146 | * @return array 147 | */ 148 | protected function get_template_file_names( $slug, $name ) { 149 | $templates = array(); 150 | if ( isset( $name ) ) { 151 | $templates[] = $slug . '-' . $name . '.php'; 152 | } 153 | $templates[] = $slug . '.php'; 154 | 155 | /** 156 | * Allow template choices to be filtered. 157 | * 158 | * The resulting array should be in the order of most specific first, to least specific last. 159 | * e.g. 0 => recipe-instructions.php, 1 => recipe.php 160 | * 161 | * @since 1.0.0 162 | * 163 | * @param array $templates Names of template files that should be looked for, for given slug and name. 164 | * @param string $slug Template slug. 165 | * @param string $name Template variation name. 166 | */ 167 | return apply_filters( $this->filter_prefix . '_get_template_part', $templates, $slug, $name ); 168 | } 169 | 170 | /** 171 | * Retrieve the name of the highest priority template file that exists. 172 | * 173 | * Searches in the STYLESHEETPATH before TEMPLATEPATH so that themes which 174 | * inherit from a parent theme can just overload one file. If the template is 175 | * not found in either of those, it looks in the theme-compat folder last. 176 | * 177 | * @since 1.0.0 178 | * 179 | * @param string|array $template_names Template file(s) to search for, in order. 180 | * @param bool $load If true the template file will be loaded if it is found. 181 | * @param bool $require_once Whether to require_once or require. Default true. 182 | * Has no effect if $load is false. 183 | * 184 | * @return string The template filename if one is located. 185 | */ 186 | public function locate_template( $template_names, $load = false, $require_once = true ) { 187 | // No file found yet. 188 | $located = false; 189 | 190 | // Remove empty entries. 191 | $template_names = array_filter( (array) $template_names ); 192 | $template_paths = $this->get_template_paths(); 193 | 194 | // Try to find a template file. 195 | foreach ( $template_names as $template_name ) { 196 | // Trim off any slashes from the template name. 197 | $template_name = ltrim( $template_name, '/' ); 198 | 199 | // Try locating this template file by looping through the template paths. 200 | foreach ( $template_paths as $template_path ) { 201 | if ( file_exists( $template_path . $template_name ) ) { 202 | $located = $template_path . $template_name; 203 | break 2; 204 | } 205 | } 206 | } 207 | 208 | if ( $load && $located ) { 209 | load_template( $located, $require_once ); 210 | } 211 | 212 | return $located; 213 | } 214 | 215 | /** 216 | * Return a list of paths to check for template locations. 217 | * 218 | * Default is to check in a child theme (if relevant) before a parent theme, so that themes which inherit from a 219 | * parent theme can just overload one file. If the template is not found in either of those, it looks in the 220 | * theme-compat folder last. 221 | * 222 | * @since 1.0.0 223 | * 224 | * @return mixed|void 225 | */ 226 | protected function get_template_paths() { 227 | $theme_directory = trailingslashit( $this->theme_template_directory ); 228 | 229 | $file_paths = array( 230 | 10 => trailingslashit( get_template_directory() ) . $theme_directory, 231 | 100 => $this->get_templates_dir(), 232 | ); 233 | 234 | // Only add this conditionally, so non-child themes don't redundantly check active theme twice. 235 | if ( is_child_theme() ) { 236 | $file_paths[1] = trailingslashit( get_stylesheet_directory() ) . $theme_directory; 237 | } 238 | 239 | /** 240 | * Allow ordered list of template paths to be amended. 241 | * 242 | * @since 1.0.0 243 | * 244 | * @param array $var Default is directory in child theme at index 1, parent theme at 10, and plugin at 100. 245 | */ 246 | $file_paths = apply_filters( $this->filter_prefix . '_template_paths', $file_paths ); 247 | 248 | // Sort the file paths based on priority. 249 | ksort( $file_paths, SORT_NUMERIC ); 250 | 251 | return array_map( 'trailingslashit', $file_paths ); 252 | } 253 | 254 | /** 255 | * Return the path to the templates directory in this plugin. 256 | * 257 | * May be overridden in subclass. 258 | * 259 | * @since 1.0.0 260 | * 261 | * @return string 262 | */ 263 | protected function get_templates_dir() { 264 | return trailingslashit( $this->plugin_directory ) . $this->plugin_template_directory; 265 | } 266 | } 267 | } -------------------------------------------------------------------------------- /lib/class-init.php: -------------------------------------------------------------------------------- 1 | add_shortcodes(); 20 | 21 | // Enqueue admin styles and scripts 22 | add_action('admin_enqueue_scripts', array( $this, 'admin_styles' ) ); 23 | add_action('admin_enqueue_scripts', array( $this, 'dev_mode' ) ); 24 | add_action('admin_enqueue_scripts', array( $this, 'admin_scripts' ) ); 25 | 26 | /**** EDITED BY JON TO LOAD THE FRONTEND SCRIPTS AND SASS */ 27 | // Enqueue frontend styles and scripts 28 | add_action('wp_enqueue_scripts', array( $this, 'frontend_styles' ) ); 29 | add_action('wp_enqueue_scripts', array( $this, 'frontend_scripts' ) ); 30 | /**** END JONS CHANGES ****/ 31 | 32 | // Armor the original WordPress content 33 | add_filter('fcb_content_before', 'acfcfb_content_before'); 34 | add_filter('fcb_content_after', 'acfcfb_content_after'); 35 | 36 | 37 | $this->args = array ( 38 | 'key' => 'cfb_blocks', 39 | 'title' => 'Content Blocks', 40 | 'fields' => array ( 41 | array ( 42 | 'key' => 'cfb_content_blocks', 43 | 'label' => 'Blocks', 44 | 'name' => 'blocks', 45 | 'type' => 'flexible_content', 46 | 'instructions' => '', 47 | 'required' => 0, 48 | 'conditional_logic' => 0, 49 | 'wrapper' => array ( 50 | 'width' => '', 51 | 'class' => '', 52 | 'id' => '', 53 | ), 54 | 'button_label' => 'Add Block', 55 | 'min' => '', 56 | 'max' => '', 57 | 'layouts' => array (), 58 | ), 59 | ), 60 | 'location' => array (), 61 | 'menu_order' => 0, 62 | 'position' => 'normal', 63 | 'style' => 'default', 64 | 'label_placement' => 'top', 65 | 'instruction_placement' => 'label', 66 | /**** EDITED BY JON TO HIDE DEFAULT CONTENT */ 67 | 'hide_on_screen' => array( 68 | 0 => 'the_content', 69 | ), 70 | /**** END JONS CHANGES ****/ 71 | 'active' => 1, 72 | 'description' => '', 73 | ); 74 | } 75 | 76 | 77 | public function fcb_create_blocks() { 78 | if( function_exists('acf_add_local_field_group') ): 79 | 80 | /** 81 | * Check for declared post types to attach fields to 82 | * 83 | * @author Michael W. Delaney 84 | * @since 1.0 85 | * 86 | * Default: post_type == page 87 | * 88 | * Declare theme support for specific post types: 89 | * $landing_page_templates = array( 90 | * array ( 91 | * array ( 92 | * 'param' => 'post_type', 93 | * 'operator' => '==', 94 | * 'value' => 'page', 95 | * ), 96 | * array ( 97 | * 'param' => 'page_template', 98 | * 'operator' => '!=', 99 | * 'value' => 'template-no-header-image.php', 100 | * ), 101 | * ), 102 | * ); 103 | * add_theme_support( 'flexible-content-location', $landing_page_templates ); 104 | */ 105 | 106 | //Check if theme support is explicitly defined. If so, enable all attachments declared in theme support. 107 | if( current_theme_supports( 'flexible-content-location' ) ) { 108 | $locations_supported = get_theme_support( 'flexible-content-location' ); 109 | $locations_enabled = $locations_supported[0]; 110 | } else { 111 | // If theme support is not explicitly defined, enable default attachments. 112 | $locations_enabled = array( 113 | array ( 114 | array ( 115 | 'param' => 'post_type', 116 | 'operator' => '==', 117 | 'value' => 'page', 118 | ) 119 | ) 120 | ); 121 | } 122 | // Insert each location into the $args array 123 | $this->args['location'] = $locations_enabled; 124 | 125 | 126 | 127 | /** 128 | * Include all enabled layouts 129 | * 130 | * @author Michael W. Delaney 131 | * @since 1.0 132 | * 133 | * Declare theme support for specific layouts. Default is to include all layouts: 134 | * add_theme_support( 'flexible-content-blocks', array( 'content', 'content_with_media' ) ); 135 | */ 136 | $layouts_array = array(); 137 | $layouts_class = null; 138 | $layouts_class = apply_filters('fcb_get_layouts', $layouts_class); 139 | $layouts_array = $this->add_layouts($layouts_class, $layouts_array); 140 | $layouts_array = $this->layout_sort($layouts_array); 141 | $layouts_array = $this->filter_layouts($layouts_array); 142 | // Insert each layouts into the $args array 143 | 144 | foreach ( $layouts_array as $layout) { 145 | $this->args['fields'][0]['layouts'][] = $layout['layout']; 146 | } 147 | 148 | 149 | 150 | /** 151 | * Add the local field group, with its layouts, to ACF 152 | * 153 | * @author Michael W. Delaney 154 | * @since 1.0 155 | * 156 | */ 157 | 158 | acf_add_local_field_group($this->args); 159 | 160 | endif; 161 | } 162 | 163 | 164 | /** 165 | * Enqueue admin scripts and styles 166 | */ 167 | function admin_scripts() { 168 | wp_enqueue_script( 'acf-flexible-content-fields-ace', ACFFCB_PLUGIN_URL . 'assets/js/ace/ace.js' ); 169 | wp_enqueue_script( 'acf-flexible-content-fields-admin-script', ACFFCB_PLUGIN_URL . 'assets/js/admin-script.js' ); 170 | } 171 | 172 | function admin_styles() { 173 | wp_enqueue_style( 'acf-flexible-content-fields-admin-style', ACFFCB_PLUGIN_URL . 'assets/css/admin.css' ); 174 | } 175 | 176 | /**** EDITED BY JON TO LOAD THE FRONTEND SCRIPTS AND SASS */ 177 | function frontend_scripts() { 178 | wp_enqueue_script( 'jquery' ); 179 | wp_enqueue_script( 'acf-flexible-content-frontend', ACFFCB_PLUGIN_URL . 'assets/js/project.js', array(), '1.0.0', true ); 180 | } 181 | 182 | function frontend_styles() { 183 | wp_enqueue_style( 'acf-flexible-content-frontend', ACFFCB_PLUGIN_URL . 'assets/css/project.css' ); 184 | } 185 | /**** END JONS CHANGES ****/ 186 | 187 | function dev_mode() { 188 | if( current_theme_supports( 'flexible-content-dev-mode' ) ) { 189 | wp_enqueue_style( 'acf-flexible-content-fields-dev-mode', ACFFCB_PLUGIN_URL . 'assets/css/dev-mode.css' ); 190 | } else { 191 | wp_enqueue_style( 'acf-flexible-content-fields-no-dev-mode', ACFFCB_PLUGIN_URL . 'assets/css/no-dev-mode.css' ); 192 | } 193 | } 194 | 195 | 196 | /** 197 | * Function called from filter to execute adding layouts to the passed array 198 | * @param array $layouts_array the current layouts array 199 | */ 200 | 201 | function add_layouts($class, $layouts_array) { 202 | return $this->insert_the_layouts($class, $layouts_array); 203 | } 204 | 205 | 206 | 207 | /** 208 | * Insert all functions from the passed $class into $layouts_array as layouts 209 | * @param string $class class to search for functions 210 | * @param array $layouts_array the current layouts array 211 | * @return array the layouts array with all class functions inserted into it 212 | */ 213 | function insert_the_layouts($class, $layouts_array) { 214 | foreach(get_class_methods($class) as $layout_name) { 215 | $layouts = new $class(); 216 | if($layout_name != '__construct') { 217 | $layouts_array[] = $layouts->$layout_name(); 218 | } 219 | } 220 | return $layouts_array; 221 | } 222 | 223 | 224 | 225 | /** 226 | * Check for theme support and extending classes and enable all appropriate layouts 227 | */ 228 | function filter_layouts($layouts_array) { 229 | 230 | //Check if theme support is explicitly defined. If so, only enable layouts declared in theme support. 231 | if( current_theme_supports( 'flexible-content-blocks' ) ) { 232 | $layouts_supported = get_theme_support( 'flexible-content-blocks' ); 233 | foreach($layouts_array as $subKey => $subArray){ 234 | if(!in_array($subArray['layout']['name'], $layouts_supported[0])){ 235 | unset($layouts_array[$subKey]); 236 | } 237 | } 238 | } 239 | return $layouts_array; 240 | } 241 | 242 | 243 | 244 | /** 245 | * Sort the layouts array 246 | */ 247 | function layout_sort($array) { 248 | // Sort layouts by the 'order' element 249 | usort($array, function ($a, $b) { 250 | if ($a['order'] == $b['order']) return 0; 251 | return $a['order'] < $b['order'] ? -1 : 1; 252 | }); 253 | return $array; 254 | } 255 | 256 | 257 | 258 | /** 259 | * Add 'acffcb-blocks' shortcode 260 | * 261 | * @uses acffcb_blocks Function to build the shorcode 262 | */ 263 | 264 | function add_shortcodes() { 265 | add_shortcode( 'acffcb-blocks', array($this, 'acffcb_blocks')); 266 | } 267 | 268 | 269 | 270 | /** 271 | * Build the shortcode, call templates 272 | */ 273 | 274 | function acffcb_blocks() { 275 | ob_start(); 276 | do_action('before_blocks'); 277 | cfb_template( 'content', 'blocks' ); 278 | do_action('after_blocks'); 279 | return ob_get_clean(); 280 | } 281 | 282 | 283 | 284 | /** 285 | * Append content blocks to the WordPress the_content() 286 | * 287 | * @param string $content The original WordPress content 288 | * @return string 289 | */ 290 | public static function acffcb_add_to_content( $content ) { 291 | if(in_the_loop ()) { 292 | // Only edit the_content() if blocks have been added to this $post 293 | if(have_rows('blocks')) { 294 | $content_before = ''; 295 | $content_after = ''; 296 | $content_before = (!empty($content)) ? apply_filters('fcb_content_before', $content_before) : ''; 297 | $content_after = (!empty($content)) ? apply_filters('fcb_content_after', $content_after) : ''; 298 | $content = $content_before . $content . $content_after . '[acffcb-blocks]'; 299 | return $content; 300 | } else { 301 | // If no blocks are present, return the content unmolested 302 | return $content; 303 | } 304 | } 305 | } 306 | } 307 | -------------------------------------------------------------------------------- /lib/hex2rgb.php: -------------------------------------------------------------------------------- 1 | 1) 34 | $opacity = 1.0; 35 | $output = 'rgba('.implode(",",$rgb).','.$opacity.')'; 36 | } else { 37 | $output = 'rgb('.implode(",",$rgb).')'; 38 | } 39 | 40 | //Return rgb(a) color string 41 | return $output; 42 | } 43 | -------------------------------------------------------------------------------- /lib/jons-custom-functions.php: -------------------------------------------------------------------------------- 1 | .' . $block . '.block-with-overlay:before{background:' . $color . ';}'; 47 | if ( $overlay ) { 48 | return $css; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /lib/template-functions.php: -------------------------------------------------------------------------------- 1 | get_template_part( $slug, $load ); 13 | } 14 | 15 | 16 | 17 | /** 18 | * Set the HTML header tag (h1, h2) for block titles. Defaults to 'h2'. 19 | * This can be overridden using filters like the following: 20 | * 21 | * remove_filter( 'fcb_set_block_htag', 'block_htag_level', 10 ); 22 | * add_filter( 'set_block_htag', 'custom_htag_level', 10, 2 ); 23 | * function custom_htag_level($title, $htag) { 24 | * if($GLOBALS['fcb_rows_count'] == 0) { 25 | * $htag = 'h1'; 26 | * } else { 27 | * $htag = 'h2'; 28 | * } 29 | * return '<' . $htag . '>' . $title . ''; 30 | * } 31 | * 32 | * @param string $title The sub-field containing the title. 33 | * @param string $htag The default header tag (defaults to h2) 34 | * @return string The formatted title wrapped in the proper h-tag. 35 | */ 36 | function block_htag_level() { 37 | return 'h2'; 38 | } 39 | 40 | function build_block_title($title) { 41 | $htag = apply_filters( 'fcb_set_block_htag', null, null); 42 | return '<' . $htag . ' id="' . sanitize_title_with_dashes($title) . '">' . $title . ''; 43 | } 44 | 45 | 46 | 47 | /** 48 | * Available background colors by semantic name. These can be overridden or added to with a filter like the following: 49 | * add_filter( 'fcb_bg_colors', 'custom_bg_colors'); 50 | * function custom_bg_colors($array) { 51 | * $array['secondary'] = 'Secondary'; 52 | * return $array; 53 | * } 54 | */ 55 | function fcb_bg_colors() { 56 | $colors = array ( 57 | 'primary' => 'Primary', 58 | 'success' => 'Success', 59 | 'info' => 'Info', 60 | 'warning' => 'Warning', 61 | 'danger' => 'Danger', 62 | ); 63 | $colors = apply_filters('fcb_bg_colors', $colors); 64 | return $colors; 65 | } 66 | 67 | 68 | 69 | /** 70 | * Available button colors by semantic name. These can be overridden or added to with a filter like the following: 71 | * add_filter( 'fcb_btn_colors', 'custom_btn_colors'); 72 | * function custom_btn_colors($array) { 73 | * $array['secondary'] = 'Secondary'; 74 | * return $array; 75 | * } 76 | */ 77 | function fcb_btn_colors() { 78 | $colors = array ( 79 | 'primary' => 'Primary', 80 | 'default' => 'Default', 81 | 'success' => 'Success', 82 | 'info' => 'Info', 83 | 'warning' => 'Warning', 84 | 'danger' => 'Danger', 85 | 'link' => 'Link Only', 86 | ); 87 | $colors = apply_filters('fcb_btn_colors', $colors); 88 | return $colors; 89 | } 90 | 91 | 92 | 93 | /** 94 | * Echo the block title with applied filters 95 | * @return string The formatted title 96 | */ 97 | function the_block_title() { 98 | echo build_block_title( get_sub_field('title') ); 99 | } 100 | 101 | 102 | /** 103 | * Set a filter to change the block title output. 104 | */ 105 | add_filter( 'fcb_set_block_htag', 'block_htag_level', 10); 106 | 107 | 108 | 109 | /** 110 | * Return a attribute-friendly string based on input 111 | * @return string The formatted string 112 | */ 113 | function fcb_the_block_id($string) { 114 | echo preg_replace('/[^A-Za-z0-9]/', '', strtolower(str_replace(' ', '', $string))); 115 | } 116 | 117 | 118 | 119 | /** 120 | * Return "active" if the input is less than or equal to 0, for tabs 121 | */ 122 | function fcb_is_active($i, $classes = null) { 123 | $return = ($i < 1) ? "active" : ""; 124 | $return .= ($i < 1 && $classes) ? " " . $classes : ""; 125 | echo $return; 126 | } 127 | 128 | 129 | /** 130 | * Do background classes for any block or element that has backgroud options 131 | */ 132 | add_filter( 'fcb_set_background_classes', 'fcb_background_classes' ); 133 | function fcb_background_classes($classes) { 134 | $classes[] = (get_sub_field('background_image')) ? 'block-with-bg-image' : ''; 135 | $classes[] = (get_sub_field('background_color') == "theme") ? 'block-with-bg-color bg-' . get_sub_field('theme_color') : ''; 136 | $classes[] = (get_sub_field('background_color') == "choose") ? 'block-with-bg-color bg-choose' : ''; 137 | return($classes); 138 | } 139 | 140 | /** 141 | * Set classes for a block wrapper. These can be overridden or added to with a filter like the following: 142 | * add_filter( 'fcb_set_block_wrapper_classes', 'custom_block_wrapper_classes' ); 143 | * function custom_block_wrapper_classes($classes) { 144 | * if(is_page_template('template-landing-page.php') { 145 | * $classes[] = 'on-landing-page'; 146 | * } 147 | * return $classes; 148 | * } 149 | * 150 | * @return string string of classes 151 | */ 152 | function fcb_block_wrapper_classes() { 153 | $classes = array(); 154 | $classes[] = 'block-wrap'; 155 | $classes[] = 'block-wrap-' . get_row_layout(); 156 | $classes[] = 'block-' . $GLOBALS['fcb_rows_count']; 157 | $classes[] = (get_sub_field('title')) ? '' : 'block-no-title'; 158 | $classes[] = (get_sub_field('block_classes')); 159 | $classes = apply_filters( 'fcb_set_background_classes', $classes ); 160 | 161 | $classes = array_filter(array_map('trim', $classes)); 162 | echo trim(implode(' ', apply_filters( 'fcb_set_block_wrapper_classes', $classes ))); 163 | } 164 | 165 | 166 | /** 167 | * Set classes for a collapsibles. These can be overridden or added to with a filter like the following: 168 | * add_filter( 'fcb_set_panel_classes', 'custom_panel_classes' ); 169 | * function custom_panel_classes($classes) { 170 | * if(is_page_template('template-landing-page.php') { 171 | * $classes[] = 'on-landing-page'; 172 | * } 173 | * return $classes; 174 | * } 175 | * 176 | * @return string string of classes 177 | */ 178 | function fcb_panel_classes() { 179 | $classes = array(); 180 | $classes[] = 'panel-body'; 181 | $classes[] = (get_sub_field('type_of_media') != 'none' ) ? 'panel-with-media' : ''; 182 | $classes = apply_filters( 'fcb_set_background_classes', $classes ); 183 | 184 | $classes = array_filter(array_map('trim', $classes)); 185 | echo trim(implode(' ', apply_filters( 'fcb_set_collapsible_classes', $classes ))); 186 | } 187 | 188 | 189 | 190 | /** 191 | * Set classes for a tabs. These can be overridden or added to with a filter like the following: 192 | * add_filter( 'fcb_set_tab_classes', 'custom_tab_classes' ); 193 | * function custom_tab_classes($classes) { 194 | * if(is_page_template('template-landing-page.php') { 195 | * $classes[] = 'on-landing-page'; 196 | * } 197 | * return $classes; 198 | * } 199 | * 200 | * @return string string of classes 201 | */ 202 | function fcb_tab_classes() { 203 | $classes = array(); 204 | $classes[] = 'tab-body'; 205 | $classes[] = (get_sub_field('type_of_media') != 'none' ) ? 'tab-with-media' : ''; 206 | $classes = apply_filters( 'fcb_set_background_classes', $classes ); 207 | 208 | $classes = array_filter(array_map('trim', $classes)); 209 | echo trim(implode(' ', apply_filters( 'fcb_set_tab_classes', $classes ))); 210 | } 211 | 212 | 213 | /** 214 | * Set classes for a content. These can be overridden or added to with a filter like the following: 215 | * add_filter( 'fcb_set_content_classes', 'custom_content_classes' ); 216 | * function custom_content_classes($classes) { 217 | * if(is_page_template('template-landing-page.php') { 218 | * $classes[] = 'on-landing-page'; 219 | * } 220 | * return $classes; 221 | * } 222 | * 223 | * @return string string of classes 224 | */ 225 | function fcb_content_classes() { 226 | $classes = array(); 227 | $classes[] = 'block-the-content'; 228 | $classes[] = get_sub_field('content_classes'); 229 | 230 | $classes = array_filter(array_map('trim', $classes)); 231 | echo trim(implode(' ', apply_filters( 'fcb_set_content_classes', $classes ))); 232 | } 233 | 234 | 235 | /** 236 | * Set classes for a media. These can be overridden or added to with a filter like the following: 237 | * add_filter( 'fcb_set_media_classes', 'custom_media_classes' ); 238 | * function custom_media_classes($classes) { 239 | * if(is_page_template('template-landing-page.php') { 240 | * $classes[] = 'on-landing-page'; 241 | * } 242 | * return $classes; 243 | * } 244 | * 245 | * @return string string of classes 246 | */ 247 | function fcb_media_classes() { 248 | $classes = array(); 249 | $classes[] = 'block-addon block-figure'; 250 | $classes[] = get_sub_field('media_classes'); 251 | 252 | $classes = array_filter(array_map('trim', $classes)); 253 | echo trim(implode(' ', apply_filters( 'fcb_set_media_classes', $classes ))); 254 | } 255 | 256 | 257 | 258 | /** 259 | * Set classes for a block. These can be overridden or added to with a filter like the following: 260 | * add_filter( 'fcb_set_block_classes', 'custom_block_classes' ); 261 | * function custom_block_classes($classes) { 262 | * if(is_page_template('template-landing-page.php') { 263 | * $classes[] = 'on-landing-page'; 264 | * } 265 | * return $classes; 266 | * } 267 | * 268 | * @return string string of classes 269 | */ 270 | function fcb_block_classes() { 271 | $classes = array(); 272 | $classes[] = 'block'; 273 | $classes[] = 'block-' . get_row_layout(); 274 | 275 | $classes = array_filter(array_map('trim', $classes)); 276 | echo trim(implode(' ', apply_filters( 'fcb_set_block_classes', $classes ))); 277 | } 278 | 279 | 280 | 281 | /**** EDITED BY JON TO REMOVE BACKGROUND STYLES IF PARALLAX ENABLED*/ 282 | /** 283 | * Set styles for a block-wrapper. These can be overridden or added to with a filter like the following: 284 | * add_filter( 'set_block_wrapper_styles', 'custom_block_wrapper_styles' ); 285 | * function custom_block_wrapper_styles($styles) { 286 | * $styles[] = 'border: 1px solid green;'; 287 | * return $styles; 288 | * } 289 | * @return string string of styles 290 | */ 291 | function fcb_block_wrapper_styles() { 292 | $image = get_sub_field('background_image'); 293 | $parallax = get_sub_field('parallax_effect'); 294 | $overlay = get_sub_field('background_overlay'); 295 | if ( !$parallax ) { 296 | $styles = array(); 297 | $styles[] = (get_sub_field('background_color') == "choose" ) ? 'background-color: ' . get_sub_field('choose_color') . ';' : ''; 298 | $styles[] = ($image) ? 'background-image: url(' . $image['url'] . ');' : ''; 299 | echo trim(implode(' ', apply_filters( 'set_block_wrapper_styles', $styles ))); 300 | } elseif ( $overlay ) { 301 | $styles = array(); 302 | $styles[] = ($image) ? 'background-image: url(' . $image['url'] . ');' : ''; 303 | echo trim(implode(' ', apply_filters( 'set_block_wrapper_styles', $styles ))); 304 | } 305 | } 306 | /**** END JONS CHANGES ****/ 307 | 308 | 309 | function acfcfb_content_before($content_before) { 310 | return '
' . $content_before; 311 | } 312 | 313 | function acfcfb_content_after($content_after) { 314 | return $content_after . '
'; 315 | } 316 | 317 | 318 | ?> 319 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "acf-felxible-content", 3 | "title": "ACF Flexible Content", 4 | "description": "Adds flexible content blocks blow the_content();", 5 | "version": "1.0.0", 6 | "homepage": "https://github.com/WestCoastDigital/Flexible-Content_Builder", 7 | "repository": { 8 | "type": "git", 9 | "url": "https://github.com/WestCoastDigital/Flexible-Content_Builder" 10 | }, 11 | "author": { 12 | "name": "Jon Mather", 13 | "email": "jon@workpowermedia.com.au", 14 | "url": "https://github.com/WestCoastDigital" 15 | }, 16 | "devDependencies": { 17 | "grunt": "^0.4.5", 18 | "grunt-contrib-concat": "^0.5.1", 19 | "grunt-contrib-uglify": "^0.9.1", 20 | "grunt-sass": "^1.0.0", 21 | "autoprefixer": "^6.0.0", 22 | "grunt-postcss": "^0.6.0", 23 | "grunt-pixrem": "^0.1.0", 24 | "postcss-flexibility": "^1.0.0", 25 | "grunt-contrib-cssmin": "^0.12.3", 26 | "grunt-eslint": "^18.1.0", 27 | "grunt-jscs": "^2.8.0", 28 | "grunt-contrib-watch": "^0.6.1", 29 | "grunt-contrib-clean": "^0.6.0", 30 | "grunt-contrib-copy": "^0.8.0", 31 | "grunt-contrib-compress": "^0.13.0", 32 | "load-grunt-config": "~0.17.2", 33 | "load-grunt-tasks": "^3.3.0", 34 | "glob": "~5.0.15" 35 | }, 36 | "keywords": [] 37 | } 38 | -------------------------------------------------------------------------------- /tasks/_template.js: -------------------------------------------------------------------------------- 1 | module.exports = function (grunt) { 2 | //grunt tasks here 3 | }; -------------------------------------------------------------------------------- /tasks/build.js: -------------------------------------------------------------------------------- 1 | module.exports = function (grunt) { 2 | grunt.registerTask( 'build', ['default', 'clean', 'copy', 'compress'] ); 3 | }; -------------------------------------------------------------------------------- /tasks/css.js: -------------------------------------------------------------------------------- 1 | module.exports = function (grunt) { 2 | grunt.registerTask( 'css', ['sass', 'postcss', 'cssmin'] ); 3 | }; -------------------------------------------------------------------------------- /tasks/default.js: -------------------------------------------------------------------------------- 1 | module.exports = function (grunt) { 2 | grunt.registerTask( 'default', ['css', 'js'] ); 3 | }; -------------------------------------------------------------------------------- /tasks/js.js: -------------------------------------------------------------------------------- 1 | module.exports = function( grunt ) { 2 | grunt.registerTask( 'js', [ 'eslint', 'jscs', 'concat', 'uglify' ] ); 3 | }; 4 | -------------------------------------------------------------------------------- /tasks/options/_template.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // options go here 3 | }; -------------------------------------------------------------------------------- /tasks/options/clean.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | main: ['release/<%= pkg.version %>'] 3 | }; -------------------------------------------------------------------------------- /tasks/options/compress.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | main: { 3 | options: { 4 | mode: 'zip', 5 | archive: './release/<%= pkg.name %>.<%= pkg.version %>.zip' 6 | }, 7 | expand: true, 8 | cwd: 'release/<%= pkg.version %>/', 9 | src: ['**/*'], 10 | dest: '<%= pkg.name %>/' 11 | } 12 | }; 13 | -------------------------------------------------------------------------------- /tasks/options/concat.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | options: { 3 | stripBanners: true, 4 | banner: '/*! <%= pkg.title %> - v<%= pkg.version %>\n' + 5 | ' * <%= pkg.homepage %>\n' + 6 | ' * Copyright (c) <%= grunt.template.today("yyyy") %>;' + 7 | ' * Licensed GPL-2.0+' + 8 | ' */\n' 9 | }, 10 | main: { 11 | src: [ 12 | 'assets/js/vendor/responsiveTabs.js', 13 | 'assets/js/vendor/stellar.js', 14 | 'assets/js/vendor/slick.js', 15 | 'assets/js/vendor/modaal.js', 16 | 'assets/js/vendor/masonry.js', 17 | 'assets/js/vendor/equalHeights.js', 18 | 'assets/js/src/project.js' 19 | ], 20 | dest: 'assets/js/project.js' 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /tasks/options/copy.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // Copy the theme to a versioned release directory 3 | main: { 4 | expand: true, 5 | src: [ 6 | '**', 7 | '!**/.*', 8 | '!**/readme.md', 9 | '!node_modules/**', 10 | '!vendor/**', 11 | '!tasks/**', 12 | '!tests/**', 13 | '!release/**', 14 | '!conf/**', 15 | '!assets/css/sass/**', 16 | '!assets/css/src/**', 17 | '!assets/js/src/**', 18 | '!images/src/**', 19 | '!bootstrap.php', 20 | '!bootstrap.php.dist', 21 | '!bower.json', 22 | '!composer.json', 23 | '!composer.lock', 24 | '!Gruntfile.js', 25 | '!package.json', 26 | '!phpunit.xml', 27 | '!phpunit.xml.dist' 28 | ], 29 | dest: 'release/<%= pkg.version %>/' 30 | } 31 | }; 32 | -------------------------------------------------------------------------------- /tasks/options/cssmin.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | options: { 3 | banner: '/*! <%= pkg.title %> - v<%= pkg.version %>\n' + 4 | ' * <%=pkg.homepage %>\n' + 5 | ' * Copyright (c) <%= grunt.template.today("yyyy") %>;' + 6 | ' * Licensed GPL-2.0+' + 7 | ' */\n' 8 | }, 9 | minify: { 10 | expand: true, 11 | 12 | cwd: 'assets/css/', 13 | src: ['project.css'], 14 | 15 | dest: 'assets/css/', 16 | ext: '.min.css' 17 | } 18 | }; 19 | -------------------------------------------------------------------------------- /tasks/options/eslint.js: -------------------------------------------------------------------------------- 1 | var assetsPath = 'assets/js/', 2 | srcPath = assetsPath + 'src/', 3 | testPath = assetsPath + 'test/'; 4 | 5 | module.exports = { 6 | options: { 7 | configFile: 'conf/.eslintrc' 8 | }, 9 | target: [ 10 | srcPath + '**/*.js', 11 | testPath + '**/*.js' 12 | ] 13 | }; 14 | -------------------------------------------------------------------------------- /tasks/options/jscs.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | src: ['assets/js/src/**/*.js'], 3 | options: { 4 | config: 'conf/.jscsrc', 5 | esnext: true, 6 | verbose: true, 7 | fix: false 8 | } 9 | }; 10 | -------------------------------------------------------------------------------- /tasks/options/postcss.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | dist: { 3 | options: { 4 | map: true, 5 | processors: [ 6 | require( 'autoprefixer' )( {browsers: 'last 2 versions'} ), 7 | ] 8 | }, 9 | files: { 10 | 'assets/css/project.css': [ 'assets/css/project.css' ] 11 | } 12 | } 13 | }; 14 | -------------------------------------------------------------------------------- /tasks/options/sass.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | all: { 3 | options: { 4 | precision: 2, 5 | sourceMap: true 6 | }, 7 | files: { 8 | 'assets/css/project.css': 'assets/css/scss/project.scss' 9 | } 10 | } 11 | }; 12 | -------------------------------------------------------------------------------- /tasks/options/uglify.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | all: { 3 | files: { 4 | 'assets/js/project.min.js': ['assets/js/project.js'] 5 | }, 6 | options: { 7 | banner: '/*! <%= pkg.title %> - v<%= pkg.version %>\n' + 8 | ' * <%= pkg.homepage %>\n' + 9 | ' * Copyright (c) <%= grunt.template.today("yyyy") %>;' + 10 | ' * Licensed GPL-2.0+' + 11 | ' */\n', 12 | mangle: { 13 | except: ['jQuery'] 14 | } 15 | } 16 | } 17 | }; 18 | -------------------------------------------------------------------------------- /tasks/options/watch.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | livereload: { 3 | files: ['assets/css/*.css'], 4 | options: { 5 | livereload: true 6 | } 7 | }, 8 | css: { 9 | files: ['assets/css/scss/**/*.scss'], 10 | tasks: ['css'], 11 | options: { 12 | debounceDelay: 500 13 | } 14 | }, 15 | js: { 16 | files: ['assets/js/src/**/*.js', 'assets/js/vendor/**/*.js'], 17 | tasks: ['js'], 18 | options: { 19 | debounceDelay: 500 20 | } 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /templates/blocks/layout-base.php: -------------------------------------------------------------------------------- 1 | 9 | 10 |
style=""> 11 |
12 |
13 | 14 | 15 | 16 | 17 |
18 |
19 |
20 | -------------------------------------------------------------------------------- /templates/blocks/layout-cards.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 |
    6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 | 14 | -------------------------------------------------------------------------------- /templates/blocks/layout-collapsibles.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /templates/blocks/layout-content.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /templates/blocks/layout-content_with_media.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /templates/blocks/layout-featured_content.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /templates/blocks/layout-gallery.php: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 | -------------------------------------------------------------------------------- /templates/blocks/layout-media.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /templates/blocks/layout-post_list.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /templates/blocks/layout-slider.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /templates/blocks/layout-strap.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 |
9 | 10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /templates/blocks/layout-tabs.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /templates/blocks/parts/block-card.php: -------------------------------------------------------------------------------- 1 | 20 |
  • 21 |
    22 |
    23 | 24 |

    25 |
    26 |
    27 | 28 |
    29 | 30 |
    31 |
    32 |
    33 |
  • 34 | -------------------------------------------------------------------------------- /templates/blocks/parts/block-content.php: -------------------------------------------------------------------------------- 1 | 2 |
    3 | 4 | 5 |
    6 | 7 | -------------------------------------------------------------------------------- /templates/blocks/parts/block-cta.php: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | -------------------------------------------------------------------------------- /templates/blocks/parts/block-featured_content.php: -------------------------------------------------------------------------------- 1 | 6 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /templates/blocks/parts/block-media.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 |
    7 | 8 |
    9 | 10 | 11 | -------------------------------------------------------------------------------- /templates/blocks/parts/block-post_list.php: -------------------------------------------------------------------------------- 1 | 2 | $count, 16 | 'category' => $cat 17 | ); 18 | $posts = get_posts($args); 19 | 20 | if( $posts ): ?> 21 |
    22 |
      23 | 24 | 25 | 26 |
    • 27 |
      28 |
      29 | 30 |
      31 | 32 |
      33 | 34 |
      35 |

      36 | 37 |

      38 | 46 |
      47 |
      48 |
      49 | 50 |
      51 |
      52 |
      53 |
      54 |
    • 55 | 56 |
    57 |
    58 | 59 | 60 | -------------------------------------------------------------------------------- /templates/blocks/parts/block-slider.php: -------------------------------------------------------------------------------- 1 | 13 | 14 | 15 | 16 |
    17 | 18 | 19 | 20 |
    21 | 22 |
    23 | 24 |
    25 |

    26 | 27 |

    28 | 29 |
    30 |
    31 | 32 |
    33 | 34 | 35 | 36 |
    37 | 38 |
    39 | 40 | -------------------------------------------------------------------------------- /templates/blocks/parts/block-title.php: -------------------------------------------------------------------------------- 1 | 2 |
    3 |
    4 | 5 |
    6 |
    7 | 8 | -------------------------------------------------------------------------------- /templates/blocks/parts/collapsibles/collapsibles-content.php: -------------------------------------------------------------------------------- 1 | 2 |
    3 | 4 | 5 |
    6 | -------------------------------------------------------------------------------- /templates/blocks/parts/collapsibles/collapsibles-panels.php: -------------------------------------------------------------------------------- 1 | 6 |
    7 | 8 | 13 | 14 |
    15 |
    16 | 17 |
    18 |
    19 | 20 | 21 |
    -------------------------------------------------------------------------------- /templates/blocks/parts/collapsibles/collapsibles-title.php: -------------------------------------------------------------------------------- 1 | 2 |
    3 |
    4 |

    5 |
    6 |
    7 | 8 | -------------------------------------------------------------------------------- /templates/blocks/parts/media/media-code.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/blocks/parts/media/media-content.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /templates/blocks/parts/media/media-gallery.php: -------------------------------------------------------------------------------- 1 | '; 8 | foreach ( $image_ids as $image ) { 9 | $thumbnail = wp_get_attachment_image_src( $image, 'medium_large' ); 10 | $modal = wp_get_attachment_image_src( $image, 'large' ); 11 | echo ''; 12 | } 13 | echo '
    '; 14 | 15 | /**** END JONS CHANGES ****/ 16 | 17 | // $shortcode = '[gallery ids="' . implode(',', $image_ids) . '"]'; 18 | 19 | // echo do_shortcode( $shortcode ); 20 | 21 | ?> -------------------------------------------------------------------------------- /templates/blocks/parts/media/media-image.php: -------------------------------------------------------------------------------- 1 | 9 | 10 | <?=$alt?> 11 | 12 | 13 | 14 | 15 |
    16 | 17 | -------------------------------------------------------------------------------- /templates/blocks/parts/media/media-map.php: -------------------------------------------------------------------------------- 1 | 12 | 13 | 191 | 192 | 198 | 199 |
    200 |
    201 |
    202 | 203 | 204 | -------------------------------------------------------------------------------- /templates/blocks/parts/media/media-video.php: -------------------------------------------------------------------------------- 1 |
    2 | 3 |
    4 | -------------------------------------------------------------------------------- /templates/blocks/parts/tabs/tab-title.php: -------------------------------------------------------------------------------- 1 | 2 |
    3 |
    4 |

    5 |
    6 |
    7 | 8 | -------------------------------------------------------------------------------- /templates/blocks/parts/tabs/tabs-content.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | 4 | 5 |
    6 | 7 |
    -------------------------------------------------------------------------------- /templates/blocks/parts/tabs/tabs-panes.php: -------------------------------------------------------------------------------- 1 |
    2 | 3 | 4 |
    5 | 6 |
    7 | 8 | 9 |
    10 | -------------------------------------------------------------------------------- /templates/blocks/parts/tabs/tabs-tabs.php: -------------------------------------------------------------------------------- 1 |
    2 | 12 | 13 | 14 |
    15 |
    16 | 17 | 18 |
    19 | 20 |
    21 | 22 |
    -------------------------------------------------------------------------------- /templates/content-blocks.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 11 | 12 | 15 | 16 | 23 | 29 | -------------------------------------------------------------------------------- /wcd-acf-page-builder.php: -------------------------------------------------------------------------------- 1 | fcb_create_blocks(); 54 | 55 | // Enable layouts 56 | 57 | // Append blocks to content 58 | add_filter( 'the_content', array( 'MWD\ACFFCB\CreateBlocks', 'acffcb_add_to_content' ) ); 59 | 60 | }); 61 | --------------------------------------------------------------------------------