├── .gitattributes ├── LICENSE ├── README.md ├── assets ├── css │ └── mtm-admin-style.css ├── js │ ├── back-to-top.js │ ├── min │ │ ├── acf-admin-mtm-min.js │ │ ├── mtm-tabs-min.js │ │ └── smooth-scroll-mtm-min.js │ ├── mtm-tabs.js │ └── smooth-scroll-mtm.js └── scss │ ├── _components.editor.scss │ ├── _components.panels.scss │ ├── _objects.layout.scss │ ├── _settings.scss │ ├── css │ ├── mtm-admin-style.css │ └── pinkgrid.css │ ├── mtm-admin-style.scss │ ├── mtm-style.scss │ └── pink-grid │ └── pinkgrid.scss ├── lib ├── class-gamajo-template-loader.php ├── class-mtm-block-template.php ├── class-mtm-field-definitions.php ├── class-mtm-field-groups.php ├── class-mtm-template-loader.php ├── class-tgm-plugin-activation.php ├── mtm-acf-check-functions.php ├── mtm-acf-fields.php ├── mtm-acf-plugin-requirements.php ├── mtm-acf-plugin-templates.php ├── mtm-config.php └── mtm-helpers.php ├── mtm-block-components.php ├── mtm-style.css ├── mtm-style.css.map ├── readme.html └── templates ├── mtm-block-call-to-action.php ├── mtm-block-featured-content.php ├── mtm-block-gallery.php ├── mtm-block-grid-logic.php ├── mtm-block-hero-image.php ├── mtm-block-hero-media.php ├── mtm-block-jump-button.php ├── mtm-block-list-logic.php ├── mtm-block-logos.php ├── mtm-block-post-object.php ├── mtm-block-slider.php ├── mtm-block-tabs.php ├── mtm-block-text.php ├── mtm-block-widget-area.php ├── mtm-content-contributors.php ├── mtm-content-grid-manual.php ├── mtm-content-grid-view.php ├── mtm-content-hero-video.php ├── mtm-content-home-buttons.php ├── mtm-content-home-feature-manual.php ├── mtm-content-home-feature-select.php ├── mtm-content-list-module.php ├── mtm-content-list-view.php ├── mtm-wrapper-buttons.php ├── mtm-wrapper-call-to-action.php ├── mtm-wrapper-content-callout.php ├── mtm-wrapper-dual-content.php ├── mtm-wrapper-featured-content.php ├── mtm-wrapper-gallery.php ├── mtm-wrapper-grid-manual.php ├── mtm-wrapper-grid-post.php ├── mtm-wrapper-hero-image.php ├── mtm-wrapper-hero-media.php ├── mtm-wrapper-list-manual.php ├── mtm-wrapper-list-post.php ├── mtm-wrapper-logos.php ├── mtm-wrapper-single-content.php ├── mtm-wrapper-slider.php ├── mtm-wrapper-tabs.php ├── mtm-wrapper-test.php ├── mtm-wrapper-widget-area.php ├── template-block-content.php └── template-single-scroll.php /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ACF Block Components for WordPress 2 | 3 | ACF Blocks plugin for WordPress for displaying custom content within pages and posts. **Requires [Advanced Custom Fields Pro](http://advancedcustomfields.com/pro), [ACF Term and Taxonomy Chooser](https://github.com/marktimemedia/acf-term-and-taxonomy-chooser), [ACF Post Type Selector](https://github.com/TimPerry/acf-post-type-selector) and [ACF Widget Area Field](https://wordpress.org/plugins/advanced-custom-fields-widget-area-field/)**. 4 | 5 | Recommended for use with [ACF Options Page](https://github.com/marktimemedia/acf-theme-settings) and [Pink Spring Theme](https://github.com/marktimemedia/pink-spring) 6 | 7 | Works with most standard WordPress themes. 8 | 9 | ### Custom Blocks (Flexible Fields) 10 | 1. Single Column Content with heading 11 | 2. Dual Column Content with heading 12 | 3. Content with Callout and heading 13 | 4. Hero Image with text and call to action buttons 14 | 5. Video/Embedded Media with text and call to action buttons 15 | 6. Slider with text and links 16 | 7. Feature Boxes (post content, latest post, or manual) 17 | 8. Call to Action with heading, subheading, buttons 18 | 8. Logo Feature with image/link repeater 19 | 9. Widget Area 20 | 10. Post List 21 | 11. Post Grid 22 | 12. Manual List 23 | 13. Manual Grid 24 | 14. Tabs 25 | 15. Gallery (using WordPress Gallery) 26 | 16. Multi-Buttons 27 | 28 | ### Page Templates (block templates coming soon, once WordPress supports them) 29 | 1. Custom Block Template (adds ability to hide or show the main page title) 30 | 2. Single Scroll Template (adds ability to output other pages below the main page, also background image) 31 | 32 | ### Vague Description of How To Use 33 | 1. Install and activate the plugin 34 | 2. Build posts and pages using Custom Blocks 35 | 3. Supports regular, wide, and full alignment 36 | 4. Several blocks have custom background colors 37 | 4. Can filter custom ACF colors to match your theme by targeting `mtm_block_colors_filter` 38 | 39 | 40 | ### Vague Description of How To Theme 41 | 1. Create a folder called `mtm-templates` in the root of your theme or child theme 42 | 2. Copy any of the `block` or `content` template parts in the plugin `templates` folder into your `mtm-templates` folder, and modify/style them at will. The plugin will automatically override them. 43 | 3. To call any of the custom template parts from another part of your theme, use the `mtm_get_block_part()` function 44 | -------------------------------------------------------------------------------- /assets/css/mtm-admin-style.css: -------------------------------------------------------------------------------- 1 | .editor-styles-wrapper .acf-input ul { 2 | margin: inherit; 3 | padding: inherit; } 4 | .editor-styles-wrapper .acf-input .acf-radio-list li { 5 | line-height: 33px; } 6 | .editor-styles-wrapper .acf-input .acf-radio-list li label { 7 | padding: .5em; 8 | border: 1px solid #ddd; 9 | visibility: hidden; } 10 | .editor-styles-wrapper .acf-input .acf-radio-list li label:hover, .editor-styles-wrapper .acf-input .acf-radio-list li label:focus { 11 | background-color: #ddd; } 12 | .editor-styles-wrapper .acf-input .acf-radio-list li label:first-of-type { 13 | visibility: visible; } 14 | .editor-styles-wrapper .acf-input .acf-radio-list li .selected { 15 | background-color: #ddd; } 16 | .editor-styles-wrapper .acf-input .acf-radio-list li input[type="radio"] { 17 | display: inline-block; 18 | visibility: visible; } 19 | .editor-styles-wrapper .acf-input .acf-radio-list li input[type="text"] { 20 | display: inline-block !important; } 21 | .editor-styles-wrapper .acf-input .mtm-tabs--content.current { 22 | display: none !important; } 23 | .editor-styles-wrapper .acf-input .mtm-tabs--content.current#tab-1 { 24 | display: inherit !important; } 25 | .editor-styles-wrapper .acf-input .iris-picker { 26 | height: auto !important; 27 | overflow: hidden; 28 | padding: 20px 20px 10px !important; } 29 | .editor-styles-wrapper .acf-input .iris-border .iris-palette-container { 30 | bottom: unset; 31 | left: unset; 32 | overflow: hidden; 33 | position: relative; 34 | top: unset; } 35 | .editor-styles-wrapper .acf-input .iris-picker .iris-palette { 36 | height: 40px !important; 37 | margin-bottom: 5%; 38 | margin-left: 0 !important; 39 | margin-right: 10px; 40 | width: calc(25% - 10px) !important; } 41 | .editor-styles-wrapper .acf-input .iris-picker .iris-palette:nth-child(4n) { 42 | margin-right: 0; } 43 | .editor-styles-wrapper .acf-input .iris-picker-inner { 44 | display: none; } 45 | .editor-styles-wrapper figure { 46 | margin: 0; } 47 | .editor-styles-wrapper ul.slides { 48 | list-style: none; 49 | margin-left: auto; 50 | padding: 0; } 51 | .editor-styles-wrapper ul.slides li { 52 | display: none; } 53 | .editor-styles-wrapper ul.slides li:first-of-type { 54 | display: block; } 55 | -------------------------------------------------------------------------------- /assets/js/back-to-top.js: -------------------------------------------------------------------------------- 1 | /* 2 | Name: Back To Top 3 | Author: Marktime Media 4 | Author URI: http://marktimemedia.com 5 | Version: 0.1 6 | License: GPLv2 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License version 2, 10 | as published by the Free Software Foundation. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 15 | GNU General Public License for more details. 16 | 17 | The license for this software can likely be found here: 18 | http://www.gnu.org/licenses/gpl-2.0.html 19 | */ 20 | 21 | (function($) { 22 | 23 | $(document).ready(function() { 24 | 25 | var duration = 300; 26 | 27 | $('.back-to-top').on( 'click', function(e) { 28 | 29 | e.preventDefault(); 30 | 31 | $('html, body').animate({scrollTop: 0}, duration); 32 | 33 | return false; 34 | 35 | }); 36 | 37 | }); 38 | 39 | })( jQuery ); 40 | -------------------------------------------------------------------------------- /assets/js/min/acf-admin-mtm-min.js: -------------------------------------------------------------------------------- 1 | !function($){return"yes"==$("input[value='News']:checked").val()?($(".mtm-homepage-type-field").css("background-color","red"),console.log("worked")):($(".mtm-homepage-type-field").css("background-color","green"),console.log("other")),!1}(jQuery); -------------------------------------------------------------------------------- /assets/js/min/mtm-tabs-min.js: -------------------------------------------------------------------------------- 1 | !function($){$(document).ready(function(){$('li[data-tab!="tab-1"]').removeClass("current"),$("div.mtm-tabs--content:not(#tab-1)").removeClass("current"),$("ul.mtm-tabs--title-container li").click(function(){var t=$(this).attr("data-tab");$("ul.mtm-tabs--title-container li").removeClass("current"),$(".mtm-tabs--content").removeClass("current"),$(this).addClass("current"),$("#"+t).addClass("current")})})}(jQuery); -------------------------------------------------------------------------------- /assets/js/min/smooth-scroll-mtm-min.js: -------------------------------------------------------------------------------- 1 | !function($){$('a[href*="#"]:not([href="#"])').on("click",function(){if($("html").hasClass("open-the-menu"))$("html").removeClass("open-the-menu");else if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var e=$(this.hash);if(e=e.length?e:$("[name="+this.hash.slice(1)+"]"),e.length)return $("html,body").animate({scrollTop:e.offset().top},1e3),!1}})}(jQuery); -------------------------------------------------------------------------------- /assets/js/mtm-tabs.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 3 | $(document).ready(function(){ 4 | 5 | // make sure all content shows by default if JS not enabled 6 | $('.mtm-tabs--title[data-tab!="tab-1"]').removeClass('current'); 7 | $('div.mtm-tabs--content:not(#tab-1)').removeClass('current'); 8 | 9 | $('.mtm-tabs--title').click(function(){ 10 | var tab_id = $(this).attr('data-tab'); 11 | 12 | $('.mtm-tabs--title').removeClass('current'); 13 | $('.mtm-tabs--content').removeClass('current'); 14 | 15 | $('.mtm-tabs--title[data-tab="'+tab_id+'"]').addClass('current'); 16 | $("#"+tab_id).addClass('current'); 17 | }); 18 | 19 | }); 20 | 21 | })( jQuery ); -------------------------------------------------------------------------------- /assets/js/smooth-scroll-mtm.js: -------------------------------------------------------------------------------- 1 | (function( $ ) { 2 | // Smooth Scroll to anchor 3 | // From https://css-tricks.com/snippets/jquery/smooth-scrolling/ 4 | // Modified to work with mobile menu 5 | 6 | $('nav a[href*="#"]:not([href="#"])').on('click', function() { 7 | 8 | if( $('html').hasClass('open-the-menu') ) { 9 | 10 | $('html').removeClass('open-the-menu'); 11 | 12 | } else { 13 | 14 | if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { 15 | 16 | var target = $(this.hash); 17 | target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); 18 | 19 | if (target.length) { 20 | 21 | $('html,body').animate({ 22 | scrollTop: target.offset().top 23 | }, 1000); 24 | return false; 25 | 26 | } 27 | } 28 | 29 | } 30 | 31 | }); 32 | 33 | })( jQuery ); -------------------------------------------------------------------------------- /assets/scss/_components.editor.scss: -------------------------------------------------------------------------------- 1 | .editor-styles-wrapper { 2 | .acf-input { 3 | ul { 4 | margin: inherit; 5 | padding: inherit; 6 | } 7 | 8 | .acf-radio-list { 9 | li { 10 | line-height: 33px; 11 | label { 12 | padding: .5em; 13 | border: 1px solid #ddd; 14 | visibility: hidden; 15 | 16 | &:hover, &:focus { 17 | background-color: #ddd; 18 | } 19 | 20 | &:first-of-type { 21 | visibility: visible; 22 | } 23 | } 24 | 25 | .selected { 26 | background-color: #ddd; 27 | } 28 | 29 | input[type="radio"] { 30 | display: inline-block; 31 | visibility: visible; 32 | } 33 | 34 | input[type="text"] { 35 | display: inline-block !important; 36 | } 37 | } 38 | } 39 | 40 | .mtm-tabs--content.current { 41 | display: none !important; 42 | 43 | &#tab-1 { 44 | display: inherit !important; 45 | } 46 | } 47 | 48 | .iris-picker { 49 | height: auto !important; 50 | overflow: hidden; 51 | padding: 20px 20px 10px !important; 52 | } 53 | 54 | .iris-border .iris-palette-container { 55 | bottom: unset; 56 | left: unset; 57 | overflow: hidden; 58 | position: relative; 59 | top: unset; 60 | } 61 | 62 | .iris-picker .iris-palette { 63 | height: 40px !important; 64 | margin-bottom: 5%; 65 | margin-left: 0 !important; 66 | margin-right: 10px; 67 | width: calc(25% - 10px) !important; 68 | } 69 | 70 | .iris-picker .iris-palette:nth-child(4n) { 71 | margin-right: 0; 72 | } 73 | 74 | 75 | .iris-picker-inner { 76 | display: none; 77 | } 78 | } 79 | 80 | figure { 81 | margin: 0; 82 | } 83 | 84 | ul.slides { 85 | list-style: none; 86 | margin-left: auto; 87 | padding: 0; 88 | li { 89 | display: none; 90 | &:first-of-type { 91 | display: block; 92 | } 93 | } 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /assets/scss/_components.panels.scss: -------------------------------------------------------------------------------- 1 | /* General Panel Rules */ 2 | 3 | .mtm-component { 4 | margin-top: -2rem; 5 | padding-top: 2rem; 6 | position: relative; 7 | 8 | .content--page { 9 | padding: $sm-pad; 10 | } 11 | 12 | img { 13 | max-width: 100%; 14 | height: auto; 15 | } 16 | 17 | } 18 | .mtm-component--main-full { 19 | overflow: auto; 20 | position: relative; 21 | } 22 | 23 | .mtm-component--home { 24 | background-size: cover; 25 | margin-top: 0; 26 | padding-top: 0; 27 | text-align: center; 28 | } 29 | 30 | .mtm-component--term-list { 31 | padding: 1em 0; 32 | margin: 0; 33 | 34 | li { 35 | list-style: none; 36 | display: inline-block; 37 | } 38 | 39 | a { 40 | padding-right: .5em; 41 | } 42 | } 43 | 44 | 45 | 46 | /* Module Rules */ 47 | 48 | .mtm-module { 49 | padding-bottom: $sm-pad; 50 | padding-top: $sm-pad; 51 | overflow: auto; // to account for floats inside the modules 52 | } 53 | .has-no-background-color .mtm-module-title { 54 | margin-top: 1em; 55 | } 56 | 57 | .mtm-module--hero-title { 58 | margin: .75em auto; 59 | } 60 | 61 | .mtm-module--hero-subtitle { 62 | margin-bottom: .75em; 63 | } 64 | 65 | // Hero Rules 66 | .mtm-hero-image, .wp-block-cover { 67 | padding: 2em; 68 | background-size:cover; 69 | background-position: center center; 70 | text-align: center; 71 | } 72 | 73 | .mtm-hero-image-title, .mtm-hero-image-subtitle p, .mtm-module--slider-title, .mtm-module--slider-subtitle p { 74 | color: #fff; 75 | } 76 | 77 | .mtm-module--slider-slide { 78 | background-size:cover; 79 | background-position: center center; 80 | text-align: center; 81 | 82 | & > p, a > p { // gutenberg issues 83 | display: none; 84 | } 85 | } 86 | .mtm-module--slider-link { 87 | display: block; 88 | padding: 2em; 89 | } 90 | 91 | .mtm-module--slider-content { 92 | padding: 0 2em; 93 | } 94 | 95 | .flex-control-nav { 96 | z-index: 2; 97 | } 98 | // Logo Rules 99 | .mtm_module_logo_showcase { 100 | 101 | } 102 | .mtm-logo-grid { 103 | vertical-align: middle; 104 | text-align: center; 105 | } 106 | 107 | // Single Content 108 | .mtm_module_single_content_area { 109 | .mtm-module--content-heading, .mtm-module--content-primary { 110 | margin-left: auto; 111 | margin-right: auto; 112 | max-width: $max; 113 | } 114 | } 115 | 116 | // Content Callout 117 | .mtm-module--content-secondary-image { 118 | padding: $sm-pad; 119 | 120 | .mtm-module--content-secondary-wrapper { 121 | background-color: rgba(0,0,0,.5); 122 | color: #fff; 123 | padding: $sm-pad; 124 | } 125 | } 126 | 127 | // CTA 128 | .mtm_module_call_to_action { 129 | padding: $sm-pad; 130 | background: #eee; 131 | overflow: auto; 132 | 133 | .alignright, .alignleft, .aligncenter { 134 | margin-bottom: 0; 135 | } 136 | } 137 | 138 | // Gallery 139 | .mtm-module--gallery { 140 | display: flex; 141 | flex-flow: row wrap; 142 | list-style: none; 143 | margin: 1em 0; 144 | padding: 0; 145 | 146 | & > p, a > p { // gutenberg issues 147 | display: none; 148 | } 149 | 150 | // grid for supported browsers 151 | @supports(display: grid) { 152 | display: grid; 153 | grid-auto-rows: minmax(20vh, $gallery-height); 154 | grid-gap: 0.2em; 155 | grid-template-columns: repeat(auto-fill, minmax($gallery-width, 1fr)); 156 | } 157 | 158 | a { 159 | // flex fallback 160 | flex: 1 0 auto; 161 | min-height: $gallery-height; 162 | min-width: $gallery-width; 163 | margin: ($gallery-gutter/2); 164 | 165 | @supports(display: grid) { 166 | margin: 0; 167 | } 168 | } 169 | 170 | } 171 | .mtm-module--gallery-image { 172 | height: 100%; 173 | line-height: 1; 174 | margin: 0; 175 | overflow: hidden; 176 | position: relative; 177 | width: 100%; 178 | 179 | figure { 180 | background-size: cover; 181 | background-position: center center; 182 | height: 100%; 183 | -webkit-transition:all .5s; 184 | transition:all .5s; 185 | width: 100%; 186 | 187 | &:hover, &:focus { 188 | transform: scale(1.2); 189 | } 190 | } 191 | } 192 | 193 | .mtm-module--gallery-caption { 194 | background-color: rgba(0,0,0,.3); 195 | bottom: 0; 196 | color: #fff; 197 | margin: 0; 198 | padding: .25em; 199 | position: absolute; 200 | width: 100%; 201 | } 202 | 203 | 204 | /* Home Rules */ 205 | 206 | .mtm-home-news--content, .mtm-home-featured--story { 207 | text-align:left; 208 | } 209 | 210 | .mtm-home-featured--single, .mtm-home-topic--single { 211 | margin-bottom: 2%; 212 | } 213 | 214 | .mtm-home-sidebar--widget { 215 | display: none; 216 | } 217 | 218 | /* Button Rules */ 219 | .mtm-home-buttons { 220 | margin-bottom: 1em; 221 | 222 | &.alignleft { 223 | margin-left: -.5em; 224 | } 225 | 226 | &.alignright { 227 | margin-right: -.5em; 228 | } 229 | } 230 | 231 | .button.mtm-button { 232 | display:inline-block; 233 | margin: .5em; 234 | } 235 | 236 | .post-edit-link { 237 | font-size: .7em; 238 | } 239 | 240 | /* List Rules */ 241 | 242 | .mtm-list--single { 243 | margin: 1em 0; 244 | } 245 | 246 | .mtm-list--image { 247 | width: 100%; 248 | } 249 | 250 | .mtm-list--post-content { 251 | width: 100%; 252 | } 253 | 254 | 255 | /* Tab Rules */ 256 | 257 | .mtm-tabs--wrapper { 258 | border-bottom: 1px solid #eee; 259 | clear: both; 260 | margin: 1em 0; 261 | 262 | .mtm-tabs--title-container { 263 | display: none; 264 | list-style: none; // for old tabs 265 | margin: 0; 266 | padding: 0; 267 | } 268 | button.mtm-tabs--title, .mtm-tabs--title { 269 | background-color: transparent; 270 | border: 0; 271 | color: #aaa; 272 | cursor: pointer; // for old tabs 273 | padding: .2em 0; 274 | 275 | &:hover, &:focus { 276 | background-color: transparent; 277 | color: #000; 278 | } 279 | 280 | &.current { 281 | color: #000; 282 | font-weight: bold; 283 | } 284 | } 285 | 286 | button.mtm-tabs--title-accordion, .mtm-tabs--title-accordion { 287 | background-color: transparent; 288 | border: 0; 289 | border-top: 1px solid #eee; 290 | color: #aaa; 291 | display: block; 292 | width: 100%; 293 | 294 | &:hover, &:focus { 295 | background-color: transparent; 296 | color: #000; 297 | } 298 | } 299 | 300 | .mtm-tabs--content { 301 | clear: both; 302 | display: none; 303 | overflow: auto; 304 | padding: .5em 0; 305 | 306 | &.current { 307 | display:inherit; 308 | } 309 | } 310 | } 311 | 312 | 313 | 314 | 315 | /* MEDIA QUERIES */ 316 | 317 | @media only screen and ( min-width: $sm-bp ) and ( max-width: $med-bp ) { 318 | 319 | .mtm-list--image { 320 | @include pinkgrid( $align: top, $totalcols: $defaultcols, $colspan: 6, $padtop: 0, $padside: $defaultpad ); 321 | @include pinkrow( $rowitems: 2, $before: 0, $after: 0 ) 322 | } 323 | 324 | 325 | } 326 | 327 | @media only screen and ( min-width: $med-bp ) and ( max-width: $lg-bp ) { 328 | 329 | .mtm-list--image { 330 | @include pinkgrid( $align: top, $totalcols: $defaultcols, $colspan: 5, $padtop: 0, $padside: $defaultpad ); 331 | @include pinkrow( $rowitems: 2, $before: 0, $after: 0 ) 332 | } 333 | 334 | .mtm-list--post-content { 335 | @include pinkgrid( $align: top, $totalcols: $defaultcols, $colspan: 7, $padtop: 0, $padside: 2% ); 336 | @include pinkrow( $rowitems: 2, $before: 0, $after: 0 ) 337 | } 338 | 339 | .mtm-home-news--content { 340 | @include pinkgrid( $colspan: 6 ); 341 | @include pinkrow( $rowitems: 2 ); 342 | 343 | &.full { 344 | @include pinkgrid( $colspan: 12 ); 345 | @include pinkrow( $rowitems: 1 ); 346 | 347 | .mtm-home-sidebar--widget { 348 | @include pinkgrid( $colspan: 4 ); 349 | @include pinkrow( $rowitems: 3 ); 350 | margin: 1.5em 0; 351 | } 352 | } 353 | } 354 | 355 | .mtm-home-featured--story { 356 | @include pinkgrid( $colspan: 6 ); 357 | @include pinkrow( $rowitems: 2 ); 358 | } 359 | 360 | } 361 | 362 | // SMALL 363 | @media only screen and (min-width: $sm-bp) { 364 | 365 | } 366 | 367 | // MEDIUM 368 | @media only screen and ( min-width: $med-bp ) { 369 | .mtm-component .content--page { 370 | padding: $big-pad; 371 | } 372 | 373 | .mtm-home-sidebar--widget { 374 | display: block; 375 | 376 | &:first-of-type { 377 | margin-top: 1.5em; 378 | } 379 | } 380 | 381 | .mtm_module_dual_content_area { 382 | .mtm-module--content-primary, .mtm-module--content-secondary { 383 | @include pinkgrid( $align: top, $totalcols: $defaultcols, $colspan: 6, $padtop: 0, $padside: 5% ); 384 | @include pinkrow( $rowitems: 2, $before: 0, $after: 0 ) 385 | } 386 | } 387 | 388 | .mtm_module_content_callout { 389 | .mtm-module--content-primary { 390 | @include pinkgrid( $align: top, $totalcols: $defaultcols, $colspan: 8, $padtop: 0, $padside: 5% ); 391 | @include pinkrow( $rowitems: 2, $before: 0, $after: 0 ) 392 | } 393 | 394 | .mtm-module--content-secondary { 395 | @include pinkgrid( $align: top, $totalcols: $defaultcols, $colspan: 4, $padtop: 0, $padside: 5% ); 396 | @include pinkrow( $rowitems: 2, $before: 0, $after: 0 ) 397 | } 398 | } 399 | 400 | .mtm-tabs--wrapper { 401 | border-bottom-width: 0; 402 | 403 | .mtm-tabs--title-container { 404 | display: block; 405 | } 406 | button.mtm-tabs--title, .mtm-tabs--title { 407 | padding: .5em 0; 408 | margin-right:1em; 409 | display:inline-block; 410 | } 411 | button.mtm-tabs--title-accordion, .mtm-tabs--title-accordion { 412 | display: none; 413 | } 414 | .mtm-tabs--content { 415 | border-top: 1px solid #eee; 416 | } 417 | } 418 | 419 | .mtm_module_call_to_action { 420 | padding-top: 2em; 421 | padding-bottom: 2em; 422 | } 423 | 424 | .mtm-module--cta-subheading{ 425 | display: inline-block; 426 | margin-right: 1em; 427 | line-height: 1.4; 428 | margin-bottom: 0.5em; 429 | } 430 | 431 | .mtm-module--cta-buttons { 432 | display: inline-block; 433 | } 434 | } 435 | 436 | // LARGE 437 | @media only screen and ( min-width: $lg-bp ) { 438 | 439 | .mtm-list--image { 440 | @include pinkgrid( $align: top, $totalcols: $defaultcols, $colspan: 3, $padtop: 0, $padside: $defaultpad ); 441 | @include pinkrow( $rowitems: 2, $before: 0, $after: 0 ) 442 | } 443 | 444 | .mtm-list--post-content { 445 | @include pinkgrid( $align: top, $totalcols: $defaultcols, $colspan: 9, $padtop: 0, $padside: $defaultpad ); 446 | @include pinkrow( $rowitems: 2, $before: 0, $after: 0 ) 447 | } 448 | 449 | .mtm-home-news--content { 450 | @include pinkgrid( $colspan: 4 ); 451 | @include pinkrow( $rowitems: 2 ); 452 | 453 | &.full { 454 | @include pinkgrid( $colspan: 12 ); 455 | @include pinkrow( $rowitems: 1 ); 456 | 457 | .mtm-home-sidebar--widget { 458 | @include pinkgrid( $colspan: 4 ); 459 | @include pinkrow( $rowitems: 3 ); 460 | margin: 1.5em 0; 461 | } 462 | } 463 | } 464 | 465 | .mtm-home-featured--story { 466 | @include pinkgrid( $colspan: 8 ); 467 | @include pinkrow( $rowitems: 2 ); 468 | } 469 | } 470 | -------------------------------------------------------------------------------- /assets/scss/_objects.layout.scss: -------------------------------------------------------------------------------- 1 | /* Some General Resets */ 2 | 3 | *, *:before, *:after { 4 | box-sizing: border-box; 5 | } 6 | 7 | /* General Panel Rules */ 8 | .mtm-per-row-2 { 9 | @include pinkmagic( $rowitems: 2, $padside: 4% ); 10 | } 11 | 12 | .mtm-per-row-3 { 13 | @include pinkmagic( $rowitems: 3, $padside: 4% ); 14 | } 15 | 16 | .mtm-per-row-4 { 17 | @include pinkmagic( $rowitems: 4, $padside: 4% ); 18 | } 19 | 20 | .mtm-per-row-5 { 21 | @include pinkmagic( $rowitems: 5, $padside: 4% ); 22 | } 23 | 24 | .mtm-per-row-6 { 25 | @include pinkmagic( $rowitems: 6, $padside: 4% ); 26 | } 27 | 28 | .mtm-per-row-7 { 29 | @include pinkmagic( $rowitems: 7, $padside: 3% ); 30 | } 31 | 32 | .mtm-per-row-8 { 33 | @include pinkmagic( $rowitems: 8, $padside: 3% ); 34 | } 35 | 36 | .mtm-per-row-9 { 37 | @include pinkmagic( $rowitems: 9, $padside: 3% ); 38 | } 39 | 40 | .mtm-per-row-10 { 41 | @include pinkmagic( $rowitems: 10, $padside: 3% ); 42 | } 43 | 44 | .mtm-per-row-11 { 45 | @include pinkmagic( $rowitems: 11, $padside: 3% ); 46 | } 47 | 48 | .mtm-per-row-12 { 49 | @include pinkmagic( $rowitems: 12, $padside: 3% ); 50 | } 51 | 52 | /* Layout General */ 53 | .alignright, 54 | .alignleft, 55 | .aligncenter { 56 | display: block; 57 | max-width: 100%; 58 | } 59 | 60 | .content--inner { 61 | margin: 0 auto; 62 | } 63 | 64 | .alignfull, .alignwide { 65 | .content--inner { 66 | padding-left: 2rem; // for a boxed width background with no sidebar 67 | padding-right: 2rem; // for a boxed width background with no sidebar 68 | } 69 | } 70 | 71 | /* Buttons General */ 72 | .button.button-xs { 73 | font-size: .75em !important; 74 | line-height: .75em !important; 75 | padding: .4em .75em !important; 76 | } 77 | 78 | .button.button-sm { 79 | font-size: .9em !important; 80 | line-height: .9em !important; 81 | padding: .375em .75em !important; 82 | } 83 | 84 | .button.button-med { 85 | font-size: 1em !important; 86 | line-height: 1em !important; 87 | padding: .375em, .75em !important; 88 | } 89 | 90 | .button.button-lg { 91 | font-size: 1.4em !important; 92 | line-height: 1em !important; 93 | padding: .5em, 1em !important; 94 | } 95 | 96 | .button.button-xl { 97 | font-size: 1.6em !important; 98 | line-height: 1em !important; 99 | padding: .875em 1.75em !important; 100 | } 101 | 102 | 103 | // SMALL 104 | @media only screen and (min-width: $sm-bp) { 105 | .alignright { 106 | float: right !important; 107 | margin-left: 1rem !important; 108 | //max-width: 50%; 109 | } 110 | 111 | .alignleft { 112 | float: left !important; 113 | margin-right: 1rem !important; 114 | //max-width: 50%; 115 | } 116 | 117 | .aligncenter { 118 | display: block; 119 | margin-left: auto; 120 | margin-right: auto; 121 | clear: both; 122 | text-align: center; 123 | } 124 | } 125 | 126 | // Medium 127 | @media only screen and ( min-width: $med-bp ) { 128 | 129 | .alignfull, .alignwide { 130 | .content--inner { 131 | padding-left: $big-pad; // for a boxed width background with no sidebar 132 | padding-right: $big-pad; // for a boxed width background with no sidebar 133 | } 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /assets/scss/_settings.scss: -------------------------------------------------------------------------------- 1 | // Breakpoints 2 | $tiny-bp: 19em !default; // 19em = 304px 3 | $sm-bp: 30em !default; // 30em = 480px 4 | $med-bp: 45em !default; // 45em = 720px 5 | $lg-bp: 61em !default; // 61em = 976px 6 | $xl-bp: 75em !default; // 75em = 1200px 7 | 8 | $max: 80em !default; 9 | 10 | // Default Paddings 11 | $sm-pad: 1rem !default; 12 | $big-pad: 3rem !default; 13 | 14 | // Gallery 15 | $gallery-height: 250px !default; 16 | $gallery-width: 250px !default; 17 | $gallery-gutter: 0.2em !default; 18 | -------------------------------------------------------------------------------- /assets/scss/css/mtm-admin-style.css: -------------------------------------------------------------------------------- 1 | .acf-repeater.-row .mce-edit-area iframe, .acf-repeater.-block .mce-edit-area iframe, [data-layout="mtm_module_hero_image"] .mce-edit-area iframe, [data-layout="mtm_module_call_to_action"] .mce-edit-area iframe { 2 | min-height: 150px !important; 3 | height: 150px !important; } 4 | .acf-repeater.-row .acf-tab-group, .acf-repeater.-block .acf-tab-group, [data-layout="mtm_module_hero_image"] .acf-tab-group, [data-layout="mtm_module_call_to_action"] .acf-tab-group { 5 | height: 0; 6 | overflow: hidden; 7 | padding-top: 0; 8 | border-bottom: none; } 9 | .acf-repeater.-row .acf-field-wysiwyg, .acf-repeater.-row .acf-field-file, .acf-repeater.-row .acf-field-image, .acf-repeater.-block .acf-field-wysiwyg, .acf-repeater.-block .acf-field-file, .acf-repeater.-block .acf-field-image, [data-layout="mtm_module_hero_image"] .acf-field-wysiwyg, [data-layout="mtm_module_hero_image"] .acf-field-file, [data-layout="mtm_module_hero_image"] .acf-field-image, [data-layout="mtm_module_call_to_action"] .acf-field-wysiwyg, [data-layout="mtm_module_call_to_action"] .acf-field-file, [data-layout="mtm_module_call_to_action"] .acf-field-image { 10 | min-height: 200px !important; } 11 | .acf-repeater.-row .acf-field-text, .acf-repeater.-row .acf-field-page-link, .acf-repeater.-block .acf-field-text, .acf-repeater.-block .acf-field-page-link, [data-layout="mtm_module_hero_image"] .acf-field-text, [data-layout="mtm_module_hero_image"] .acf-field-page-link, [data-layout="mtm_module_call_to_action"] .acf-field-text, [data-layout="mtm_module_call_to_action"] .acf-field-page-link { 12 | min-height: 100px !important; } 13 | 14 | .acf-repeater.-row > table > tbody > tr > td, .acf-repeater.-block > table > tbody > tr > td { 15 | border-bottom-width: 5px; } 16 | 17 | .acf-flexible-content .layout .acf-fc-layout-handle { 18 | font-size: 1.2em; 19 | font-weight: bold; } 20 | 21 | ul.acf-bl.list { 22 | height: 350px !important; } 23 | -------------------------------------------------------------------------------- /assets/scss/css/pinkgrid.css: -------------------------------------------------------------------------------- 1 | * { 2 | box-sizing: border-box; } 3 | -------------------------------------------------------------------------------- /assets/scss/mtm-admin-style.scss: -------------------------------------------------------------------------------- 1 | @import "components.editor"; 2 | -------------------------------------------------------------------------------- /assets/scss/mtm-style.scss: -------------------------------------------------------------------------------- 1 | /* 01. SETTINGS */ 2 | @import "settings"; 3 | 4 | /* 02. TOOLS */ 5 | 6 | @import "pink-grid/pinkgrid"; 7 | 8 | /* 03. OBJECTS */ 9 | @import "objects.layout"; 10 | 11 | /* 06. COMPONENTS */ 12 | @import "components.panels"; 13 | -------------------------------------------------------------------------------- /assets/scss/pink-grid/pinkgrid.scss: -------------------------------------------------------------------------------- 1 | * { 2 | box-sizing: border-box; // All Pink Mixins need this in order to work :) 3 | } 4 | 5 | /** 6 | * PINK GRID 7 | * Sass Width Percentage Generator 8 | * 9 | * $align: Vertical-align property Defaults to Top 10 | * $totalcols: Number of columns in your grid ( ex: 12 ) Defaults to $defaultcols 11 | * $colspan: Number of columns your item spans ( ex: 3 / 12 ) Defaults to $defaultcols (100% width) 12 | * $padside: Percentage padding left/right of each item. Defaults to $defaultpad 13 | * $padtop: Percentage padding above/below around each item. Defaults to 0 14 | */ 15 | 16 | $defaultcols: 12 !default; 17 | $defaultpad: 2% !default; 18 | $defaultmargin: -.275em !default; // Cancels out margin px issue with display:inline-block, may need to adjust based on body font; 19 | 20 | @mixin pinkgrid( $align: top, $totalcols: $defaultcols, $colspan: $defaultcols, $padtop: 0, $padside: $defaultpad, $margin: $defaultmargin ) { 21 | 22 | $itemwidth: ( 100% / $totalcols * $colspan ); 23 | 24 | display: inline-block; 25 | margin-right: $margin; // Cancels out margin px issue with display:inline-block, may need to adjust based on body font; 26 | vertical-align: $align; 27 | width: $itemwidth; 28 | padding: $padtop $padside; 29 | 30 | @if $colspan > $totalcols { // Prevent weird broken values 31 | 32 | width:100%; 33 | } 34 | 35 | } 36 | 37 | /** 38 | * PINK ROW 39 | * Sass Row Item Generator 40 | * Built in conjunction with Pink Grid 41 | * 42 | * $rowitems: Number of items per row ( ex. 4 ) Defaults to 1 43 | * $before: Alternating row layouts: elements before this row Defaults to 0 44 | * $after: Alternating row layouts: elements after this row Defaults to 0 45 | */ 46 | 47 | @mixin pinkrow( $rowitems: 1, $before: 0, $after: 0 ) { 48 | 49 | $rowtotal: $rowitems + $before + $after; 50 | $rowend: $rowitems + $before; 51 | $bef1: $before + 1; 52 | 53 | @if $rowitems <=1 { // Prevent weird broken values 54 | padding-left: 0; 55 | padding-right: 0; 56 | } 57 | 58 | @else { // all items 59 | 60 | &:nth-of-type( #{$rowtotal}n+#{$bef1} ){ 61 | padding-left:0; 62 | } 63 | 64 | &:nth-of-type( #{$rowtotal}n+#{$rowend} ){ 65 | padding-right:0; 66 | } 67 | } 68 | } 69 | 70 | /** 71 | * PINK GRID ROW 72 | * Generate evenly sized and evenly spaced row items 73 | * Like Magic Grid but without the automatic media queries 74 | * 75 | * $align: Vertical-align property Defaults to Top 76 | * $rowitems: Number of items per row ( ex. 4 ) Defaults to 1 77 | * $before: Alternating row layouts: elements before this row Defaults to 0 78 | * $after: Alternating row layouts: elements after this row Defaults to 0 79 | * $padside: Percentage padding left/right of each item. Defaults to $defaultpad 80 | * $padtop: Percentage padding above/below around each item. Defaults to 0 81 | */ 82 | 83 | @mixin pinkgridrow( $align: top, $padtop: 0, $padside: $defaultpad, $rowitems: 1, $before: 0, $after: 0, $margin: $defaultmargin ) { 84 | 85 | $itemwidth: ( ( 100% + $padside ) / $rowitems ); 86 | $lastwidth: ( $itemwidth - $padside ); 87 | $rowtotal: $rowitems + $before + $after; 88 | $rowend: $rowitems + $before; 89 | 90 | display: inline-block; 91 | margin-right: $margin; // Cancels out margin px issue with display:inline-block, may need to adjust based on body font; 92 | vertical-align: $align; 93 | padding: $padtop 0; 94 | 95 | @if $rowitems <=1 { // Prevent weird broken values 96 | width:100%; 97 | } 98 | 99 | @else { // all items 100 | 101 | padding-right: $padside; 102 | width: $itemwidth; 103 | 104 | &:nth-of-type( #{$rowtotal}n+#{$rowend} ){ 105 | padding-right:0; 106 | width: $lastwidth; 107 | } 108 | } 109 | } 110 | 111 | 112 | /** 113 | * PINK MAGIC ROW 114 | * Complete responsive grid solution for equally sized items per row. 115 | * Includes a space to define your media query breakpoints (based on min-width) 116 | * 117 | * $rowitems: Number of items per row ( ex. 4 ) Defaults to 1 118 | * $padside: Padding to the left/right of each item Defaults to $magicside 119 | * $padtop: Padding above/below around each item. Defaults to $magictop 120 | * $align Vertical-align property Defaults to Top 121 | * $before: Alternating row layouts: elements before this row Defaults to 0 122 | * $after: Alternating row layouts: elements after this row Defaults to 0 123 | */ 124 | 125 | $magicrow: 4 !default; // Global default number of items per row 126 | $magictop: 1em !default; // Global default of top padding 127 | $magicside: 2% !default; // Global default of side padding, in percentage 128 | $magicalign: top !default; // Global default of vertical-align 129 | 130 | $tiny-bp: 19em !default; // Set your tiny breakpoint 131 | $sm-bp: 32em !default; // Set your small breakpoint 132 | $med-bp: 45em !default; // Set your medium breakpoint 133 | $lg-bp: 61em !default; // Set your large breakpoint 134 | $xl-bp: 75em !default; // Set your x-large breakpoint 135 | 136 | 137 | @mixin pinkmagic( $rowitems: $magicrow, $padtop: $magictop, $padside: $magicside, $align: $magicalign, $before: 0, $after: 0, $margin: $defaultmargin ) { 138 | 139 | $itemwidth: ( ( 100% + $padside ) / $rowitems ); // width of items at maximum row size 140 | $lastwidth: ( $itemwidth - $padside ); // width of last item in row 141 | $rowtotal: $rowitems + $before + $after; // how many items in all rows 142 | $rowend: $rowitems + $before; // end of this row 143 | 144 | display: inline-block; 145 | vertical-align: $align; 146 | margin-right: $margin; // Cancels out margin px issue with display:inline-block, may need to adjust based on body font; 147 | width: 100%; 148 | padding: $padtop 0; 149 | 150 | @if $rowitems < 3 { // Less than 3 items per row 151 | 152 | @media only screen and ( min-width: $sm-bp ) { 153 | 154 | width: ( ( 100% + $padside ) / $rowitems ); 155 | padding-right: $padside; 156 | 157 | @if $rowitems <=1 { // Prevent weird broken values 158 | width:100%; 159 | } 160 | 161 | @else { // all items 162 | 163 | &:nth-of-type( #{$rowtotal}n+#{$rowend} ){ 164 | padding-right:0; 165 | width: $lastwidth; 166 | } 167 | } 168 | } // end $sm-bp 169 | } // end 3 items or less per row 170 | 171 | @else if $rowitems == 3 { // 3 items per row 172 | 173 | @media only screen and ( min-width: $sm-bp ) and ( max-width: $med-bp ) { 174 | 175 | $thisrow: 2; // intermediate row value, rounded up to nearest whole number 176 | $itemwidth2: ( ( 100% + $padside ) / $thisrow ); 177 | $lastwidth2: ( $itemwidth2 - $padside ); 178 | $befrow: $before + $thisrow; 179 | 180 | width: $itemwidth2; 181 | padding-right: $padside; 182 | 183 | @if $thisrow <=1 { // Prevent weird broken values 184 | width:100%; 185 | } 186 | 187 | @if $before > 0 or $after > 0 { 188 | 189 | &:nth-of-type( #{$rowtotal}n+#{$befrow} ), &:nth-of-type( #{$rowtotal}n+#{$rowend} ) { 190 | padding-right:0; 191 | width: $lastwidth2; 192 | } 193 | } 194 | 195 | @else { // no before or after value 196 | 197 | &:nth-of-type( #{$thisrow}n+#{$thisrow} ){ 198 | padding-right:0; 199 | width: $lastwidth2; 200 | } 201 | } 202 | } // end $sm-bp 203 | 204 | @media only screen and ( min-width: $med-bp ) { 205 | 206 | width: ( ( 100% + $padside ) / $rowitems ); 207 | padding-right: $padside; 208 | 209 | @if $rowitems <=1 { // Prevent weird broken values 210 | width:100%; 211 | } 212 | 213 | @else { // all items 214 | 215 | &:nth-of-type( #{$rowtotal}n+#{$rowend} ){ 216 | padding-right:0; 217 | width: $lastwidth; 218 | } 219 | } 220 | } // end $med-bp 221 | } // end 3 items per row 222 | 223 | @else if $rowitems > 3 and $rowitems <= 6 { // 4 to 6 items per row 224 | 225 | @media only screen and ( min-width: $sm-bp ) and ( max-width: $lg-bp ) { 226 | 227 | $thisrow: ceil($rowitems/2); // intermediate row value, rounded up to nearest whole number 228 | $itemwidth2: ( ( 100% + $padside ) / $thisrow ); 229 | $lastwidth2: ( $itemwidth2 - $padside ); 230 | $befrow: $before + $thisrow; 231 | 232 | width: $itemwidth2; 233 | padding-right: $padside; 234 | 235 | @if $thisrow <=1 { // Prevent weird broken values 236 | width:100%; 237 | } 238 | 239 | @if $before > 0 or $after > 0 { 240 | 241 | &:nth-of-type( #{$rowtotal}n+#{$befrow} ), &:nth-of-type( #{$rowtotal}n+#{$rowend} ) { 242 | padding-right:0; 243 | width: $lastwidth2; 244 | } 245 | } 246 | 247 | @else { // no before or after value 248 | 249 | &:nth-of-type( #{$thisrow}n+#{$thisrow} ){ 250 | padding-right:0; 251 | width: $lastwidth2; 252 | } 253 | } 254 | } // end $sm-bp 255 | 256 | @media only screen and ( min-width: $lg-bp ) { 257 | 258 | width: $itemwidth; 259 | padding-right: $padside; 260 | 261 | @if $rowitems <=1 { // Prevent weird broken values 262 | width:100%; 263 | } 264 | 265 | @else { // all items 266 | 267 | &:nth-of-type( #{$rowtotal}n+#{$rowend} ){ 268 | padding-right:0; 269 | width: $lastwidth; 270 | } 271 | } 272 | } // end $lg-bp 273 | } // end 4 to 6 items per row 274 | 275 | @else if $rowitems > 6 and $rowitems <= 9 { // 7 to 9 items per row 276 | 277 | @media only screen and ( min-width: $sm-bp ) and ( max-width: $med-bp ) { 278 | 279 | $thisrow: ceil($rowitems/4); // intermediate row value, rounded up to nearest whole number 280 | $itemwidth2: ( ( 100% + $padside ) / $thisrow ); 281 | $lastwidth2: ( $itemwidth2 - $padside ); 282 | $befrow: $before + $thisrow; 283 | 284 | width: $itemwidth2; 285 | padding-right: $padside; 286 | 287 | @if $thisrow <=1 { // Prevent weird broken values 288 | width:100%; 289 | } 290 | 291 | @if $before > 0 or $after > 0 { 292 | 293 | @for $j from 1 through 3 { 294 | 295 | $end: $j * $thisrow; 296 | $befend: $before + $end; 297 | 298 | &:nth-of-type( #{$rowtotal}n+#{$befrow} ), &:nth-of-type( #{$rowtotal}n+#{$befrow} ), &:nth-of-type( #{$rowtotal}n+#{$befend} ){ 299 | padding-right:0; 300 | width: $lastwidth2; 301 | } 302 | } 303 | } // end before 304 | 305 | @else { // no before or after value 306 | 307 | &:nth-of-type( #{$thisrow}n+#{$thisrow} ){ 308 | padding-right:0; 309 | width: $lastwidth2; 310 | } 311 | } 312 | } // end $sm-bp 313 | 314 | @media only screen and ( min-width: $med-bp ) and ( max-width: $lg-bp ) { 315 | 316 | $thisrow: ceil($rowitems/2); // intermediate row value, rounded up to nearest whole number 317 | $itemwidth2: ( ( 100% + $padside ) / $thisrow ); 318 | $lastwidth2: ( $itemwidth2 - $padside ); 319 | $befrow: $before + $thisrow; 320 | 321 | width: $itemwidth2; 322 | padding-right: $padside; 323 | 324 | @if $rowitems <=1 { // Prevent weird broken values 325 | width:100%; 326 | } 327 | 328 | @if $before > 0 or $after > 0 { 329 | 330 | &:nth-of-type( #{$rowtotal}n+#{$befrow} ), &:nth-of-type( #{$rowtotal}n+#{$rowend} ) { 331 | padding-right:0; 332 | width: $lastwidth2; 333 | } 334 | } 335 | 336 | @else { // no before or after value 337 | 338 | &:nth-of-type( #{$thisrow}n+#{$thisrow} ){ 339 | padding-right:0; 340 | width: $lastwidth2; 341 | } 342 | } 343 | } // end $med-bp 344 | 345 | @media only screen and ( min-width: $lg-bp ) { 346 | 347 | width: $itemwidth; 348 | padding-right: $padside; 349 | 350 | @if $rowitems <=1 { // Prevent weird broken values 351 | width:100%; 352 | } 353 | 354 | @else { // all items 355 | 356 | &:nth-of-type( #{$rowtotal}n+#{$rowend} ){ 357 | padding-right:0; 358 | width: $lastwidth; 359 | } 360 | } 361 | } // end $lg-bp 362 | } // end 7 to 10 items per row 363 | 364 | @else if $rowitems > 9 { // 10+ items per row 365 | 366 | @media only screen and ( min-width: $sm-bp ) and ( max-width: $med-bp ) { 367 | 368 | $thisrow: ceil($rowitems/6); // intermediate row value, rounded up to nearest whole number 369 | $itemwidth2: ( ( 100% + $padside ) / $thisrow ); 370 | $lastwidth2: ( $itemwidth2 - $padside ); 371 | $befrow: $before + $thisrow; 372 | 373 | width: $itemwidth2; 374 | padding-right: $padside; 375 | 376 | @if $thisrow <=1 { // Prevent weird broken values 377 | width:100%; 378 | } 379 | 380 | @if $before > 0 or $after > 0 { 381 | 382 | @for $j from 1 through 5 { 383 | 384 | $end: $j * $thisrow; 385 | $befend: $before + $end; 386 | 387 | &:nth-of-type( #{$rowtotal}n+#{$befrow} ), &:nth-of-type( #{$rowtotal}n+#{$befrow} ), &:nth-of-type( #{$rowtotal}n+#{$befend} ){ 388 | padding-right:0; 389 | width: $lastwidth2; 390 | } 391 | } 392 | } // end before 393 | 394 | @else { // no before or after value 395 | 396 | &:nth-of-type( #{$thisrow}n+#{$thisrow} ){ 397 | padding-right:0; 398 | width: $lastwidth2; 399 | } 400 | } 401 | } // end $sm-bp 402 | 403 | @media only screen and ( min-width: $med-bp ) and ( max-width: $lg-bp ) { 404 | 405 | $thisrow: ceil($rowitems/4); // intermediate row value, rounded up to nearest whole number 406 | $itemwidth2: ( ( 100% + $padside ) / $thisrow ); 407 | $lastwidth2: ( $itemwidth2 - $padside ); 408 | $befrow: $before + $thisrow; 409 | 410 | width: $itemwidth2; 411 | padding-right: $padside; 412 | 413 | @if $rowitems <=1 { // Prevent weird broken values 414 | width:100%; 415 | } 416 | 417 | @if $before > 0 or $after > 0 { 418 | 419 | @for $j from 1 through 3 { 420 | 421 | $end: $j * $thisrow; 422 | $befend: $before + $end; 423 | 424 | &:nth-of-type( #{$rowtotal}n+#{$befrow} ), &:nth-of-type( #{$rowtotal}n+#{$befrow} ), &:nth-of-type( #{$rowtotal}n+#{$befend} ){ 425 | padding-right:0; 426 | width: $lastwidth2; 427 | } 428 | } 429 | } // end before/after 430 | 431 | @else { // no before or after value 432 | 433 | &:nth-of-type( #{$thisrow}n+#{$thisrow} ){ 434 | padding-right:0; 435 | width: $lastwidth2; 436 | } 437 | } 438 | } // end $med-bp 439 | 440 | @media only screen and ( min-width: $lg-bp ) and ( max-width: $xl-bp ) { 441 | 442 | $thisrow: ceil($rowitems/2); // intermediate row value, rounded up to nearest whole number 443 | $itemwidth2: ( ( 100% + $padside ) / $thisrow ); 444 | $lastwidth2: ( $itemwidth2 - $padside ); 445 | $befrow: $before + $thisrow; 446 | 447 | width: $itemwidth2; 448 | padding-right: $padside; 449 | 450 | @if $rowitems <=1 { // Prevent weird broken values 451 | width:100%; 452 | } 453 | 454 | @if $before > 0 or $after > 0 { 455 | 456 | &:nth-of-type( #{$rowtotal}n+#{$befrow} ), &:nth-of-type( #{$rowtotal}n+#{$rowend} ) { 457 | padding-right:0; 458 | width: $lastwidth2; 459 | } 460 | } 461 | 462 | @else { // no before or after value 463 | 464 | &:nth-of-type( #{$thisrow}n+#{$thisrow} ){ 465 | padding-right:0; 466 | width: $lastwidth2; 467 | } 468 | } 469 | } // end $lg-bp 470 | 471 | @media only screen and ( min-width: $xl-bp ) { 472 | 473 | width: $itemwidth; 474 | padding-right: $padside; 475 | 476 | @if $rowitems <=1 { // Prevent weird broken values 477 | width:100%; 478 | } 479 | 480 | @else { // all items 481 | 482 | &:nth-of-type( #{$rowtotal}n+#{$rowend} ){ 483 | padding-right:0; 484 | width: $lastwidth; 485 | } 486 | } 487 | } // end $xl-bp 488 | } // end 10+ items per row 489 | } -------------------------------------------------------------------------------- /lib/class-gamajo-template-loader.php: -------------------------------------------------------------------------------- 1 | unset_template_data(); 89 | } 90 | /** 91 | * Retrieve a template part. 92 | * 93 | * @since 1.0.0 94 | * 95 | * @param string $slug Template slug. 96 | * @param string $name Optional. Template variation name. Default null. 97 | * @param bool $load Optional. Whether to load template. Default true. 98 | * 99 | * @return string 100 | */ 101 | public function get_template_part( $slug, $name = null, $load = true ) { 102 | // Execute code for this part. 103 | do_action( 'get_template_part_' . $slug, $slug, $name ); 104 | do_action( $this->filter_prefix . '_get_template_part_' . $slug, $slug, $name ); 105 | // Get files names of templates, for given slug and name. 106 | $templates = $this->get_template_file_names( $slug, $name ); 107 | // Return the part that is found. 108 | return $this->locate_template( $templates, $load, false ); 109 | } 110 | /** 111 | * Make custom data available to template. 112 | * 113 | * Data is available to the template as properties under the `$data` variable. 114 | * i.e. A value provided here under `$data['foo']` is available as `$data->foo`. 115 | * 116 | * When an input key has a hyphen, you can use `$data->{foo-bar}` in the template. 117 | * 118 | * @since 1.2.0 119 | * 120 | * @param mixed $data Custom data for the template. 121 | * @param string $var_name Optional. Variable under which the custom data is available in the template. 122 | * Default is 'data'. 123 | * 124 | * @return Gamajo_Block_Template_Loader 125 | */ 126 | public function set_template_data( $data, $var_name = 'data' ) { 127 | global $wp_query; 128 | $wp_query->query_vars[ $var_name ] = (object) $data; 129 | // Add $var_name to custom variable store if not default value 130 | if( $var_name !== 'data' ) { 131 | $this->template_data_var_names[] = $var_name; 132 | } 133 | return $this; 134 | } 135 | /** 136 | * Remove access to custom data in template. 137 | * 138 | * Good to use once the final template part has been requested. 139 | * 140 | * @since 1.2.0 141 | * 142 | * @return Gamajo_Block_Template_Loader 143 | */ 144 | public function unset_template_data() { 145 | global $wp_query; 146 | // Remove any duplicates from the custom variable store 147 | $custom_var_names = array_unique( $this->template_data_var_names ); 148 | // Remove each custom data reference from $wp_query 149 | foreach ( $custom_var_names as $var ) { 150 | if ( isset( $wp_query->query_vars[$var] ) ) { 151 | unset( $wp_query->query_vars[$var] ); 152 | } 153 | } 154 | return $this; 155 | } 156 | /** 157 | * Given a slug and optional name, create the file names of templates. 158 | * 159 | * @since 1.0.0 160 | * 161 | * @param string $slug Template slug. 162 | * @param string $name Template variation name. 163 | * 164 | * @return array 165 | */ 166 | protected function get_template_file_names( $slug, $name ) { 167 | $templates = array(); 168 | if ( isset( $name ) ) { 169 | $templates[] = $slug . '-' . $name . '.php'; 170 | } 171 | $templates[] = $slug . '.php'; 172 | /** 173 | * Allow template choices to be filtered. 174 | * 175 | * The resulting array should be in the order of most specific first, to least specific last. 176 | * e.g. 0 => recipe-instructions.php, 1 => recipe.php 177 | * 178 | * @since 1.0.0 179 | * 180 | * @param array $templates Names of template files that should be looked for, for given slug and name. 181 | * @param string $slug Template slug. 182 | * @param string $name Template variation name. 183 | */ 184 | return apply_filters( $this->filter_prefix . '_get_template_part', $templates, $slug, $name ); 185 | } 186 | /** 187 | * Retrieve the name of the highest priority template file that exists. 188 | * 189 | * Searches in the STYLESHEETPATH before TEMPLATEPATH so that themes which 190 | * inherit from a parent theme can just overload one file. If the template is 191 | * not found in either of those, it looks in the theme-compat folder last. 192 | * 193 | * @since 1.0.0 194 | * 195 | * @param string|array $template_names Template file(s) to search for, in order. 196 | * @param bool $load If true the template file will be loaded if it is found. 197 | * @param bool $require_once Whether to require_once or require. Default true. 198 | * Has no effect if $load is false. 199 | * 200 | * @return string The template filename if one is located. 201 | */ 202 | public function locate_template( $template_names, $load = false, $require_once = true ) { 203 | // Use $template_names as a cache key - either first element of array or the variable itself if it's a string 204 | $cache_key = is_array( $template_names ) ? $template_names[0] : $template_names; 205 | // If the key is in the cache array, we've already located this file. 206 | if ( isset( $this->template_path_cache[$cache_key] ) ) { 207 | $located = $this->template_path_cache[$cache_key]; 208 | } else { 209 | // No file found yet. 210 | $located = false; 211 | // Remove empty entries. 212 | $template_names = array_filter( (array) $template_names ); 213 | $template_paths = $this->get_template_paths(); 214 | // Try to find a template file. 215 | foreach ( $template_names as $template_name ) { 216 | // Trim off any slashes from the template name. 217 | $template_name = ltrim( $template_name, '/' ); 218 | // Try locating this template file by looping through the template paths. 219 | foreach ( $template_paths as $template_path ) { 220 | if ( file_exists( $template_path . $template_name ) ) { 221 | $located = $template_path . $template_name; 222 | // Store the template path in the cache 223 | $this->template_path_cache[$cache_key] = $located; 224 | break 2; 225 | } 226 | } 227 | } 228 | } 229 | if ( $load && $located ) { 230 | load_template( $located, $require_once ); 231 | } 232 | return $located; 233 | } 234 | /** 235 | * Return a list of paths to check for template locations. 236 | * 237 | * Default is to check in a child theme (if relevant) before a parent theme, so that themes which inherit from a 238 | * parent theme can just overload one file. If the template is not found in either of those, it looks in the 239 | * theme-compat folder last. 240 | * 241 | * @since 1.0.0 242 | * 243 | * @return mixed|void 244 | */ 245 | protected function get_template_paths() { 246 | $theme_directory = trailingslashit( $this->theme_template_directory ); 247 | $file_paths = array( 248 | 10 => trailingslashit( get_template_directory() ) . $theme_directory, 249 | 100 => $this->get_templates_dir(), 250 | ); 251 | // Only add this conditionally, so non-child themes don't redundantly check active theme twice. 252 | if ( get_stylesheet_directory() !== get_template_directory() ) { 253 | $file_paths[1] = trailingslashit( get_stylesheet_directory() ) . $theme_directory; 254 | } 255 | /** 256 | * Allow ordered list of template paths to be amended. 257 | * 258 | * @since 1.0.0 259 | * 260 | * @param array $var Default is directory in child theme at index 1, parent theme at 10, and plugin at 100. 261 | */ 262 | $file_paths = apply_filters( $this->filter_prefix . '_template_paths', $file_paths ); 263 | // Sort the file paths based on priority. 264 | ksort( $file_paths, SORT_NUMERIC ); 265 | return array_map( 'trailingslashit', $file_paths ); 266 | } 267 | /** 268 | * Return the path to the templates directory in this plugin. 269 | * 270 | * May be overridden in subclass. 271 | * 272 | * @since 1.0.0 273 | * 274 | * @return string 275 | */ 276 | protected function get_templates_dir() { 277 | return trailingslashit( $this->plugin_directory ) . $this->plugin_template_directory; 278 | } 279 | } 280 | } 281 | -------------------------------------------------------------------------------- /lib/class-mtm-block-template.php: -------------------------------------------------------------------------------- 1 | templates = array(); 54 | 55 | // Add a filter to the attributes metabox to inject template into the cache. 56 | if ( version_compare( floatval( get_bloginfo( 'version' ) ), '4.7', '<' ) ) { 57 | 58 | // 4.6 and older 59 | add_filter( 60 | 'page_attributes_dropdown_pages_args', 61 | array( $this, 'mtm_register_project_block_templates' ) 62 | ); 63 | 64 | } else { 65 | 66 | // Add a filter to the wp 4.7 version attributes metabox 67 | add_filter( 68 | 'theme_page_templates', array( $this, 'mtm_add_new_block_template' ) 69 | ); 70 | 71 | } 72 | 73 | 74 | // Add a filter to the save post to inject out template into the page cache 75 | add_filter( 76 | 'wp_insert_post_data', 77 | array( $this, 'mtm_register_project_block_templates' ) 78 | ); 79 | 80 | 81 | // Add a filter to the template include to determine if the page has our 82 | // template assigned and return it's path 83 | add_filter( 84 | 'template_include', 85 | array( $this, 'mtm_view_project_block_template') 86 | ); 87 | 88 | 89 | // Add your templates to this array. 90 | //'FILE_PATH_AND_NAME' => 'TEMPLATE_TITLE' 91 | $this->templates = array( 92 | '../templates/template-block-content.php' => 'Custom Block Template', 93 | '../templates/template-single-scroll.php' => 'Single Scroll Template', 94 | ); 95 | 96 | } 97 | 98 | /** 99 | * Adds our template to the page dropdown for v4.7+ 100 | * 101 | */ 102 | public function mtm_add_new_block_template( $posts_templates ) { 103 | $new_templates = apply_filters( 'mtm_filter_block_templates', $this->templates ); 104 | $posts_templates = array_merge( $posts_templates, $new_templates ); 105 | return $posts_templates; 106 | } 107 | 108 | 109 | /** 110 | * Adds our template to the pages cache in order to trick WordPress 111 | * into thinking the template file exists where it doens't really exist. 112 | */ 113 | 114 | public function mtm_register_project_block_templates( $atts ) { 115 | 116 | // Create the key used for the themes cache 117 | $cache_key = 'page_templates-' . md5( get_theme_root() . '/' . get_stylesheet() ); 118 | 119 | // Retrieve the cache list. 120 | // If it doesn't exist, or it's empty prepare an array 121 | $templates = wp_get_theme()->get_page_templates(); 122 | if ( empty( $templates ) ) { 123 | $templates = array(); 124 | } 125 | 126 | // New cache, therefore remove the old one 127 | wp_cache_delete( $cache_key , 'themes'); 128 | 129 | // Now add our template to the list of templates by merging our templates 130 | // with the existing templates array from the cache. 131 | $new_templates = apply_filters( 'mtm_filter_block_templates', $this->templates ); 132 | $templates = array_merge( $templates, $new_templates ); 133 | 134 | // Add the modified cache to allow WordPress to pick it up for listing 135 | // available templates 136 | wp_cache_add( $cache_key, $templates, 'themes', 1800 ); 137 | 138 | return $atts; 139 | } 140 | 141 | /** 142 | * Checks if the template is assigned to the page 143 | * Needs to also check if it is search, or it might return wrong template for search 144 | */ 145 | public function mtm_view_project_block_template( $template ) { 146 | 147 | global $post; 148 | 149 | if ( !$post || !isset( $this->templates[ get_post_meta( $post->ID, '_wp_page_template', true ) ] ) || is_search() || is_404() ) { 150 | return $template; 151 | } 152 | 153 | $file = plugin_dir_path( __FILE__ ). get_post_meta( 154 | $post->ID, '_wp_page_template', true 155 | ); 156 | 157 | // Unccoment this and comment out the previous lines if your templates are in a subfolder 158 | // instead of the root 159 | // $file = plugin_dir_path(__FILE__). 'templates/' .get_post_meta( 160 | // $post->ID, '_wp_page_template', true 161 | // ); 162 | 163 | // Just to be safe, we check if the file exist first 164 | if( file_exists( $file ) ) { 165 | return $file; 166 | } 167 | else { echo $file; } 168 | 169 | return $template; 170 | 171 | } 172 | } 173 | } 174 | -------------------------------------------------------------------------------- /lib/class-mtm-field-groups.php: -------------------------------------------------------------------------------- 1 | 'blocktemplates', 22 | 'operator' => '==', 23 | 'value' => '../templates/template-block-content.php', 24 | ), 25 | ); 26 | 27 | public static $arr_location2 = array( 28 | array( 29 | 'param' => 'blocktemplates', 30 | 'operator' => '==', 31 | 'value' => '../templates/template-single-scroll.php', 32 | ), 33 | ); 34 | 35 | /** 36 | * Unique Key 37 | */ 38 | public static $str_key = 'group_56f5752dccdbfblock'; 39 | public static $str_key2 = 'group_565cdb18b4c4cblock'; 40 | 41 | 42 | public function __construct() { 43 | 44 | add_action( 'init', array( $this, 'mtm_template_block_content' ) ); 45 | add_action( 'init', array( $this, 'mtm_template_block_single_scroll' ) ); 46 | } 47 | 48 | /** 49 | * Register field group with ACF 50 | */ 51 | public function mtm_template_block_content( $label = null, array $location = null, $key = null ) { 52 | 53 | if( is_null( $label ) ) { $label = self::$str_label; } 54 | if( is_null( $location ) ) { $location = self::$arr_location; } 55 | if( is_null( $key ) ) { $key = self::$str_key; } 56 | 57 | return apply_filters( 'mtm_template_block_content_filter', array( 58 | 'key' => $key, 59 | 'title' => 'Page Options', 60 | 'fields' => array( 61 | $this->mtm_block_show_page_title(), 62 | ), 63 | 'location' => array( $location ), 64 | 'menu_order' => 0, 65 | 'position' => 'side', 66 | 'style' => 'default', 67 | 'label_placement' => 'top', 68 | 'instruction_placement' => 'label', 69 | 'hide_on_screen' => '', 70 | 'active' => true, 71 | 'description' => '', 72 | )); 73 | } 74 | 75 | /** 76 | * Standard Home/Landing Page Fields 77 | */ 78 | public function mtm_template_block_single_scroll( $label = null, array $location = null, $key = null ) { 79 | 80 | if( is_null( $label ) ) { $label = self::$str_label2; } 81 | if( is_null( $location ) ) { $location = self::$arr_location2; } 82 | if( is_null( $key ) ) { $key = self::$str_key2; } 83 | 84 | return apply_filters( 'mtm_template_block_single_scroll_filter', array( 85 | 'key' => $key, 86 | 'title' => $label, 87 | 'fields' => array( 88 | $this->mtm_block_show_page_title(), 89 | $this->mtm_enable_jump_button(), 90 | $this->mtm_block_single_scroll_page_select(), 91 | ), 92 | 'location' => array( $location ), 93 | 'menu_order' => 0, 94 | 'position' => 'normal', 95 | 'style' => 'default', 96 | 'label_placement' => 'top', 97 | 'instruction_placement' => 'label', 98 | 'hide_on_screen' => '', 99 | 'active' => 1, 100 | 'description' => '', 101 | )); 102 | } 103 | 104 | 105 | 106 | } // END class 107 | 108 | new Mtm_Block_Field_Groups(); 109 | -------------------------------------------------------------------------------- /lib/class-mtm-template-loader.php: -------------------------------------------------------------------------------- 1 | ID) 9 | * @param mixed $default Value to return if get_field() returns nothing 10 | * @return mixed 11 | * @uses get_field() 12 | */ 13 | 14 | if( !function_exists( '_get_field' ) ){ 15 | function _get_field( $key, $id=false, $default='' ) { 16 | global $post; 17 | $key = trim( filter_var( $key, FILTER_SANITIZE_STRING ) ); 18 | $result = ''; 19 | 20 | if ( function_exists( 'get_field' ) ) { 21 | if ( isset( $post->ID ) && !$id ) 22 | $result = get_field( $key ); 23 | else 24 | $result = get_field( $key, $id ); 25 | 26 | if ( $result == '' ) // If ACF enabled but key is undefined, return default 27 | $result = $default; 28 | 29 | } else { 30 | $result = $default; 31 | } 32 | return $result; 33 | } 34 | } 35 | 36 | /** 37 | * Shortcut for 'echo _get_field()' 38 | * @param str $key The meta key 39 | * @param mixed $id The post ID (int|str, defaults to $post->ID) 40 | * @param mixed $default Value to return if there's no value for the custom field $key 41 | * @return void 42 | * @uses _get_field() 43 | */ 44 | if( !function_exists( '_the_field' ) ){ 45 | function _the_field( $key, $id=false, $default='' ) { 46 | echo _get_field( $key, $id, $default ); 47 | } 48 | } 49 | /** 50 | * Get a sub field of a Repeater field 51 | * @param str $key The meta key 52 | * @param mixed $default Value to return if there's no value for the custom field $key 53 | * @return mixed 54 | * @uses get_sub_field() 55 | */ 56 | if( !function_exists( '_get_sub_field' ) ){ 57 | function _get_sub_field( $key, $default='' ) { 58 | if ( function_exists( 'get_sub_field' ) && get_sub_field( $key ) ) 59 | return get_sub_field( $key ); 60 | else 61 | return $default; 62 | } 63 | } 64 | /** 65 | * Shortcut for 'echo _get_sub_field()' 66 | * @param str $key The meta key Value to return if there's no value for the custom field $key 67 | * @return void 68 | * @uses _get_sub_field() 69 | */ 70 | if( !function_exists( '_the_sub_field' ) ){ 71 | function _the_sub_field( $key, $default='' ) { 72 | echo _get_sub_field( $key, $default ); 73 | } 74 | } 75 | /** 76 | * Check if a given field has a sub field 77 | * @param str $key The meta key 78 | * @param mixed $id The post ID 79 | * @return bool 80 | * @uses has_sub_field() 81 | */ 82 | if( !function_exists( '_has_sub_field' ) ){ 83 | function _has_sub_field( $key, $id=false ) { 84 | if ( function_exists('has_sub_field') ) 85 | return has_sub_field( $key, $id ); 86 | else 87 | return false; 88 | } 89 | } -------------------------------------------------------------------------------- /lib/mtm-acf-fields.php: -------------------------------------------------------------------------------- 1 | my_array_function() ) ); 11 | * 12 | * // Remove existing fields from the array 13 | * unset( $array['field_key'] ); 14 | * 15 | * return $array; 16 | * } 17 | * add_filter( 'mtm_content_modules_layouts_filter', 'my_mtm_layouts_filter' ); 18 | */ 19 | 20 | /** 21 | * Modular Fields 22 | */ 23 | class Mtm_Acf_Add_Local_Block_Field_Groups extends Mtm_Block_Field_Groups { 24 | 25 | public function __construct() { 26 | add_action( 'after_setup_theme', array( $this, 'mtm_add_field_groups' ), 2 ); 27 | } 28 | 29 | public function mtm_add_field_groups() { 30 | 31 | if( function_exists( 'acf_add_local_field_group' ) ) { 32 | 33 | acf_add_local_field_group( $this->mtm_block_single_content_area() ); 34 | acf_add_local_field_group( $this->mtm_block_dual_content_area() ); 35 | acf_add_local_field_group( $this->mtm_block_content_callout() ); 36 | acf_add_local_field_group( $this->mtm_block_hero_image() ); 37 | acf_add_local_field_group( $this->mtm_block_hero_media() ); 38 | acf_add_local_field_group( $this->mtm_block_slider() ); 39 | acf_add_local_field_group( $this->mtm_block_feature_boxes() ); 40 | acf_add_local_field_group( $this->mtm_block_buttons() ); 41 | acf_add_local_field_group( $this->mtm_block_call_to_action() ); 42 | acf_add_local_field_group( $this->mtm_block_logo_showcase() ); 43 | acf_add_local_field_group( $this->mtm_block_widget_area() ); 44 | acf_add_local_field_group( $this->mtm_block_list_manual() ); 45 | acf_add_local_field_group( $this->mtm_block_grid_manual() ); 46 | acf_add_local_field_group( $this->mtm_block_list_posts() ); 47 | acf_add_local_field_group( $this->mtm_block_grid_posts() ); 48 | acf_add_local_field_group( $this->mtm_block_tabs() ); 49 | acf_add_local_field_group( $this->mtm_block_gallery() ); 50 | 51 | acf_add_local_field_group( $this->mtm_template_block_content() ); 52 | acf_add_local_field_group( $this->mtm_template_block_single_scroll() ); 53 | acf_add_local_field_group( $this->mtm_enable_jump_button() ); 54 | } 55 | } 56 | } // END class 57 | 58 | new Mtm_Acf_Add_Local_Block_Field_Groups(); 59 | 60 | 61 | /** 62 | * Registers all Project-specific (non-modular) ACF Fields 63 | * Declares all Field Groups 64 | */ 65 | 66 | function mtm_block_category( $categories, $post ) { 67 | return array_merge( 68 | $categories, 69 | array( 70 | array( 71 | 'slug' => 'custom-blocks', 72 | 'title' => __( 'Custom Blocks', 'custom-blocks' ), 73 | ), 74 | ) 75 | ); 76 | } 77 | add_filter( 'block_categories', 'mtm_block_category', 10, 2); 78 | 79 | function register_acf_block_types() { 80 | 81 | // Single Content Area 82 | acf_register_block_type(array( 83 | 'name' => 'mtm_block_single_content_area', 84 | 'title' => __('Single Content Block'), 85 | 'description' => __('WYSIWYG Text block with subtitle'), 86 | 'render_template' => MTM_BLOCK_PLUGIN_DIR . 'templates/mtm-wrapper-single-content.php', 87 | 'category' => 'custom-blocks', 88 | 'icon' => 'welcome-write-blog', 89 | 'keywords' => array( '' ), 90 | 'mode' => 'auto', 91 | )); 92 | 93 | // Dual Content Area 94 | acf_register_block_type(array( 95 | 'name' => 'mtm_block_dual_content_area', 96 | 'title' => __('Dual Content Block'), 97 | 'description' => __('Two WYSIWYG text blocks with subtitle'), 98 | 'render_template' => MTM_BLOCK_PLUGIN_DIR . 'templates/mtm-wrapper-dual-content.php', 99 | 'category' => 'custom-blocks', 100 | 'icon' => 'admin-page', 101 | 'keywords' => array( '' ), 102 | 'mode' => 'auto', 103 | )); 104 | 105 | // Content + Callout 106 | acf_register_block_type(array( 107 | 'name' => 'mtm_block_content_callout', 108 | 'title' => __('Content + Callout Block'), 109 | 'description' => __('Two differently styled WYSIWYG text blocks with subtitle and optional background image'), 110 | 'render_template' => MTM_BLOCK_PLUGIN_DIR . 'templates/mtm-wrapper-content-callout.php', 111 | 'category' => 'custom-blocks', 112 | 'icon' => 'welcome-add-page', 113 | 'keywords' => array( '' ), 114 | 'mode' => 'auto', 115 | )); 116 | 117 | // Call To Action 118 | acf_register_block_type(array( 119 | 'name' => 'mtm_block_call_to_action', 120 | 'title' => __('Call To Action Block'), 121 | 'description' => __('Call to action with title, subtitle, and buttons'), 122 | 'render_template' => MTM_BLOCK_PLUGIN_DIR . 'templates/mtm-wrapper-call-to-action.php', 123 | 'category' => 'custom-blocks', 124 | 'icon' => 'welcome-view-site', 125 | 'keywords' => array( '' ), 126 | 'mode' => 'auto', 127 | )); 128 | 129 | // Buttons 130 | acf_register_block_type(array( 131 | 'name' => 'mtm_block_buttons', 132 | 'title' => __('Multi Button Block'), 133 | 'description' => __('Display multiple buttons'), 134 | 'render_template' => MTM_BLOCK_PLUGIN_DIR . 'templates/mtm-wrapper-buttons.php', 135 | 'category' => 'custom-blocks', 136 | 'icon' => 'screenoptions', 137 | 'keywords' => array( '' ), 138 | 'mode' => 'auto', 139 | )); 140 | 141 | // Manual List 142 | acf_register_block_type(array( 143 | 'name' => 'mtm_block_list_manual', 144 | 'title' => __('Manual List Block'), 145 | 'description' => __('Manually create content that will be displayed in a list format'), 146 | 'render_template' => MTM_BLOCK_PLUGIN_DIR . 'templates/mtm-wrapper-list-manual.php', 147 | 'category' => 'custom-blocks', 148 | 'icon' => 'excerpt-view', 149 | 'keywords' => array( '' ), 150 | 'mode' => 'auto', 151 | )); 152 | 153 | // Content List 154 | acf_register_block_type(array( 155 | 'name' => 'mtm_block_list_posts', 156 | 'title' => __('Content List Block'), 157 | 'description' => __('Select existing content that will be displayed in a list format'), 158 | 'render_template' => MTM_BLOCK_PLUGIN_DIR . 'templates/mtm-wrapper-list-post.php', 159 | 'category' => 'custom-blocks', 160 | 'icon' => 'excerpt-view', 161 | 'keywords' => array( '' ), 162 | 'mode' => 'auto', 163 | )); 164 | 165 | // Manual Grid 166 | acf_register_block_type(array( 167 | 'name' => 'mtm_block_grid_manual', 168 | 'title' => __('Manual Grid Block'), 169 | 'description' => __('Manually create content that will be displayed in a grid format'), 170 | 'render_template' => MTM_BLOCK_PLUGIN_DIR . 'templates/mtm-wrapper-grid-manual.php', 171 | 'category' => 'custom-blocks', 172 | 'icon' => 'grid-view', 173 | 'keywords' => array( '' ), 174 | 'mode' => 'auto', 175 | )); 176 | 177 | // Content Grid 178 | acf_register_block_type(array( 179 | 'name' => 'mtm_block_grid_posts', 180 | 'title' => __('Content Grid Block'), 181 | 'description' => __('Select existing content that will be displayed in a gridt format'), 182 | 'render_template' => MTM_BLOCK_PLUGIN_DIR . 'templates/mtm-wrapper-grid-post.php', 183 | 'category' => 'custom-blocks', 184 | 'icon' => 'grid-view', 185 | 'keywords' => array( '' ), 186 | 'mode' => 'auto', 187 | )); 188 | 189 | // Hero Image 190 | acf_register_block_type(array( 191 | 'name' => 'mtm_block_hero_image', 192 | 'title' => __('Hero Image Block'), 193 | 'description' => __('Display a background image with headline, text, and buttons'), 194 | 'render_template' => MTM_BLOCK_PLUGIN_DIR . 'templates/mtm-wrapper-hero-image.php', 195 | 'category' => 'custom-blocks', 196 | 'icon' => 'camera', 197 | 'keywords' => array( '' ), 198 | 'mode' => 'auto', 199 | )); 200 | 201 | // Hero Media 202 | acf_register_block_type(array( 203 | 'name' => 'mtm_block_hero_media', 204 | 'title' => __('Hero Video Block'), 205 | 'description' => __('Display an embedded video with headline, text, and buttons'), 206 | 'render_template' => MTM_BLOCK_PLUGIN_DIR . 'templates/mtm-wrapper-hero-media.php', 207 | 'category' => 'custom-blocks', 208 | 'icon' => 'video-alt3', 209 | 'keywords' => array( '' ), 210 | 'mode' => 'auto', 211 | )); 212 | 213 | // Slider 214 | acf_register_block_type(array( 215 | 'name' => 'mtm_block_slider', 216 | 'title' => __('Slider Block'), 217 | 'description' => __('Display a slider, where each slide has background image, headline, text, and link'), 218 | 'render_template' => MTM_BLOCK_PLUGIN_DIR . 'templates/mtm-wrapper-slider.php', 219 | 'category' => 'custom-blocks', 220 | 'icon' => 'images-alt2', 221 | 'keywords' => array( '' ), 222 | 'mode' => 'auto', 223 | )); 224 | 225 | // Tabs 226 | acf_register_block_type(array( 227 | 'name' => 'mtm_block_tabs', 228 | 'title' => __('Tabs Block'), 229 | 'description' => __('Display tabs that can stack to an accoridon on mobile'), 230 | 'render_template' => MTM_BLOCK_PLUGIN_DIR . 'templates/mtm-wrapper-tabs.php', 231 | 'category' => 'custom-blocks', 232 | 'icon' => 'index-card', 233 | 'keywords' => array( '' ), 234 | 'mode' => 'auto', 235 | )); 236 | 237 | // Feature Boxes 238 | acf_register_block_type(array( 239 | 'name' => 'mtm_block_feature_boxes', 240 | 'title' => __('Featured Content Block'), 241 | 'description' => __('Display featured content blocks manually or by selecting from existing content'), 242 | 'render_template' => MTM_BLOCK_PLUGIN_DIR . 'templates/mtm-wrapper-featured-content.php', 243 | 'category' => 'custom-blocks', 244 | 'icon' => 'warning', 245 | 'keywords' => array( '' ), 246 | 'mode' => 'auto', 247 | )); 248 | 249 | // Gallery Grid 250 | acf_register_block_type(array( 251 | 'name' => 'mtm_block_gallery', 252 | 'title' => __('Gallery Grid Block'), 253 | 'description' => __('Display a gallery where each image is the same size'), 254 | 'render_template' => MTM_BLOCK_PLUGIN_DIR . 'templates/mtm-wrapper-gallery.php', 255 | 'category' => 'custom-blocks', 256 | 'icon' => 'images-alt', 257 | 'keywords' => array( '' ), 258 | 'mode' => 'auto', 259 | )); 260 | 261 | // Logo Showcase 262 | acf_register_block_type(array( 263 | 'name' => 'mtm_block_logo_showcase', 264 | 'title' => __('Logo Showcase Block'), 265 | 'description' => __('Display a showcase of logo images with links'), 266 | 'render_template' => MTM_BLOCK_PLUGIN_DIR . 'templates/mtm-wrapper-logos.php', 267 | 'category' => 'custom-blocks', 268 | 'icon' => 'star-filled', 269 | 'keywords' => array( '' ), 270 | 'mode' => 'auto', 271 | )); 272 | 273 | // Widget Area 274 | acf_register_block_type(array( 275 | 'name' => 'mtm_block_widget_area', 276 | 'title' => __('Widget Area Block'), 277 | 'description' => __('Display one of your custom widget areas'), 278 | 'render_template' => MTM_BLOCK_PLUGIN_DIR . 'templates/mtm-wrapper-widget-area.php', 279 | 'category' => 'custom-blocks', 280 | 'icon' => 'feedback', 281 | 'keywords' => array( '' ), 282 | 'mode' => 'auto', 283 | )); 284 | 285 | // Widget Area 286 | acf_register_block_type(array( 287 | 'name' => 'mtm_block_jump_button', 288 | 'title' => __('Back To Top Block'), 289 | 'description' => __('Display a simple "back to top" button'), 290 | 'render_template' => MTM_BLOCK_PLUGIN_DIR . 'templates/mtm-block-jump-button.php', 291 | 'category' => 'custom-blocks', 292 | 'icon' => 'arrow-up-alt', 293 | 'keywords' => array( '' ), 294 | 'mode' => 'auto', 295 | )); 296 | 297 | // TEST ONLY 298 | // acf_register_block_type(array( 299 | // 'name' => 'mtm_block_test', 300 | // 'title' => __('Test Block'), 301 | // 'description' => __('Test block for dev only'), 302 | // 'render_template' => MTM_BLOCK_PLUGIN_DIR . 'templates/mtm-wrapper-test.php', 303 | // 'category' => 'custom-blocks', 304 | // 'icon' => 'welcome-view-site', 305 | // 'keywords' => array( '' ), 306 | // 'mode' => 'auto', 307 | // )); 308 | } 309 | 310 | // Check if function exists and hook into setup. 311 | if( function_exists('acf_register_block_type') ) { 312 | add_action('acf/init', 'register_acf_block_types'); 313 | } 314 | 315 | 316 | 317 | /** 318 | * Original ACF field registration 319 | * To be refactored as seen above 320 | */ 321 | 322 | if( function_exists('acf_add_local_field_group') ): 323 | 324 | // $mtm_field_groups = new Mtm_Field_Groups(); 325 | 326 | // acf_add_local_field_group( $mtm_field_groups->mtm_content_modules() ); 327 | 328 | /** Background Image **/ 329 | 330 | acf_add_local_field_group(array( 331 | 'key' => 'group_5b3f7572ce4f5BLOCK', 332 | 'title' => 'Custom Block Settings', 333 | 'fields' => array( 334 | array( 335 | 'key' => 'field_5b3f7580fae80BLOCK', 336 | 'label' => 'Include Stylesheets?', 337 | 'name' => 'mtm_block_enqueue_stylesheets', 338 | 'type' => 'true_false', 339 | 'instructions' => 'Defaults to checked. If unchecked, you will need to include your own stylesheets in your theme.', 340 | 'required' => 0, 341 | 'conditional_logic' => 0, 342 | 'wrapper' => array( 343 | 'width' => '', 344 | 'class' => '', 345 | 'id' => '', 346 | ), 347 | 'message' => 'Enqueue the stylesheets from this plugin?', 348 | 'default_value' => 1, 349 | 'ui' => 0, 350 | 'ui_on_text' => '', 351 | 'ui_off_text' => '', 352 | ), 353 | ), 354 | 'location' => array( 355 | array( 356 | array( 357 | 'param' => 'options_page', 358 | 'operator' => '==', 359 | 'value' => 'page-components-settings', 360 | ), 361 | ), 362 | ), 363 | 'menu_order' => 0, 364 | 'position' => 'normal', 365 | 'style' => 'default', 366 | 'label_placement' => 'top', 367 | 'instruction_placement' => 'label', 368 | 'hide_on_screen' => '', 369 | 'active' => 1, 370 | 'description' => '', 371 | )); 372 | 373 | acf_add_local_field_group(array ( 374 | 'key' => 'group_56831a6c39e46block', 375 | 'title' => 'Background Image', 376 | 'fields' => array( 377 | array( 378 | 'key' => 'field_565cdb92e45d7block', 379 | 'label' => 'Add Background Image', 380 | 'name' => 'mtm_home_background_image', 381 | 'type' => 'image', 382 | 'instructions' => '(Optional) Add a background image to the homepage area', 383 | 'required' => 0, 384 | 'conditional_logic' => 0, 385 | 'wrapper' => array( 386 | 'width' => '', 387 | 'class' => '', 388 | 'id' => '', 389 | ), 390 | 'return_format' => 'array', 391 | 'preview_size' => 'thumbnail', 392 | 'library' => 'all', 393 | 'min_width' => '', 394 | 'min_height' => '', 395 | 'min_size' => '', 396 | 'max_width' => '', 397 | 'max_height' => '', 398 | 'max_size' => '', 399 | 'mime_types' => '', 400 | ), 401 | ), 402 | 'location' => array( 403 | array( 404 | array( 405 | 'param' => 'blocktemplates', 406 | 'operator' => '==', 407 | 'value' => '../templates/template-single-scroll.php', 408 | ), 409 | ), 410 | ), 411 | 'menu_order' => 100, 412 | 'position' => 'side', 413 | 'style' => 'default', 414 | 'label_placement' => 'top', 415 | 'instruction_placement' => 'label', 416 | 'hide_on_screen' => '', 417 | 'active' => 1, 418 | 'description' => '', 419 | )); 420 | 421 | acf_add_local_field_group(array( 422 | 'key' => 'group_5e25c33217992', 423 | 'title' => 'Button Options', 424 | 'fields' => array( 425 | array( 426 | 'key' => 'field_5e25c65cb3f33', 427 | 'label' => 'Button Size', 428 | 'name' => 'mtm_button_size', 429 | 'type' => 'radio', 430 | 'instructions' => '', 431 | 'required' => 0, 432 | 'conditional_logic' => 0, 433 | 'wrapper' => array( 434 | 'width' => '50', 435 | 'class' => '', 436 | 'id' => '', 437 | ), 438 | 'choices' => array( 439 | 'default' => 'Default', 440 | 'button-sm' => 'Small', 441 | 'button-lg' => 'Large', 442 | 'button-xl' => 'X-Large', 443 | ), 444 | 'allow_null' => 0, 445 | 'other_choice' => 0, 446 | 'default_value' => '', 447 | 'layout' => 'horizontal', 448 | 'return_format' => 'value', 449 | 'save_other_choice' => 0, 450 | ), 451 | array( 452 | 'key' => 'field_5e25c6c2b3f34', 453 | 'label' => 'Button Alignment', 454 | 'name' => 'mtm_button_alignment', 455 | 'type' => 'radio', 456 | 'instructions' => '', 457 | 'required' => 0, 458 | 'conditional_logic' => 0, 459 | 'wrapper' => array( 460 | 'width' => '50', 461 | 'class' => '', 462 | 'id' => '', 463 | ), 464 | 'choices' => array( 465 | 'default' => 'Default', 466 | 'alignleft' => 'Left', 467 | 'aligncenter' => 'Center', 468 | 'alignright' => 'Right', 469 | ), 470 | 'allow_null' => 0, 471 | 'other_choice' => 0, 472 | 'default_value' => '', 473 | 'layout' => 'horizontal', 474 | 'return_format' => 'value', 475 | 'save_other_choice' => 0, 476 | ), 477 | ), 478 | 'location' => array( 479 | array( 480 | array( 481 | 'param' => 'block', 482 | 'operator' => '==', 483 | 'value' => 'acf/mtm-block-buttons', 484 | ), 485 | ), 486 | array( 487 | array( 488 | 'param' => 'block', 489 | 'operator' => '==', 490 | 'value' => 'acf/mtm-block-call-to-action', 491 | ), 492 | ), 493 | ), 494 | 'menu_order' => 0, 495 | 'position' => 'normal', 496 | 'style' => 'default', 497 | 'label_placement' => 'top', 498 | 'instruction_placement' => 'label', 499 | 'hide_on_screen' => '', 500 | 'active' => true, 501 | 'description' => '', 502 | )); 503 | 504 | endif; 505 | -------------------------------------------------------------------------------- /lib/mtm-acf-plugin-requirements.php: -------------------------------------------------------------------------------- 1 | 'Advanced Custom Fields Pro', // The plugin name. 38 | 'slug' => 'advanced-custom-fields-pro', // The plugin slug (typically the folder name). 39 | 'source' => WP_PLUGIN_DIR . '/advanced-custom-fields-pro', // The plugin source. 40 | 'required' => true, // If false, the plugin is only 'recommended' instead of required. 41 | 'force_activation' => true, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 42 | //'external_url' => 'http://www.advancedcustomfields.com/pro/', // If set, overrides default API URL and points to an external URL. 43 | ), 44 | 45 | // Include a plugin from the WordPress Plugin Repository. 46 | array( 47 | 'name' => 'Advanced Custom Fields: Widget Area Field', 48 | 'slug' => 'advanced-custom-fields-widget-area-field', 49 | 'required' => true, // If false, the plugin is only 'recommended' instead of required. 50 | 'force_activation' => true, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 51 | ), 52 | 53 | // Include a plugin from a GitHub repository in your theme. 54 | // This presumes that the plugin code is based in the root of the GitHub repository 55 | // and not in a subdirectory ('/src') of the repository. 56 | array( 57 | 'name' => 'ACF Taxonomy Chooser', 58 | 'slug' => 'acf-taxonomy-chooser', 59 | 'source' => 'https://github.com/marktimemedia/acf-term-and-taxonomy-chooser/archive/master.zip', 60 | 'required' => true, // If false, the plugin is only 'recommended' instead of required. 61 | 'force_activation' => true, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 62 | 'external_url' => 'https://github.com/marktimemedia/acf-term-and-taxonomy-chooser', // If set, overrides default API URL and points to an external URL. 63 | ), 64 | 65 | array( 66 | 'name' => 'ACF Post Type Selector', 67 | 'slug' => 'acf-post-type-selector', 68 | 'source' => 'https://github.com/TimPerry/acf-post-type-selector/archive/master.zip', 69 | 'required' => true, // If false, the plugin is only 'recommended' instead of required. 70 | 'force_activation' => true, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 71 | 'external_url' => 'https://github.com/TimPerry/acf-post-type-selector', // If set, overrides default API URL and points to an external URL. 72 | ), 73 | 74 | 75 | 76 | ); 77 | 78 | /* 79 | * Array of configuration settings. Amend each line as needed. 80 | * 81 | * TGMPA will start providing localized text strings soon. If you already have translations of our standard 82 | * strings available, please help us make TGMPA even better by giving us access to these translations or by 83 | * sending in a pull-request with .po file(s) with the translations. 84 | * 85 | * Only uncomment the strings in the config array if you want to customize the strings. 86 | */ 87 | $config = array( 88 | 'id' => 'mtm', // Unique ID for hashing notices for multiple instances of TGMPA. 89 | 'default_path' => '', // Default absolute path to bundled plugins. 90 | 'menu' => 'mtm-install-plugins', // Menu slug. 91 | 'parent_slug' => 'plugins.php', // Parent menu slug. 92 | 'capability' => 'activate_plugins', // Capability needed to view plugin install page, should be a capability associated with the parent menu used. 93 | 'has_notices' => true, // Show admin notices or not. 94 | 'dismissable' => false, // If false, a user cannot dismiss the nag message. 95 | 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag. 96 | 'is_automatic' => false, // Automatically activate plugins after installation or not. 97 | 'message' => '', // Message to output right before the plugins table. 98 | 99 | 100 | 'strings' => array( 101 | 'page_title' => __( 'Install Required Plugins', 'theme-slug' ), 102 | 'menu_title' => __( 'Install Plugins', 'theme-slug' ), 103 | 'installing' => __( 'Installing Plugin: %s', 'theme-slug' ), // %s = plugin name. 104 | 'oops' => __( 'Something went wrong with the plugin API.', 'theme-slug' ), 105 | 'notice_can_install_required' => _n_noop( 106 | 'This plugin requires the following plugin: %1$s.', 107 | 'This plugin requires the following plugins: %1$s.', 108 | 'theme-slug' 109 | ), // %1$s = plugin name(s). 110 | 'notice_can_install_recommended' => _n_noop( 111 | 'This plugin recommends the following plugin: %1$s.', 112 | 'This plugin recommends the following plugins: %1$s.', 113 | 'theme-slug' 114 | ), // %1$s = plugin name(s). 115 | // 'notice_cannot_install' => _n_noop( 116 | // 'Sorry, but you do not have the correct permissions to install the %1$s plugin.', 117 | // 'Sorry, but you do not have the correct permissions to install the %1$s plugins.', 118 | // 'theme-slug' 119 | // ), // %1$s = plugin name(s). 120 | // 'notice_ask_to_update' => _n_noop( 121 | // 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 122 | // 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.', 123 | // 'theme-slug' 124 | // ), // %1$s = plugin name(s). 125 | // 'notice_ask_to_update_maybe' => _n_noop( 126 | // 'There is an update available for: %1$s.', 127 | // 'There are updates available for the following plugins: %1$s.', 128 | // 'theme-slug' 129 | // ), // %1$s = plugin name(s). 130 | // 'notice_cannot_update' => _n_noop( 131 | // 'Sorry, but you do not have the correct permissions to update the %1$s plugin.', 132 | // 'Sorry, but you do not have the correct permissions to update the %1$s plugins.', 133 | // 'theme-slug' 134 | // ), // %1$s = plugin name(s). 135 | // 'notice_can_activate_required' => _n_noop( 136 | // 'The following required plugin is currently inactive: %1$s.', 137 | // 'The following required plugins are currently inactive: %1$s.', 138 | // 'theme-slug' 139 | // ), // %1$s = plugin name(s). 140 | // 'notice_can_activate_recommended' => _n_noop( 141 | // 'The following recommended plugin is currently inactive: %1$s.', 142 | // 'The following recommended plugins are currently inactive: %1$s.', 143 | // 'theme-slug' 144 | // ), // %1$s = plugin name(s). 145 | // 'notice_cannot_activate' => _n_noop( 146 | // 'Sorry, but you do not have the correct permissions to activate the %1$s plugin.', 147 | // 'Sorry, but you do not have the correct permissions to activate the %1$s plugins.', 148 | // 'theme-slug' 149 | // ), // %1$s = plugin name(s). 150 | // 'install_link' => _n_noop( 151 | // 'Begin installing plugin', 152 | // 'Begin installing plugins', 153 | // 'theme-slug' 154 | // ), 155 | // 'update_link' => _n_noop( 156 | // 'Begin updating plugin', 157 | // 'Begin updating plugins', 158 | // 'theme-slug' 159 | // ), 160 | // 'activate_link' => _n_noop( 161 | // 'Begin activating plugin', 162 | // 'Begin activating plugins', 163 | // 'theme-slug' 164 | // ), 165 | // 'return' => __( 'Return to Required Plugins Installer', 'theme-slug' ), 166 | // 'plugin_activated' => __( 'Plugin activated successfully.', 'theme-slug' ), 167 | // 'activated_successfully' => __( 'The following plugin was activated successfully:', 'theme-slug' ), 168 | // 'plugin_already_active' => __( 'No action taken. Plugin %1$s was already active.', 'theme-slug' ), // %1$s = plugin name(s). 169 | // 'plugin_needs_higher_version' => __( 'Plugin not activated. A higher version of %s is needed for this theme. Please update the plugin.', 'theme-slug' ), // %1$s = plugin name(s). 170 | // 'complete' => __( 'All plugins installed and activated successfully. %1$s', 'theme-slug' ), // %s = dashboard link. 171 | // 'contact_admin' => __( 'Please contact the administrator of this site for help.', 'tgmpa' ), 172 | 173 | // 'nag_type' => 'updated', // Determines admin notice type - can only be 'updated', 'update-nag' or 'error'. 174 | ), 175 | 176 | ); 177 | 178 | tgmpa( $plugins, $config ); 179 | } 180 | } 181 | -------------------------------------------------------------------------------- /lib/mtm-acf-plugin-templates.php: -------------------------------------------------------------------------------- 1 | '../templates/template-block-content.php', 23 | 'Single Scroll Template' => '../templates/template-single-scroll.php' 24 | ); 25 | 26 | foreach( $templates as $k => $v ) { 27 | 28 | $choices[ $v ] = $k; 29 | 30 | } 31 | 32 | return $choices; 33 | } 34 | 35 | // Updated to reflect post templates for 4.7 36 | 37 | add_filter('acf/location/rule_match/blocktemplates', 'acf_location_rules_match_blocktemplates', 10, 3); 38 | function acf_location_rules_match_blocktemplates( $match, $rule, $options ) 39 | { 40 | // bail early if not a post 41 | if( !isset( $options['post_id'] ) || !$options['post_id'] ) return false; 42 | 43 | // vars 44 | $templates = array(); 45 | $post_type = get_post_type( $options['post_id'] ); 46 | $page_template = (isset($options['page_template']) ? $options['page_template'] : null); 47 | 48 | 49 | // get templates (WP 4.7) 50 | if( acf_version_compare('wp', '>=', '4.7') ) { 51 | 52 | $templates = wp_get_theme()->get_post_templates(); 53 | 54 | } 55 | 56 | // 'page' is always a valid pt even if no templates exist in the theme 57 | // allows scenario where page_template = 'default' and no templates exist 58 | if( !isset($templates['page']) ) { 59 | 60 | $templates['page'] = array(); 61 | 62 | } 63 | 64 | // bail early if this post type does not allow for templates 65 | if( !isset($templates[ $post_type ]) ) return false; 66 | 67 | 68 | // get page template 69 | if( !$page_template ) { 70 | 71 | $page_template = get_post_meta( $options['post_id'], '_wp_page_template', true ); 72 | 73 | } 74 | 75 | // new post - no page template 76 | if( !$page_template ) $page_template = "default"; 77 | 78 | 79 | // match 80 | $match = ( $page_template === $rule['value'] ); 81 | 82 | 83 | // override for "all" 84 | if( $rule['value'] == 'all' ) $match = true; 85 | 86 | 87 | // reverse if 'not equal to' 88 | if( $rule['operator'] === '!=' ) { 89 | 90 | $match = !$match; 91 | 92 | } 93 | 94 | // return 95 | return $match; 96 | 97 | } 98 | -------------------------------------------------------------------------------- /lib/mtm-config.php: -------------------------------------------------------------------------------- 1 | '; 25 | } 26 | } 27 | } 28 | /** 29 | * Load footer on standard themes 30 | */ 31 | if (!function_exists( 'mtm_load_wrap_footer' ) ) { 32 | function mtm_load_wrap_footer() { 33 | 34 | if ( mtm_load_wrap() ) { 35 | echo ''; 36 | get_footer(); 37 | } 38 | } 39 | } 40 | 41 | /** 42 | * Add options page for this plugin to be able to enqueue our own stuff 43 | * 44 | */ 45 | 46 | if( !function_exists( 'mtm_plugin_options_page' ) ) { 47 | add_action('acf/init', 'mtm_plugin_options_page'); 48 | 49 | function mtm_plugin_options_page() { 50 | 51 | if( function_exists('acf_add_options_sub_page') ) { 52 | 53 | $option_page = acf_add_options_sub_page(array( 54 | 'page_title' => __('Page & Block Display Settings', 'mtm'), 55 | 'menu_title' => __('Display Settings', 'mtm'), 56 | 'menu_slug' => 'page-components-settings', 57 | 'parent_slug' => 'options-general.php' 58 | )); 59 | 60 | } 61 | } 62 | } 63 | 64 | 65 | /** 66 | * Remove the wpautop filter from the_content 67 | */ 68 | remove_filter( 'the_content', 'wpautop' ); 69 | add_filter( 'the_content', function ($content) { 70 | if (has_blocks()) { 71 | return $content; 72 | } 73 | return wpautop($content); 74 | }); 75 | -------------------------------------------------------------------------------- /lib/mtm-helpers.php: -------------------------------------------------------------------------------- 1 | get_template_part( $slug, $name ); 13 | } 14 | 15 | } 16 | 17 | 18 | /** 19 | * Post Type Query 20 | */ 21 | if( !function_exists( 'mtm_page_component_post_query' ) ) { 22 | function mtm_page_component_post_query( $posttype = 'post', $perpage = 3, $orderby = 'date', $order = 'DESC', $notin = 'sticky_posts' ) { 23 | return new WP_Query( array( 24 | 'post_type' => array( $posttype ), 25 | 'posts_per_page' => $perpage, 26 | 'orderby' => $orderby, 27 | 'order' => $order, 28 | 'post__not_in' => get_option( $notin ), 29 | ) 30 | ); 31 | } 32 | } 33 | 34 | /** 35 | * Post Type Query Paged 36 | */ 37 | if( !function_exists( 'mtm_page_component_post_query_paged' ) ) { 38 | function mtm_page_component_post_query_paged( $posttype = 'post', $perpage = 3, $orderby = 'date', $order = 'DESC', $notin = 'sticky_posts', $paged = 1 ) { 39 | return new WP_Query( array( 40 | 'post_type' => array( $posttype ), 41 | 'posts_per_page' => $perpage, 42 | 'orderby' => $orderby, 43 | 'order' => $order, 44 | 'post__not_in' => get_option( $notin ), 45 | 'paged' => $paged, 46 | ) 47 | ); 48 | } 49 | } 50 | 51 | 52 | /** 53 | * Taxonomy Query 54 | */ 55 | if( !function_exists( 'mtm_page_component_taxonomy_query' ) ) { 56 | function mtm_page_component_taxonomy_query( $taxonomy, $terms, $perpage = 3, $orderby = 'date', $order = 'DESC' ) { 57 | return new WP_Query( array( 58 | 'posts_per_page' => $perpage, 59 | 'orderby' => $orderby, 60 | 'order' => $order, 61 | 'tax_query' => array( 62 | array( 63 | 'taxonomy' => $taxonomy, 64 | 'field' => 'slug', 65 | 'terms' => $terms, 66 | ), 67 | ), 68 | ) 69 | ); 70 | } 71 | } 72 | 73 | /** 74 | * Taxonomy Query Paged 75 | */ 76 | if( !function_exists( 'mtm_page_component_taxonomy_query_paged' ) ) { 77 | function mtm_page_component_taxonomy_query_paged( $taxonomy, $terms, $perpage = 3, $orderby = 'date', $order = 'DESC', $paged = 1 ) { 78 | return new WP_Query( array( 79 | 'posts_per_page' => $perpage, 80 | 'orderby' => $orderby, 81 | 'order' => $order, 82 | 'tax_query' => array( 83 | array( 84 | 'taxonomy' => $taxonomy, 85 | 'field' => 'slug', 86 | 'terms' => $terms, 87 | ), 88 | ), 89 | 'paged' => $paged, 90 | ) 91 | ); 92 | } 93 | } 94 | 95 | /** 96 | * get taxonomy properties from Tax Term ID Field (when term is selected) 97 | */ 98 | if( !function_exists( 'mtm_acf_taxonomy_property' ) ) { 99 | function mtm_acf_taxonomy_property( $archivetype, $property ){ 100 | $taxid = get_field( 'mtm_' . $archivetype . '_archive_taxonomy' ); 101 | $taxterm = get_term( $taxid ); 102 | return $taxterm->$property; 103 | } 104 | } 105 | 106 | /** 107 | * return the slug/path to a taxonomy, as used in a URL, including parents 108 | * @todo it doesn't work if there's a custom rewrite such as in Settings -> Permalinks 109 | * @todo it only works for one level deep (parent) not grandparent, etc 110 | */ 111 | if( !function_exists( 'mtm_acf_taxonomy_path' ) ) { 112 | function mtm_acf_taxonomy_path( $archivetype ){ 113 | $taxid = get_field( 'mtm_' . $archivetype . '_archive_taxonomy' ); 114 | $taxterm = get_term( $taxid ); 115 | $parent = $taxterm->parent ? get_term( $taxterm->parent ) : false; 116 | return $path = $parent ? $parent->slug . '/' . $taxterm->slug : $taxterm->slug; 117 | } 118 | } 119 | 120 | /** 121 | * get taxonomy properties from Tax ID Sub-Field (when term is selected) 122 | */ 123 | if( !function_exists( 'mtm_acf_taxonomy_sub_property' ) ) { 124 | function mtm_acf_taxonomy_sub_property( $archivetype, $property ){ 125 | $taxid = get_sub_field( 'mtm_' . $archivetype . '_archive_taxonomy' ); 126 | $taxterm = get_term( $taxid ); 127 | return $taxterm->$property; 128 | } 129 | } 130 | 131 | /** 132 | * return the slug/path to a taxonomy, as used in a URL, including parents 133 | * @todo it doesn't work if there's a custom rewrite such as in Settings -> Permalinks 134 | * @todo it only works for one level deep (parent) not grandparent, etc 135 | */ 136 | if( !function_exists( 'mtm_acf_taxonomy_sub_path' ) ) { 137 | function mtm_acf_taxonomy_sub_path( $archivetype ){ 138 | $taxid = get_sub_field( 'mtm_' . $archivetype . '_archive_taxonomy' ); 139 | $taxterm = get_term( $taxid ); 140 | $parent = $taxterm->parent ? get_term( $taxterm->parent ) : false; 141 | return $path = $parent ? $parent->slug . '/' . $taxterm->slug : $taxterm->slug; 142 | } 143 | } 144 | 145 | /** 146 | * Taxonomy Query for Archive Field 147 | */ 148 | if( !function_exists( 'mtm_taxonomy_query' ) ) { 149 | function mtm_taxonomy_query( $archivetype, $display = 3, $orderby = 'date', $order = 'DESC' ) { 150 | 151 | $taxonomy = mtm_acf_taxonomy_property( $archivetype, 'taxonomy' ); 152 | $terms = mtm_acf_taxonomy_property( $archivetype, 'slug' ); 153 | 154 | if( get_field( 'mtm_' . $archivetype . '_archive_taxonomy_number' ) ) { 155 | $display = get_field( 'mtm_' . $archivetype . '_archive_taxonomy_number' ); 156 | } 157 | 158 | return mtm_page_component_taxonomy_query( $taxonomy, $terms, $display, $orderby, $order ); 159 | } 160 | } 161 | 162 | /** 163 | * Taxonomy Query for Sub Field 164 | */ 165 | if( !function_exists( 'mtm_taxonomy_query_sub' ) ) { 166 | function mtm_taxonomy_query_sub( $archivetype, $display = 3, $order = 'DESC', $orderby = 'date' ) { 167 | $taxonomy = mtm_acf_taxonomy_sub_property( $archivetype, 'taxonomy' ); 168 | $terms = mtm_acf_taxonomy_sub_property( $archivetype, 'slug' ); 169 | 170 | if( get_sub_field( 'mtm_' . $archivetype . '_archive_taxonomy_number' ) ) { 171 | $display = get_sub_field( 'mtm_' . $archivetype . '_archive_taxonomy_number' ); 172 | } 173 | 174 | return mtm_page_component_taxonomy_query( $taxonomy, $terms, $display, $orderby, $order ); 175 | } 176 | } 177 | 178 | /** 179 | * Taxonomy Query for Sub Field 180 | */ 181 | if( !function_exists( 'mtm_taxonomy_query_sub_paged' ) ) { 182 | function mtm_taxonomy_query_sub_paged( $archivetype, $display = 3, $order = 'DESC', $orderby = 'date', $paged) { 183 | $taxonomy = mtm_acf_taxonomy_sub_property( $archivetype, 'taxonomy' ); 184 | $terms = mtm_acf_taxonomy_sub_property( $archivetype, 'slug' ); 185 | 186 | if( get_sub_field( 'mtm_' . $archivetype . '_archive_taxonomy_number' ) ) { 187 | $display = get_sub_field( 'mtm_' . $archivetype . '_archive_taxonomy_number' ); 188 | } 189 | 190 | return mtm_page_component_taxonomy_query_paged( $taxonomy, $terms, $display, $orderby, $order, $paged ); 191 | } 192 | } 193 | 194 | /** 195 | * Term Links From Defined Taxonomy 196 | */ 197 | if( !function_exists( 'mtm_terms_from_taxonomy_links' ) ) { 198 | function mtm_terms_from_taxonomy_links( $tax = '' ){ 199 | 200 | $terms = get_terms( $tax ); 201 | 202 | if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) { 203 | $count = count( $terms ); 204 | $i = 0; 205 | $term_list = ''; 214 | } 215 | } 216 | echo $term_list; 217 | } 218 | } 219 | } 220 | 221 | /** 222 | * Get Property from ACF Image Object 223 | */ 224 | if( !function_exists( 'mtm_acf_image_property' ) ) { 225 | function mtm_acf_image_property( $field = '', $property = '' ) { 226 | 227 | if( _get_field( $field ) ) { 228 | $image = get_field( $field ); 229 | 230 | return $image[ $property ]; 231 | } 232 | } 233 | } 234 | 235 | /** 236 | * Get Property from ACF Sub Image Object 237 | */ 238 | if( !function_exists( 'mtm_acf_sub_image_property' ) ) { 239 | function mtm_acf_sub_image_property( $field = '', $property = '' ) { 240 | 241 | if( get_sub_field( $field ) ) { 242 | $image = get_sub_field( $field ); 243 | 244 | return $image[ $property ]; 245 | } 246 | } 247 | } 248 | 249 | /** 250 | * Count number of widgets in a sidebar 251 | * Used to add classes to widget areas so widgets can be displayed one, two, three or four per row 252 | * @see https://gist.github.com/slobodan/6156076 253 | */ 254 | if( !function_exists( 'slbd_count_widgets' ) ) { 255 | function slbd_count_widgets( $sidebar_id ) { 256 | // If loading from front page, consult $_wp_sidebars_widgets rather than options 257 | // to see if wp_convert_widget_settings() has made manipulations in memory. 258 | global $_wp_sidebars_widgets; 259 | if ( empty( $_wp_sidebars_widgets ) ) : 260 | $_wp_sidebars_widgets = get_option( 'sidebars_widgets', array() ); 261 | endif; 262 | 263 | $sidebars_widgets_count = $_wp_sidebars_widgets; 264 | 265 | if ( isset( $sidebars_widgets_count[ $sidebar_id ] ) ) : 266 | $widget_count = count( $sidebars_widgets_count[ $sidebar_id ] ); 267 | $widget_classes = 'widget-count-' . count( $sidebars_widgets_count[ $sidebar_id ] ); 268 | if ( $widget_count % 4 == 0 || $widget_count > 6 ) : 269 | // Four widgets per row if there are exactly four or more than six 270 | $widget_classes .= ' mtm-per-row-4'; 271 | elseif ( $widget_count >= 3 ) : 272 | // Three widgets per row if there's three or more widgets 273 | $widget_classes .= ' mtm-per-row-3'; 274 | elseif ( 2 == $widget_count ) : 275 | // Otherwise show two widgets per row 276 | $widget_classes .= ' mtm-per-row-2'; 277 | endif; 278 | return $widget_classes; 279 | endif; 280 | } 281 | } 282 | 283 | /** 284 | * Add count class 285 | */ 286 | if( !function_exists( 'mtm_count_classes' ) ) { 287 | function mtm_count_classes( $count = 1 ) { 288 | $item_count = $count; 289 | $item_classes = ''; 290 | 291 | if( 6 == $item_count || $item_count >= 11 ) : 292 | // Six items per row if there's six or greater/equal to 10 items 293 | $item_classes = 'mtm-per-row-6'; 294 | elseif ( 5 == $item_count || $item_count == 10 ) : 295 | // Three items per row if there's 5 or 8 items 296 | $item_classes = 'mtm-per-row-5'; 297 | elseif ( 4 == $item_count || $item_count >= 7 && $item_count <= 8 ) : 298 | // Four items per row if there's 4, 7, or 8 items 299 | $item_classes = 'mtm-per-row-4'; 300 | elseif ( 3 == $item_count || $item_count == 9 ) : 301 | // Three items per row if there's three or nine items 302 | $item_classes = 'mtm-per-row-3'; 303 | elseif ( 2 == $item_count ) : 304 | // Otherwise show two widgets per row 305 | $item_classes = 'mtm-per-row-2'; 306 | endif; 307 | return $item_classes; 308 | } 309 | } 310 | 311 | /** 312 | * Output a per-row class based on how many admin picked 313 | */ 314 | if( !function_exists( 'mtm_output_row_number' ) ) { 315 | function mtm_output_row_number( $num = 3, $field = 'mtm_grid_archive_per_row' ) { 316 | 317 | if( get_sub_field( $field ) ) { 318 | 319 | $num = get_sub_field( $field ); 320 | 321 | } elseif( get_field( $field ) ) { 322 | 323 | $num = get_field( $field ); 324 | } 325 | 326 | return 'mtm-per-row-' . $num; 327 | } 328 | } 329 | 330 | /** 331 | * output either content url or custom url 332 | */ 333 | if( !function_exists( 'mtm_output_url_override_sub' ) ) { 334 | function mtm_output_url_override_sub( $field1 ='' , $field2 = 'mtm_post_content_link' ) { 335 | 336 | if ( _get_sub_field( $field1 ) ) { 337 | 338 | $url = _get_sub_field( $field1 ); 339 | 340 | } elseif ( _get_sub_field( $field2 ) ) { 341 | 342 | $url = _get_sub_field( $field2 ); 343 | 344 | } else { 345 | 346 | $url = ''; 347 | } 348 | 349 | return $url; 350 | } 351 | } 352 | 353 | /* 354 | * Output file from custom field 355 | */ 356 | if( !function_exists( 'mtm_output_file_link' ) ) { 357 | function mtm_output_file_link( $file_field = '', $label_field = '', $prefix = 'fal fa-file fa-file', $showsize = true ) { 358 | $file = $file_field; 359 | $text = $label_field ? : 'Download: ' . $file['title']; 360 | $mime = wp_check_filetype( $file[ 'filename' ] )['ext'] ? '-' . wp_check_filetype( $file[ 'filename' ] )['ext'] : ''; 361 | $file_type = $prefix . $mime; 362 | $path_info = pathinfo( $file[ 'url' ] ); 363 | $filesize = $showsize ? wp_prepare_attachment_for_js( $file['id'] )['filesizeHumanReadable'] . ' ' : ''; 364 | 365 | echo ' ' . esc_html( $text ) . ' (' . esc_html($filesize) . esc_html( $path_info['extension'] ) . ') ' . ''; 366 | } 367 | } 368 | 369 | /** 370 | * Check if user has any posts in any post type 371 | * $post_types must be an array 372 | */ 373 | if( !function_exists( 'mtm_check_all_user_posts' ) ) { 374 | function mtm_check_all_user_posts( $userid = '', $post_types = array('post') ) { 375 | $count = 0; 376 | foreach( $post_types as $type ) { 377 | $count+= count_user_posts( $userid, $type ); 378 | } 379 | return $count; 380 | } 381 | } 382 | 383 | 384 | /** 385 | * Outputs the post thumbnail with fallback for the first inline image, then the default image 386 | */ 387 | if( !function_exists( 'the_mtm_post_thumbnail_inline' ) ) { 388 | function the_mtm_post_thumbnail_inline( $post_ID = '', $size = 'full', $class = '', $link = true, $attr ='' ) { 389 | $attachments = get_children( 'post_parent='. $post_ID .'&post_type=attachment&post_mime_type=image' ); 390 | $linkOpen = $link ? '':''; 392 | if ( false !== mtm_acf_check() ) : 393 | if ( has_post_thumbnail() ) : // is there a post thumbnail? 394 | echo $linkOpen . '
'. get_the_post_thumbnail( $post_ID, $size, $attr ) . '
' . $linkClose; 395 | elseif ( $attachments ) : // is there an inline image? 396 | $keys = array_reverse( array_keys ( $attachments ) ); 397 | $image = wp_get_attachment_image( $keys[0], $size, true ); 398 | echo $linkOpen . '
' . $image . '
' . $linkClose; 399 | elseif ( get_field( 'mtm_default_featured_image', 'option' ) ) : // make sure field value exists 400 | $image = get_field( 'mtm_default_featured_image', 'option' ); 401 | $thumb = $image['sizes'][ $size ]; 402 | $alt = $image['alt']; 403 | echo $linkOpen . '
' . esc_html( $alt ) . '
' . $linkClose; 404 | endif; 405 | endif; 406 | } 407 | }; 408 | 409 | /** 410 | * Outputs the color class (background or regular) from a given color field 411 | */ 412 | if ( !function_exists( 'mtm_color_picker_class' ) ) { 413 | function mtm_color_picker_class( $color_field = '', $sub = false, $background = false ) { 414 | // Get ACF Values from color picker 415 | $mtm_acf_color_picker_values = $sub ? get_sub_field( $color_field ) : get_field( $color_field ); 416 | 417 | // Set array of color classes (for block editor) and hex codes (from ACF) 418 | $mtm_block_colors = apply_filters( 'mtm_block_colors_filter', array( 419 | // Change these to match your color class (gutenberg) and hex codes (acf) 420 | "spring-color-1" => "#de1e7e", 421 | "spring-color-2" => "#10aded", 422 | "spring-color-3" => "#10ca7e", 423 | "spring-color-4" => "#9155ed", 424 | "white" => "#ffffff", 425 | "neutral-lightest" => "#f4f2f3", 426 | "neutral-lighter" => "#d4ccd4", 427 | "neutral-light" => "#afa8af", 428 | "neutral-mid" => "#948b90", 429 | "neutral-dark" => "#635d61", 430 | "neutral-darker" => "#464144", 431 | "neutral-darkest" => "#322e2f", 432 | )); 433 | $mtm_color_class = null; 434 | 435 | if ( $mtm_acf_color_picker_values ) { 436 | // Loop over colors array and set proper class if background color selection matches value 437 | foreach( $mtm_block_colors as $key => $value ) { 438 | if( $mtm_acf_color_picker_values == $value ) { 439 | $mtm_color_class = $key; 440 | } 441 | } 442 | } 443 | if( $mtm_color_class ) { 444 | $mtm_color_class_output = $background ? 'has-custom-background-color has-'. $mtm_color_class . '-background-color' : 'has-custom-color has-'. $mtm_color_class . '-color'; 445 | } elseif( $mtm_acf_color_picker_values ) { 446 | $mtm_color_class_output = $background ? 'has-custom-background-color' : 'has-custom-color'; 447 | } else { 448 | $mtm_color_class_output = $background ? 'has-no-background-color' : 'has-no-color'; 449 | } 450 | return $mtm_color_class_output; 451 | } 452 | } 453 | -------------------------------------------------------------------------------- /mtm-block-components.php: -------------------------------------------------------------------------------- 1 | 63 | -------------------------------------------------------------------------------- /mtm-style.css: -------------------------------------------------------------------------------- 1 | /* 01. SETTINGS */ 2 | /* 02. TOOLS */ 3 | * { 4 | box-sizing: border-box; } 5 | 6 | /** 7 | * PINK GRID 8 | * Sass Width Percentage Generator 9 | * 10 | * $align: Vertical-align property Defaults to Top 11 | * $totalcols: Number of columns in your grid ( ex: 12 ) Defaults to $defaultcols 12 | * $colspan: Number of columns your item spans ( ex: 3 / 12 ) Defaults to $defaultcols (100% width) 13 | * $padside: Percentage padding left/right of each item. Defaults to $defaultpad 14 | * $padtop: Percentage padding above/below around each item. Defaults to 0 15 | */ 16 | /** 17 | * PINK ROW 18 | * Sass Row Item Generator 19 | * Built in conjunction with Pink Grid 20 | * 21 | * $rowitems: Number of items per row ( ex. 4 ) Defaults to 1 22 | * $before: Alternating row layouts: elements before this row Defaults to 0 23 | * $after: Alternating row layouts: elements after this row Defaults to 0 24 | */ 25 | /** 26 | * PINK GRID ROW 27 | * Generate evenly sized and evenly spaced row items 28 | * Like Magic Grid but without the automatic media queries 29 | * 30 | * $align: Vertical-align property Defaults to Top 31 | * $rowitems: Number of items per row ( ex. 4 ) Defaults to 1 32 | * $before: Alternating row layouts: elements before this row Defaults to 0 33 | * $after: Alternating row layouts: elements after this row Defaults to 0 34 | * $padside: Percentage padding left/right of each item. Defaults to $defaultpad 35 | * $padtop: Percentage padding above/below around each item. Defaults to 0 36 | */ 37 | /** 38 | * PINK MAGIC ROW 39 | * Complete responsive grid solution for equally sized items per row. 40 | * Includes a space to define your media query breakpoints (based on min-width) 41 | * 42 | * $rowitems: Number of items per row ( ex. 4 ) Defaults to 1 43 | * $padside: Padding to the left/right of each item Defaults to $magicside 44 | * $padtop: Padding above/below around each item. Defaults to $magictop 45 | * $align Vertical-align property Defaults to Top 46 | * $before: Alternating row layouts: elements before this row Defaults to 0 47 | * $after: Alternating row layouts: elements after this row Defaults to 0 48 | */ 49 | /* 03. OBJECTS */ 50 | /* Some General Resets */ 51 | *, *:before, *:after { 52 | box-sizing: border-box; } 53 | 54 | /* General Panel Rules */ 55 | .mtm-per-row-2 { 56 | display: inline-block; 57 | vertical-align: top; 58 | margin-right: -0.275em; 59 | width: 100%; 60 | padding: 1em 0; } 61 | @media only screen and (min-width: 30em) { 62 | .mtm-per-row-2 { 63 | width: 52%; 64 | padding-right: 4%; } 65 | .mtm-per-row-2:nth-of-type(2n+2) { 66 | padding-right: 0; 67 | width: 48%; } } 68 | 69 | .mtm-per-row-3 { 70 | display: inline-block; 71 | vertical-align: top; 72 | margin-right: -0.275em; 73 | width: 100%; 74 | padding: 1em 0; } 75 | @media only screen and (min-width: 30em) and (max-width: 45em) { 76 | .mtm-per-row-3 { 77 | width: 52%; 78 | padding-right: 4%; } 79 | .mtm-per-row-3:nth-of-type(2n+2) { 80 | padding-right: 0; 81 | width: 48%; } } 82 | @media only screen and (min-width: 45em) { 83 | .mtm-per-row-3 { 84 | width: 34.6666666667%; 85 | padding-right: 4%; } 86 | .mtm-per-row-3:nth-of-type(3n+3) { 87 | padding-right: 0; 88 | width: 30.6666666667%; } } 89 | 90 | .mtm-per-row-4 { 91 | display: inline-block; 92 | vertical-align: top; 93 | margin-right: -0.275em; 94 | width: 100%; 95 | padding: 1em 0; } 96 | @media only screen and (min-width: 30em) and (max-width: 61em) { 97 | .mtm-per-row-4 { 98 | width: 52%; 99 | padding-right: 4%; } 100 | .mtm-per-row-4:nth-of-type(2n+2) { 101 | padding-right: 0; 102 | width: 48%; } } 103 | @media only screen and (min-width: 61em) { 104 | .mtm-per-row-4 { 105 | width: 26%; 106 | padding-right: 4%; } 107 | .mtm-per-row-4:nth-of-type(4n+4) { 108 | padding-right: 0; 109 | width: 22%; } } 110 | 111 | .mtm-per-row-5 { 112 | display: inline-block; 113 | vertical-align: top; 114 | margin-right: -0.275em; 115 | width: 100%; 116 | padding: 1em 0; } 117 | @media only screen and (min-width: 30em) and (max-width: 61em) { 118 | .mtm-per-row-5 { 119 | width: 34.6666666667%; 120 | padding-right: 4%; } 121 | .mtm-per-row-5:nth-of-type(3n+3) { 122 | padding-right: 0; 123 | width: 30.6666666667%; } } 124 | @media only screen and (min-width: 61em) { 125 | .mtm-per-row-5 { 126 | width: 20.8%; 127 | padding-right: 4%; } 128 | .mtm-per-row-5:nth-of-type(5n+5) { 129 | padding-right: 0; 130 | width: 16.8%; } } 131 | 132 | .mtm-per-row-6 { 133 | display: inline-block; 134 | vertical-align: top; 135 | margin-right: -0.275em; 136 | width: 100%; 137 | padding: 1em 0; } 138 | @media only screen and (min-width: 30em) and (max-width: 61em) { 139 | .mtm-per-row-6 { 140 | width: 34.6666666667%; 141 | padding-right: 4%; } 142 | .mtm-per-row-6:nth-of-type(3n+3) { 143 | padding-right: 0; 144 | width: 30.6666666667%; } } 145 | @media only screen and (min-width: 61em) { 146 | .mtm-per-row-6 { 147 | width: 17.3333333333%; 148 | padding-right: 4%; } 149 | .mtm-per-row-6:nth-of-type(6n+6) { 150 | padding-right: 0; 151 | width: 13.3333333333%; } } 152 | 153 | .mtm-per-row-7 { 154 | display: inline-block; 155 | vertical-align: top; 156 | margin-right: -0.275em; 157 | width: 100%; 158 | padding: 1em 0; } 159 | @media only screen and (min-width: 30em) and (max-width: 45em) { 160 | .mtm-per-row-7 { 161 | width: 51.5%; 162 | padding-right: 3%; } 163 | .mtm-per-row-7:nth-of-type(2n+2) { 164 | padding-right: 0; 165 | width: 48.5%; } } 166 | @media only screen and (min-width: 45em) and (max-width: 61em) { 167 | .mtm-per-row-7 { 168 | width: 25.75%; 169 | padding-right: 3%; } 170 | .mtm-per-row-7:nth-of-type(4n+4) { 171 | padding-right: 0; 172 | width: 22.75%; } } 173 | @media only screen and (min-width: 61em) { 174 | .mtm-per-row-7 { 175 | width: 14.7142857143%; 176 | padding-right: 3%; } 177 | .mtm-per-row-7:nth-of-type(7n+7) { 178 | padding-right: 0; 179 | width: 11.7142857143%; } } 180 | 181 | .mtm-per-row-8 { 182 | display: inline-block; 183 | vertical-align: top; 184 | margin-right: -0.275em; 185 | width: 100%; 186 | padding: 1em 0; } 187 | @media only screen and (min-width: 30em) and (max-width: 45em) { 188 | .mtm-per-row-8 { 189 | width: 51.5%; 190 | padding-right: 3%; } 191 | .mtm-per-row-8:nth-of-type(2n+2) { 192 | padding-right: 0; 193 | width: 48.5%; } } 194 | @media only screen and (min-width: 45em) and (max-width: 61em) { 195 | .mtm-per-row-8 { 196 | width: 25.75%; 197 | padding-right: 3%; } 198 | .mtm-per-row-8:nth-of-type(4n+4) { 199 | padding-right: 0; 200 | width: 22.75%; } } 201 | @media only screen and (min-width: 61em) { 202 | .mtm-per-row-8 { 203 | width: 12.875%; 204 | padding-right: 3%; } 205 | .mtm-per-row-8:nth-of-type(8n+8) { 206 | padding-right: 0; 207 | width: 9.875%; } } 208 | 209 | .mtm-per-row-9 { 210 | display: inline-block; 211 | vertical-align: top; 212 | margin-right: -0.275em; 213 | width: 100%; 214 | padding: 1em 0; } 215 | @media only screen and (min-width: 30em) and (max-width: 45em) { 216 | .mtm-per-row-9 { 217 | width: 34.3333333333%; 218 | padding-right: 3%; } 219 | .mtm-per-row-9:nth-of-type(3n+3) { 220 | padding-right: 0; 221 | width: 31.3333333333%; } } 222 | @media only screen and (min-width: 45em) and (max-width: 61em) { 223 | .mtm-per-row-9 { 224 | width: 20.6%; 225 | padding-right: 3%; } 226 | .mtm-per-row-9:nth-of-type(5n+5) { 227 | padding-right: 0; 228 | width: 17.6%; } } 229 | @media only screen and (min-width: 61em) { 230 | .mtm-per-row-9 { 231 | width: 11.4444444444%; 232 | padding-right: 3%; } 233 | .mtm-per-row-9:nth-of-type(9n+9) { 234 | padding-right: 0; 235 | width: 8.4444444444%; } } 236 | 237 | .mtm-per-row-10 { 238 | display: inline-block; 239 | vertical-align: top; 240 | margin-right: -0.275em; 241 | width: 100%; 242 | padding: 1em 0; } 243 | @media only screen and (min-width: 30em) and (max-width: 45em) { 244 | .mtm-per-row-10 { 245 | width: 51.5%; 246 | padding-right: 3%; } 247 | .mtm-per-row-10:nth-of-type(2n+2) { 248 | padding-right: 0; 249 | width: 48.5%; } } 250 | @media only screen and (min-width: 45em) and (max-width: 61em) { 251 | .mtm-per-row-10 { 252 | width: 34.3333333333%; 253 | padding-right: 3%; } 254 | .mtm-per-row-10:nth-of-type(3n+3) { 255 | padding-right: 0; 256 | width: 31.3333333333%; } } 257 | @media only screen and (min-width: 61em) and (max-width: 75em) { 258 | .mtm-per-row-10 { 259 | width: 20.6%; 260 | padding-right: 3%; } 261 | .mtm-per-row-10:nth-of-type(5n+5) { 262 | padding-right: 0; 263 | width: 17.6%; } } 264 | @media only screen and (min-width: 75em) { 265 | .mtm-per-row-10 { 266 | width: 10.3%; 267 | padding-right: 3%; } 268 | .mtm-per-row-10:nth-of-type(10n+10) { 269 | padding-right: 0; 270 | width: 7.3%; } } 271 | 272 | .mtm-per-row-11 { 273 | display: inline-block; 274 | vertical-align: top; 275 | margin-right: -0.275em; 276 | width: 100%; 277 | padding: 1em 0; } 278 | @media only screen and (min-width: 30em) and (max-width: 45em) { 279 | .mtm-per-row-11 { 280 | width: 51.5%; 281 | padding-right: 3%; } 282 | .mtm-per-row-11:nth-of-type(2n+2) { 283 | padding-right: 0; 284 | width: 48.5%; } } 285 | @media only screen and (min-width: 45em) and (max-width: 61em) { 286 | .mtm-per-row-11 { 287 | width: 34.3333333333%; 288 | padding-right: 3%; } 289 | .mtm-per-row-11:nth-of-type(3n+3) { 290 | padding-right: 0; 291 | width: 31.3333333333%; } } 292 | @media only screen and (min-width: 61em) and (max-width: 75em) { 293 | .mtm-per-row-11 { 294 | width: 17.1666666667%; 295 | padding-right: 3%; } 296 | .mtm-per-row-11:nth-of-type(6n+6) { 297 | padding-right: 0; 298 | width: 14.1666666667%; } } 299 | @media only screen and (min-width: 75em) { 300 | .mtm-per-row-11 { 301 | width: 9.3636363636%; 302 | padding-right: 3%; } 303 | .mtm-per-row-11:nth-of-type(11n+11) { 304 | padding-right: 0; 305 | width: 6.3636363636%; } } 306 | 307 | .mtm-per-row-12 { 308 | display: inline-block; 309 | vertical-align: top; 310 | margin-right: -0.275em; 311 | width: 100%; 312 | padding: 1em 0; } 313 | @media only screen and (min-width: 30em) and (max-width: 45em) { 314 | .mtm-per-row-12 { 315 | width: 51.5%; 316 | padding-right: 3%; } 317 | .mtm-per-row-12:nth-of-type(2n+2) { 318 | padding-right: 0; 319 | width: 48.5%; } } 320 | @media only screen and (min-width: 45em) and (max-width: 61em) { 321 | .mtm-per-row-12 { 322 | width: 34.3333333333%; 323 | padding-right: 3%; } 324 | .mtm-per-row-12:nth-of-type(3n+3) { 325 | padding-right: 0; 326 | width: 31.3333333333%; } } 327 | @media only screen and (min-width: 61em) and (max-width: 75em) { 328 | .mtm-per-row-12 { 329 | width: 17.1666666667%; 330 | padding-right: 3%; } 331 | .mtm-per-row-12:nth-of-type(6n+6) { 332 | padding-right: 0; 333 | width: 14.1666666667%; } } 334 | @media only screen and (min-width: 75em) { 335 | .mtm-per-row-12 { 336 | width: 8.5833333333%; 337 | padding-right: 3%; } 338 | .mtm-per-row-12:nth-of-type(12n+12) { 339 | padding-right: 0; 340 | width: 5.5833333333%; } } 341 | 342 | /* Layout General */ 343 | .alignright, 344 | .alignleft, 345 | .aligncenter { 346 | display: block; 347 | max-width: 100%; } 348 | 349 | .content--inner { 350 | margin: 0 auto; } 351 | 352 | .alignfull .content--inner, .alignwide .content--inner { 353 | padding-left: 2rem; 354 | padding-right: 2rem; } 355 | 356 | /* Buttons General */ 357 | .button.button-xs { 358 | font-size: .75em !important; 359 | line-height: .75em !important; 360 | padding: .4em .75em !important; } 361 | 362 | .button.button-sm { 363 | font-size: .9em !important; 364 | line-height: .9em !important; 365 | padding: .375em .75em !important; } 366 | 367 | .button.button-med { 368 | font-size: 1em !important; 369 | line-height: 1em !important; 370 | padding: .375em, .75em !important; } 371 | 372 | .button.button-lg { 373 | font-size: 1.4em !important; 374 | line-height: 1em !important; 375 | padding: .5em, 1em !important; } 376 | 377 | .button.button-xl { 378 | font-size: 1.6em !important; 379 | line-height: 1em !important; 380 | padding: .875em 1.75em !important; } 381 | 382 | @media only screen and (min-width: 30em) { 383 | .alignright { 384 | float: right !important; 385 | margin-left: 1rem !important; } 386 | 387 | .alignleft { 388 | float: left !important; 389 | margin-right: 1rem !important; } 390 | 391 | .aligncenter { 392 | display: block; 393 | margin-left: auto; 394 | margin-right: auto; 395 | clear: both; 396 | text-align: center; } } 397 | @media only screen and (min-width: 45em) { 398 | .alignfull .content--inner, .alignwide .content--inner { 399 | padding-left: 3rem; 400 | padding-right: 3rem; } } 401 | /* 06. COMPONENTS */ 402 | /* General Panel Rules */ 403 | .mtm-component { 404 | margin-top: -2rem; 405 | padding-top: 2rem; 406 | position: relative; } 407 | .mtm-component .content--page { 408 | padding: 1rem; } 409 | .mtm-component img { 410 | max-width: 100%; 411 | height: auto; } 412 | 413 | .mtm-component--main-full { 414 | overflow: auto; 415 | position: relative; } 416 | 417 | .mtm-component--home { 418 | background-size: cover; 419 | margin-top: 0; 420 | padding-top: 0; 421 | text-align: center; } 422 | 423 | .mtm-component--term-list { 424 | padding: 1em 0; 425 | margin: 0; } 426 | .mtm-component--term-list li { 427 | list-style: none; 428 | display: inline-block; } 429 | .mtm-component--term-list a { 430 | padding-right: .5em; } 431 | 432 | /* Module Rules */ 433 | .mtm-module { 434 | padding-bottom: 1rem; 435 | padding-top: 1rem; 436 | overflow: auto; } 437 | 438 | .has-no-background-color .mtm-module-title { 439 | margin-top: 1em; } 440 | 441 | .mtm-module--hero-title { 442 | margin: .75em auto; } 443 | 444 | .mtm-module--hero-subtitle { 445 | margin-bottom: .75em; } 446 | 447 | .mtm-hero-image, .wp-block-cover { 448 | padding: 2em; 449 | background-size: cover; 450 | background-position: center center; 451 | text-align: center; } 452 | 453 | .mtm-hero-image-title, .mtm-hero-image-subtitle p, .mtm-module--slider-title, .mtm-module--slider-subtitle p { 454 | color: #fff; } 455 | 456 | .mtm-module--slider-slide { 457 | background-size: cover; 458 | background-position: center center; 459 | text-align: center; } 460 | .mtm-module--slider-slide > p, .mtm-module--slider-slide a > p { 461 | display: none; } 462 | 463 | .mtm-module--slider-link { 464 | display: block; 465 | padding: 2em; } 466 | 467 | .mtm-module--slider-content { 468 | padding: 0 2em; } 469 | 470 | .flex-control-nav { 471 | z-index: 2; } 472 | 473 | .mtm-logo-grid { 474 | vertical-align: middle; 475 | text-align: center; } 476 | 477 | .mtm_module_single_content_area .mtm-module--content-heading, .mtm_module_single_content_area .mtm-module--content-primary { 478 | margin-left: auto; 479 | margin-right: auto; 480 | max-width: 80em; } 481 | 482 | .mtm-module--content-secondary-image { 483 | padding: 1rem; } 484 | .mtm-module--content-secondary-image .mtm-module--content-secondary-wrapper { 485 | background-color: rgba(0, 0, 0, 0.5); 486 | color: #fff; 487 | padding: 1rem; } 488 | 489 | .mtm_module_call_to_action { 490 | padding: 1rem; 491 | background: #eee; 492 | overflow: auto; } 493 | .mtm_module_call_to_action .alignright, .mtm_module_call_to_action .alignleft, .mtm_module_call_to_action .aligncenter { 494 | margin-bottom: 0; } 495 | 496 | .mtm-module--gallery { 497 | display: flex; 498 | flex-flow: row wrap; 499 | list-style: none; 500 | margin: 1em 0; 501 | padding: 0; } 502 | .mtm-module--gallery > p, .mtm-module--gallery a > p { 503 | display: none; } 504 | @supports (display: grid) { 505 | .mtm-module--gallery { 506 | display: grid; 507 | grid-auto-rows: minmax(20vh, 250px); 508 | grid-gap: 0.2em; 509 | grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); } } 510 | .mtm-module--gallery a { 511 | flex: 1 0 auto; 512 | min-height: 250px; 513 | min-width: 250px; 514 | margin: 0.1em; } 515 | @supports (display: grid) { 516 | .mtm-module--gallery a { 517 | margin: 0; } } 518 | 519 | .mtm-module--gallery-image { 520 | height: 100%; 521 | line-height: 1; 522 | margin: 0; 523 | overflow: hidden; 524 | position: relative; 525 | width: 100%; } 526 | .mtm-module--gallery-image figure { 527 | background-size: cover; 528 | background-position: center center; 529 | height: 100%; 530 | -webkit-transition: all .5s; 531 | transition: all .5s; 532 | width: 100%; } 533 | .mtm-module--gallery-image figure:hover, .mtm-module--gallery-image figure:focus { 534 | transform: scale(1.2); } 535 | 536 | .mtm-module--gallery-caption { 537 | background-color: rgba(0, 0, 0, 0.3); 538 | bottom: 0; 539 | color: #fff; 540 | margin: 0; 541 | padding: .25em; 542 | position: absolute; 543 | width: 100%; } 544 | 545 | /* Home Rules */ 546 | .mtm-home-news--content, .mtm-home-featured--story { 547 | text-align: left; } 548 | 549 | .mtm-home-featured--single, .mtm-home-topic--single { 550 | margin-bottom: 2%; } 551 | 552 | .mtm-home-sidebar--widget { 553 | display: none; } 554 | 555 | /* Button Rules */ 556 | .mtm-home-buttons { 557 | margin-bottom: 1em; } 558 | .mtm-home-buttons.alignleft { 559 | margin-left: -.5em; } 560 | .mtm-home-buttons.alignright { 561 | margin-right: -.5em; } 562 | 563 | .button.mtm-button { 564 | display: inline-block; 565 | margin: .5em; } 566 | 567 | .post-edit-link { 568 | font-size: .7em; } 569 | 570 | /* List Rules */ 571 | .mtm-list--single { 572 | margin: 1em 0; } 573 | 574 | .mtm-list--image { 575 | width: 100%; } 576 | 577 | .mtm-list--post-content { 578 | width: 100%; } 579 | 580 | /* Tab Rules */ 581 | .mtm-tabs--wrapper { 582 | border-bottom: 1px solid #eee; 583 | clear: both; 584 | margin: 1em 0; } 585 | .mtm-tabs--wrapper .mtm-tabs--title-container { 586 | display: none; 587 | list-style: none; 588 | margin: 0; 589 | padding: 0; } 590 | .mtm-tabs--wrapper button.mtm-tabs--title, .mtm-tabs--wrapper .mtm-tabs--title { 591 | background-color: transparent; 592 | border: 0; 593 | color: #aaa; 594 | cursor: pointer; 595 | padding: .2em 0; } 596 | .mtm-tabs--wrapper button.mtm-tabs--title:hover, .mtm-tabs--wrapper button.mtm-tabs--title:focus, .mtm-tabs--wrapper .mtm-tabs--title:hover, .mtm-tabs--wrapper .mtm-tabs--title:focus { 597 | background-color: transparent; 598 | color: #000; } 599 | .mtm-tabs--wrapper button.mtm-tabs--title.current, .mtm-tabs--wrapper .mtm-tabs--title.current { 600 | color: #000; 601 | font-weight: bold; } 602 | .mtm-tabs--wrapper button.mtm-tabs--title-accordion, .mtm-tabs--wrapper .mtm-tabs--title-accordion { 603 | background-color: transparent; 604 | border: 0; 605 | border-top: 1px solid #eee; 606 | color: #aaa; 607 | display: block; 608 | width: 100%; } 609 | .mtm-tabs--wrapper button.mtm-tabs--title-accordion:hover, .mtm-tabs--wrapper button.mtm-tabs--title-accordion:focus, .mtm-tabs--wrapper .mtm-tabs--title-accordion:hover, .mtm-tabs--wrapper .mtm-tabs--title-accordion:focus { 610 | background-color: transparent; 611 | color: #000; } 612 | .mtm-tabs--wrapper .mtm-tabs--content { 613 | clear: both; 614 | display: none; 615 | overflow: auto; 616 | padding: .5em 0; } 617 | .mtm-tabs--wrapper .mtm-tabs--content.current { 618 | display: inherit; } 619 | 620 | /* MEDIA QUERIES */ 621 | @media only screen and (min-width: 30em) and (max-width: 45em) { 622 | .mtm-list--image { 623 | display: inline-block; 624 | margin-right: -0.275em; 625 | vertical-align: top; 626 | width: 50%; 627 | padding: 0 2%; } 628 | .mtm-list--image:nth-of-type(2n+1) { 629 | padding-left: 0; } 630 | .mtm-list--image:nth-of-type(2n+2) { 631 | padding-right: 0; } } 632 | @media only screen and (min-width: 45em) and (max-width: 61em) { 633 | .mtm-list--image { 634 | display: inline-block; 635 | margin-right: -0.275em; 636 | vertical-align: top; 637 | width: 41.6666666667%; 638 | padding: 0 2%; } 639 | .mtm-list--image:nth-of-type(2n+1) { 640 | padding-left: 0; } 641 | .mtm-list--image:nth-of-type(2n+2) { 642 | padding-right: 0; } 643 | 644 | .mtm-list--post-content { 645 | display: inline-block; 646 | margin-right: -0.275em; 647 | vertical-align: top; 648 | width: 58.3333333333%; 649 | padding: 0 2%; } 650 | .mtm-list--post-content:nth-of-type(2n+1) { 651 | padding-left: 0; } 652 | .mtm-list--post-content:nth-of-type(2n+2) { 653 | padding-right: 0; } 654 | 655 | .mtm-home-news--content { 656 | display: inline-block; 657 | margin-right: -0.275em; 658 | vertical-align: top; 659 | width: 50%; 660 | padding: 0 2%; } 661 | .mtm-home-news--content:nth-of-type(2n+1) { 662 | padding-left: 0; } 663 | .mtm-home-news--content:nth-of-type(2n+2) { 664 | padding-right: 0; } 665 | .mtm-home-news--content.full { 666 | display: inline-block; 667 | margin-right: -0.275em; 668 | vertical-align: top; 669 | width: 100%; 670 | padding: 0 2%; 671 | padding-left: 0; 672 | padding-right: 0; } 673 | .mtm-home-news--content.full .mtm-home-sidebar--widget { 674 | display: inline-block; 675 | margin-right: -0.275em; 676 | vertical-align: top; 677 | width: 33.3333333333%; 678 | padding: 0 2%; 679 | margin: 1.5em 0; } 680 | .mtm-home-news--content.full .mtm-home-sidebar--widget:nth-of-type(3n+1) { 681 | padding-left: 0; } 682 | .mtm-home-news--content.full .mtm-home-sidebar--widget:nth-of-type(3n+3) { 683 | padding-right: 0; } 684 | 685 | .mtm-home-featured--story { 686 | display: inline-block; 687 | margin-right: -0.275em; 688 | vertical-align: top; 689 | width: 50%; 690 | padding: 0 2%; } 691 | .mtm-home-featured--story:nth-of-type(2n+1) { 692 | padding-left: 0; } 693 | .mtm-home-featured--story:nth-of-type(2n+2) { 694 | padding-right: 0; } } 695 | @media only screen and (min-width: 45em) { 696 | .mtm-component .content--page { 697 | padding: 3rem; } 698 | 699 | .mtm-home-sidebar--widget { 700 | display: block; } 701 | .mtm-home-sidebar--widget:first-of-type { 702 | margin-top: 1.5em; } 703 | 704 | .mtm_module_dual_content_area .mtm-module--content-primary, .mtm_module_dual_content_area .mtm-module--content-secondary { 705 | display: inline-block; 706 | margin-right: -0.275em; 707 | vertical-align: top; 708 | width: 50%; 709 | padding: 0 5%; } 710 | .mtm_module_dual_content_area .mtm-module--content-primary:nth-of-type(2n+1), .mtm_module_dual_content_area .mtm-module--content-secondary:nth-of-type(2n+1) { 711 | padding-left: 0; } 712 | .mtm_module_dual_content_area .mtm-module--content-primary:nth-of-type(2n+2), .mtm_module_dual_content_area .mtm-module--content-secondary:nth-of-type(2n+2) { 713 | padding-right: 0; } 714 | 715 | .mtm_module_content_callout .mtm-module--content-primary { 716 | display: inline-block; 717 | margin-right: -0.275em; 718 | vertical-align: top; 719 | width: 66.6666666667%; 720 | padding: 0 5%; } 721 | .mtm_module_content_callout .mtm-module--content-primary:nth-of-type(2n+1) { 722 | padding-left: 0; } 723 | .mtm_module_content_callout .mtm-module--content-primary:nth-of-type(2n+2) { 724 | padding-right: 0; } 725 | .mtm_module_content_callout .mtm-module--content-secondary { 726 | display: inline-block; 727 | margin-right: -0.275em; 728 | vertical-align: top; 729 | width: 33.3333333333%; 730 | padding: 0 5%; } 731 | .mtm_module_content_callout .mtm-module--content-secondary:nth-of-type(2n+1) { 732 | padding-left: 0; } 733 | .mtm_module_content_callout .mtm-module--content-secondary:nth-of-type(2n+2) { 734 | padding-right: 0; } 735 | 736 | .mtm-tabs--wrapper { 737 | border-bottom-width: 0; } 738 | .mtm-tabs--wrapper .mtm-tabs--title-container { 739 | display: block; } 740 | .mtm-tabs--wrapper button.mtm-tabs--title, .mtm-tabs--wrapper .mtm-tabs--title { 741 | padding: .5em 0; 742 | margin-right: 1em; 743 | display: inline-block; } 744 | .mtm-tabs--wrapper button.mtm-tabs--title-accordion, .mtm-tabs--wrapper .mtm-tabs--title-accordion { 745 | display: none; } 746 | .mtm-tabs--wrapper .mtm-tabs--content { 747 | border-top: 1px solid #eee; } 748 | 749 | .mtm_module_call_to_action { 750 | padding-top: 2em; 751 | padding-bottom: 2em; } 752 | 753 | .mtm-module--cta-subheading { 754 | display: inline-block; 755 | margin-right: 1em; 756 | line-height: 1.4; 757 | margin-bottom: 0.5em; } 758 | 759 | .mtm-module--cta-buttons { 760 | display: inline-block; } } 761 | @media only screen and (min-width: 61em) { 762 | .mtm-list--image { 763 | display: inline-block; 764 | margin-right: -0.275em; 765 | vertical-align: top; 766 | width: 25%; 767 | padding: 0 2%; } 768 | .mtm-list--image:nth-of-type(2n+1) { 769 | padding-left: 0; } 770 | .mtm-list--image:nth-of-type(2n+2) { 771 | padding-right: 0; } 772 | 773 | .mtm-list--post-content { 774 | display: inline-block; 775 | margin-right: -0.275em; 776 | vertical-align: top; 777 | width: 75%; 778 | padding: 0 2%; } 779 | .mtm-list--post-content:nth-of-type(2n+1) { 780 | padding-left: 0; } 781 | .mtm-list--post-content:nth-of-type(2n+2) { 782 | padding-right: 0; } 783 | 784 | .mtm-home-news--content { 785 | display: inline-block; 786 | margin-right: -0.275em; 787 | vertical-align: top; 788 | width: 33.3333333333%; 789 | padding: 0 2%; } 790 | .mtm-home-news--content:nth-of-type(2n+1) { 791 | padding-left: 0; } 792 | .mtm-home-news--content:nth-of-type(2n+2) { 793 | padding-right: 0; } 794 | .mtm-home-news--content.full { 795 | display: inline-block; 796 | margin-right: -0.275em; 797 | vertical-align: top; 798 | width: 100%; 799 | padding: 0 2%; 800 | padding-left: 0; 801 | padding-right: 0; } 802 | .mtm-home-news--content.full .mtm-home-sidebar--widget { 803 | display: inline-block; 804 | margin-right: -0.275em; 805 | vertical-align: top; 806 | width: 33.3333333333%; 807 | padding: 0 2%; 808 | margin: 1.5em 0; } 809 | .mtm-home-news--content.full .mtm-home-sidebar--widget:nth-of-type(3n+1) { 810 | padding-left: 0; } 811 | .mtm-home-news--content.full .mtm-home-sidebar--widget:nth-of-type(3n+3) { 812 | padding-right: 0; } 813 | 814 | .mtm-home-featured--story { 815 | display: inline-block; 816 | margin-right: -0.275em; 817 | vertical-align: top; 818 | width: 66.6666666667%; 819 | padding: 0 2%; } 820 | .mtm-home-featured--story:nth-of-type(2n+1) { 821 | padding-left: 0; } 822 | .mtm-home-featured--story:nth-of-type(2n+2) { 823 | padding-right: 0; } } 824 | -------------------------------------------------------------------------------- /mtm-style.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "mappings": "AAAA,kBAAkB;AAGlB,eAAe;ACHf,CAAE;EACD,UAAU,EAAE,UAAU;;AAGvB;;;;;;;;;EASE;AAuBF;;;;;;;;EAQE;AAyBF;;;;;;;;;;;EAWE;AA+BF;;;;;;;;;;;EAWE;ADnHF,oBAAoB;AEPpB,yBAAyB;AAEzB,oBAAqB;EACpB,UAAU,EAAE,UAAU;;AAGvB,yBAAyB;AACzB,cAAe;EDwId,OAAO,EAAG,YAAY;EACtB,cAAc,EAjBF,GAAG;EAkBf,YAAY,EAhIG,QAAO;EAiItB,KAAK,EAAI,IAAI;EACb,OAAO,EAAG,KAAS;EAIlB,wCAA6C;IChJ/C,cAAe;MDkJZ,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C,aAAa,EAAC,CAAC;;EC4VjB,uBAAwB;IDrYxB,OAAO,EAAG,YAAY;IACtB,YAAY,EAPG,QAAO;IAQtB,cAAc,EANU,GAAG;IAO3B,KAAK,EALS,cAA4B;IAM1C,OAAO,EAAI,IAAgB;IAgC1B,yCAAuC;MACtC,YAAY,EAAC,CAAC;IAGf,yCAAyC;MACxC,aAAa,EAAC,CAAC;ICgWhB,4BAAO;MDzYR,OAAO,EAAG,YAAY;MACtB,YAAY,EAPG,QAAO;MAQtB,cAAc,EANU,GAAG;MAO3B,KAAK,EALS,IAA4B;MAM1C,OAAO,EAAI,IAAgB;MA0B1B,YAAY,EAAE,CAAC;MACf,aAAa,EAAE,CAAC;MC8Wf,sDAA0B;QD7Y5B,OAAO,EAAG,YAAY;QACtB,YAAY,EAPG,QAAO;QAQtB,cAAc,EANU,GAAG;QAO3B,KAAK,EALS,cAA4B;QAM1C,OAAO,EAAI,IAAgB;QC4YxB,MAAM,EAAE,OAAO;QD5WjB,wEAAuC;UACtC,YAAY,EAAC,CAAC;QAGf,wEAAyC;UACxC,aAAa,EAAC,CAAC;;EC4WjB,yBAA0B;IDrZ1B,OAAO,EAAG,YAAY;IACtB,YAAY,EAPG,QAAO;IAQtB,cAAc,EANU,GAAG;IAO3B,KAAK,EALS,cAA4B;IAM1C,OAAO,EAAI,IAAgB;IAgC1B,2CAAuC;MACtC,YAAY,EAAC,CAAC;IAGf,2CAAyC;MACxC,aAAa,EAAC,CAAC", 4 | "sources": ["assets/scss/mtm-style.scss","assets/scss/pink-grid/pinkgrid.scss","assets/scss/_components.panels.scss","assets/scss/_settings.scss"], 5 | "names": [], 6 | "file": "mtm-style.css" 7 | } 8 | -------------------------------------------------------------------------------- /readme.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

ACF Block Components for WordPress

8 | 9 |

ACF Blocks plugin for WordPress for displaying custom content within pages and posts. Requires Advanced Custom Fields Pro, ACF Term and Taxonomy Chooser, ACF Post Type Selector and ACF Widget Area Field.

10 | 11 |

Recommended for use with ACF Options Page and Pink Spring Theme

12 | 13 |

Works with most standard WordPress themes.

14 | 15 |

Custom Blocks (Flexible Fields)

16 | 17 |
    18 |
  1. Single Column Content with heading
  2. 19 |
  3. Dual Column Content with heading
  4. 20 |
  5. Content with Callout and heading
  6. 21 |
  7. Hero Image with text and call to action buttons
  8. 22 |
  9. Video/Embedded Media with text and call to action buttons
  10. 23 |
  11. Slider with text and links
  12. 24 |
  13. Feature Boxes (post content, latest post, or manual)
  14. 25 |
  15. Call to Action with heading, subheading, buttons
  16. 26 |
  17. Logo Feature with image/link repeater
  18. 27 |
  19. Widget Area
  20. 28 |
  21. Post List
  22. 29 |
  23. Post Grid
  24. 30 |
  25. Manual List
  26. 31 |
  27. Manual Grid
  28. 32 |
  29. Tabs
  30. 33 |
  31. Gallery (using WordPress Gallery)
  32. 34 |
  33. Multi-Buttons
  34. 35 |
36 | 37 |

Page Templates (block templates coming soon, once WordPress supports them)

38 | 39 |
    40 |
  1. Custom Block Template (adds ability to hide or show the main page title)
  2. 41 |
  3. Single Scroll Template (adds ability to output other pages below the main page, also background image)
  4. 42 |
43 | 44 |

Vague Description of How To Use

45 | 46 |
    47 |
  1. Install and activate the plugin
  2. 48 |
  3. Build posts and pages using Custom Blocks
  4. 49 |
  5. Supports regular, wide, and full alignment
  6. 50 |
  7. Several blocks have custom background colors
  8. 51 |
  9. Can filter custom ACF colors to match your theme by targeting mtm_block_colors_filter
  10. 52 |
53 | 54 |

Vague Description of How To Theme

55 | 56 |
    57 |
  1. Create a folder called mtm-templates in the root of your theme or child theme
  2. 58 |
  3. Copy any of the block or content template parts in the plugin templates folder into your mtm-templates folder, and modify/style them at will. The plugin will automatically override them.
  4. 59 |
  5. To call any of the custom template parts from another part of your theme, use the mtm_get_block_part() function
  6. 60 |
61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /templates/mtm-block-call-to-action.php: -------------------------------------------------------------------------------- 1 | 5 |
6 |
7 | 8 |

9 | 11 |
12 | 16 |
17 | 18 | 19 | 20 |
21 | 23 |
24 |
25 | -------------------------------------------------------------------------------- /templates/mtm-block-featured-content.php: -------------------------------------------------------------------------------- 1 | 5 | 6 |
7 | 8 |

9 | have_posts() ) : 29 | global $post; 30 | $org_post = $post; // save this in case we are inside a nested query/post boject 31 | while( $home_tax_query->have_posts() ) : 32 | $home_tax_query->the_post(); 33 | mtm_get_block_part( 'mtm-content', 'home-feature-select' ); 34 | endwhile; 35 | $post = $org_post; // reset to original query 36 | endif; 37 | 38 | // Manual Entry 39 | else : 40 | mtm_get_block_part( 'mtm-content', 'home-feature-manual' ); 41 | endif; ?> 42 | 43 | 45 |
46 | -------------------------------------------------------------------------------- /templates/mtm-block-gallery.php: -------------------------------------------------------------------------------- 1 | 5 |
6 | 7 |

8 | 11 | 21 | 22 |
23 | -------------------------------------------------------------------------------- /templates/mtm-block-grid-logic.php: -------------------------------------------------------------------------------- 1 | 7 |
8 | 9 |

10 | 13 |
14 | have_posts() ) : 23 | global $post; 24 | $org_post = $post; // save this in case we are inside a nested query/post boject 25 | while( $list_query->have_posts() ) : 26 | $list_query->the_post(); 27 | mtm_get_block_part( 'mtm-content', 'grid-view' ); 28 | endwhile; 29 | $post = $org_post; // reset to original query 30 | endif; 31 | 32 | $viewtext = _get_field( 'mtm_view_all_link_text' ) ? : 'View All'; 33 | 34 | if( _get_field( 'mtm_show_view_all_link' ) ) : ?> 35 | 36 | 37 |
38 | 39 | 40 |
41 | have_posts() ) : 50 | global $post; 51 | $org_post = $post; // save this in case we are inside a nested query/post object 52 | while( $list_post_query->have_posts() ) : 53 | $list_post_query->the_post(); 54 | mtm_get_block_part( 'mtm-content', 'grid-view' ); 55 | endwhile; 56 | $post = $org_post; // reset to original query 57 | endif; 58 | $viewtext = _get_field( 'mtm_view_all_link_text' ) ? : 'View All'; 59 | 60 | if( _get_field( 'mtm_show_view_all_link' ) ) : 61 | if( 'post' == $posttype ) : // Posts ?> 62 | 63 | 66 | 67 | 69 |
70 | 71 | 72 |
73 | 87 |
88 | 89 | 91 |
92 | 95 |
96 | 99 |
100 | -------------------------------------------------------------------------------- /templates/mtm-block-hero-image.php: -------------------------------------------------------------------------------- 1 | 4 |
5 |
6 |
7 |

8 | 9 |
10 | 11 | 12 |
13 |
14 |
15 | -------------------------------------------------------------------------------- /templates/mtm-block-hero-media.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /templates/mtm-block-jump-button.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /templates/mtm-block-list-logic.php: -------------------------------------------------------------------------------- 1 | 6 |
7 | 8 | 9 |

10 | 11 | 15 | 16 |
17 | have_posts() ) : 25 | global $post; 26 | $org_post = $post; // save this in case we are inside a nested query/post object 27 | while( $list_query->have_posts() ) : 28 | $list_query->the_post(); 29 | mtm_get_block_part( 'mtm-content', 'list-view' ); 30 | endwhile; 31 | $post = $org_post; // reset to original query 32 | endif; 33 | 34 | if( _get_field( 'mtm_show_view_all_link' ) ) : 35 | $viewtext = _get_field( 'mtm_view_all_link_text' ) ? _get_field( 'mtm_view_all_link_text' ) : 'View All'; 36 | if( _get_field( 'mtm_view_all_link_text' ) ): ?> 37 | 38 | 39 | 40 | 42 |
43 | 44 | 45 |
46 | have_posts() ) : 54 | global $post; 55 | $org_post = $post; // save this in case we are inside a nested query/post object 56 | while( $list_post_query->have_posts() ) : 57 | $list_post_query->the_post(); 58 | mtm_get_block_part( 'mtm-content', 'list-view' ); 59 | endwhile; 60 | $post = $org_post; // reset to original query 61 | endif; 62 | 63 | if( _get_field( 'mtm_show_view_all_link' ) ) : 64 | $viewtext = _get_field( 'mtm_view_all_link_text' ) ? _get_field( 'mtm_view_all_link_text' ) : 'View All'; 65 | if( 'post' == $posttype ) : // Posts ?> 66 | 67 | 70 | 71 | 73 |
74 | 75 | 76 |
77 | 91 |
92 | 93 | 95 |
96 | 99 |
100 | 102 |
103 | -------------------------------------------------------------------------------- /templates/mtm-block-logos.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |

6 | 10 |
11 | 12 |
13 | 14 |
15 | -------------------------------------------------------------------------------- /templates/mtm-block-post-object.php: -------------------------------------------------------------------------------- 1 |

9 |
10 | 11 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /templates/mtm-block-slider.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | 15 | 16 |
17 | -------------------------------------------------------------------------------- /templates/mtm-block-tabs.php: -------------------------------------------------------------------------------- 1 | 4 |
5 | 6 |
7 |
8 | 9 | 10 |
11 | 12 | 13 | 14 |
15 | 16 |
17 | 18 |
19 | -------------------------------------------------------------------------------- /templates/mtm-block-text.php: -------------------------------------------------------------------------------- 1 | 4 |
5 | 6 |

7 | 10 |
11 | 15 |
16 |
17 | 18 | 19 | 20 |
21 |
22 | 23 |
24 | 26 |
27 | -------------------------------------------------------------------------------- /templates/mtm-block-widget-area.php: -------------------------------------------------------------------------------- 1 | 4 |
5 | 6 |

7 | 10 |
11 | 12 |
13 | 14 |
15 | -------------------------------------------------------------------------------- /templates/mtm-content-contributors.php: -------------------------------------------------------------------------------- 1 | 6 |
7 | 0 ? true : false ?> 10 |
11 | '; } ?>
'; } ?> 12 |

'; } ?>'; } ?>

13 |

14 |
15 | 16 |
17 | 7 | 8 |
9 |
10 | 14 |
15 | 18 |
19 | 20 |

21 | 22 | 23 | 24 |

25 |

26 | 27 |
28 |
29 | -------------------------------------------------------------------------------- /templates/mtm-content-grid-view.php: -------------------------------------------------------------------------------- 1 | 4 |
5 |
6 |
7 |

8 |
9 |
10 | -------------------------------------------------------------------------------- /templates/mtm-content-hero-video.php: -------------------------------------------------------------------------------- 1 | 4 |
5 |
6 | 7 |
8 |
9 |
10 |

11 |
12 | 13 |
14 |
15 |
16 | -------------------------------------------------------------------------------- /templates/mtm-content-home-buttons.php: -------------------------------------------------------------------------------- 1 | 7 |
8 | 9 |
10 | 11 | -------------------------------------------------------------------------------- /templates/mtm-content-home-feature-manual.php: -------------------------------------------------------------------------------- 1 | 4 | 27 | -------------------------------------------------------------------------------- /templates/mtm-content-home-feature-select.php: -------------------------------------------------------------------------------- 1 | 4 | 13 | 14 | -------------------------------------------------------------------------------- /templates/mtm-content-list-module.php: -------------------------------------------------------------------------------- 1 | 6 | 7 |
8 | 9 | 14 | 15 |
16 |
17 | 20 |
21 |
22 | 23 | 24 | 25 |
26 |

27 | 28 | 29 | 30 |

31 |

32 | 33 | 38 | 39 |
40 |
41 | -------------------------------------------------------------------------------- /templates/mtm-content-list-view.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 |
7 | 8 |
9 | 10 | 11 |
12 |

13 | 14 | 15 |
16 | 17 |
18 | -------------------------------------------------------------------------------- /templates/mtm-wrapper-buttons.php: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 | 13 | 14 | 15 |
16 | -------------------------------------------------------------------------------- /templates/mtm-wrapper-call-to-action.php: -------------------------------------------------------------------------------- 1 | 12 | 13 |
14 | 15 | 16 | 17 |
18 | -------------------------------------------------------------------------------- /templates/mtm-wrapper-content-callout.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 | 14 | 15 | 16 |
17 | -------------------------------------------------------------------------------- /templates/mtm-wrapper-dual-content.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 | 14 | 15 | 16 |
17 | -------------------------------------------------------------------------------- /templates/mtm-wrapper-featured-content.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 | 14 | 15 | 16 |
17 | -------------------------------------------------------------------------------- /templates/mtm-wrapper-gallery.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 | 14 | 15 | 16 |
17 | -------------------------------------------------------------------------------- /templates/mtm-wrapper-grid-manual.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 | 14 | 15 | 16 |
17 | -------------------------------------------------------------------------------- /templates/mtm-wrapper-grid-post.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 | 14 | 15 | 16 |
17 | -------------------------------------------------------------------------------- /templates/mtm-wrapper-hero-image.php: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 | 13 | 14 | 15 |
16 | -------------------------------------------------------------------------------- /templates/mtm-wrapper-hero-media.php: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 | 13 | 14 | 15 |
16 | -------------------------------------------------------------------------------- /templates/mtm-wrapper-list-manual.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 | 14 | 15 | 16 |
17 | -------------------------------------------------------------------------------- /templates/mtm-wrapper-list-post.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 | 14 |
15 | -------------------------------------------------------------------------------- /templates/mtm-wrapper-logos.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 | 14 | 15 | 16 |
17 | -------------------------------------------------------------------------------- /templates/mtm-wrapper-single-content.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 | 14 | 15 | 16 |
17 | -------------------------------------------------------------------------------- /templates/mtm-wrapper-slider.php: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 | 13 | 14 | 15 |
16 | -------------------------------------------------------------------------------- /templates/mtm-wrapper-tabs.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 | 14 | 15 | 16 |
17 | -------------------------------------------------------------------------------- /templates/mtm-wrapper-test.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 | 14 | 15 | 16 |
17 | -------------------------------------------------------------------------------- /templates/mtm-wrapper-widget-area.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 | 14 | 15 | 16 |
17 | -------------------------------------------------------------------------------- /templates/template-block-content.php: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 | 12 | 13 | 14 |

15 | 16 | 17 | 18 | 21 | 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /templates/template-single-scroll.php: -------------------------------------------------------------------------------- 1 | 8 | 9 |
10 |
11 | 12 | 13 |

14 | 15 | 16 | 19 | 20 |
21 |
22 | 23 | 34 | 35 |
36 |
37 |
38 | 39 | 40 | 41 | 42 |

43 | 44 | 45 | 46 | 47 |
48 |
49 |
50 | 51 | 56 | 57 | 58 | 59 | 60 | --------------------------------------------------------------------------------