more
Signed-off-by: Jeff <jeff@gotenzing.com>
Showing
33 changed files
with
1234 additions
and
64 deletions
| 1 | <?php | ||
| 2 | |||
| 3 | /** | ||
| 4 | * Plugin Name: Accordion Blocks | ||
| 5 | * Plugin URI: https://github.com/philbuchanan/Accordion-Blocks | ||
| 6 | * Description: Gutenberg blocks for creating responsive accordion drop-downs. | ||
| 7 | * Version: 1.5.0 | ||
| 8 | * Requires at least: 5.9 | ||
| 9 | * Tested up to: 5.9 | ||
| 10 | * Requires PHP: 7.3 | ||
| 11 | * Author: Phil Buchanan | ||
| 12 | * Author URI: https://philbuchanan.com | ||
| 13 | * License: GPLv2 or later | ||
| 14 | */ | ||
| 15 | |||
| 16 | // Make sure to not redeclare the class | ||
| 17 | if (!class_exists('PB_Accordion_Blocks')) : | ||
| 18 | |||
| 19 | class PB_Accordion_Blocks { | ||
| 20 | |||
| 21 | /** | ||
| 22 | * Current plugin version number | ||
| 23 | * Set from parent plugin file | ||
| 24 | */ | ||
| 25 | public $plugin_version; | ||
| 26 | |||
| 27 | |||
| 28 | |||
| 29 | /** | ||
| 30 | * Class constructor | ||
| 31 | * Sets up the plugin, including registering scripts. | ||
| 32 | */ | ||
| 33 | function __construct() { | ||
| 34 | $basename = plugin_basename(__FILE__); | ||
| 35 | |||
| 36 | $this->plugin_version = $this->get_plugin_version(); | ||
| 37 | |||
| 38 | // Register block | ||
| 39 | add_action('init', array($this, 'register_block')); | ||
| 40 | |||
| 41 | // Enqueue frontend assets | ||
| 42 | add_action('wp_enqueue_scripts', array($this, 'enqueue_frontend_assets')); | ||
| 43 | |||
| 44 | // Tell WordPress which JavaScript files contain translations | ||
| 45 | add_action('init', array($this, 'set_script_translations')); | ||
| 46 | |||
| 47 | if (is_admin()) { | ||
| 48 | // Add link to documentation on plugin page | ||
| 49 | add_filter("plugin_action_links_$basename", array($this, 'add_documentation_link')); | ||
| 50 | } | ||
| 51 | |||
| 52 | // Register defaults site setting | ||
| 53 | add_action('rest_api_init', array($this, 'register_settings')); | ||
| 54 | add_action('admin_init', array($this, 'register_settings')); | ||
| 55 | |||
| 56 | // Add API endpoint to get and set settings | ||
| 57 | add_action('rest_api_init', array($this, 'register_rest_routes')); | ||
| 58 | |||
| 59 | // Add settings page | ||
| 60 | add_action('admin_menu', array($this, 'add_settings_menu')); | ||
| 61 | add_action('admin_init', array($this, 'settings_api_init')); | ||
| 62 | } | ||
| 63 | |||
| 64 | |||
| 65 | |||
| 66 | /** | ||
| 67 | * Current plugin version number | ||
| 68 | */ | ||
| 69 | private function get_plugin_version() { | ||
| 70 | $plugin_data = get_file_data(__FILE__, array('Version' => 'Version'), false); | ||
| 71 | |||
| 72 | return (defined('WP_DEBUG') && WP_DEBUG) ? time() : $plugin_data['Version']; | ||
| 73 | } | ||
| 74 | |||
| 75 | |||
| 76 | |||
| 77 | /** | ||
| 78 | * Register the block's assets for the editor | ||
| 79 | */ | ||
| 80 | public function register_block() { | ||
| 81 | register_block_type(__DIR__); | ||
| 82 | } | ||
| 83 | |||
| 84 | |||
| 85 | |||
| 86 | /** | ||
| 87 | * Enqueue the block's assets for the frontend | ||
| 88 | */ | ||
| 89 | public function enqueue_frontend_assets() { | ||
| 90 | $load_scripts_globally = $this->should_load_scripts_globally(); | ||
| 91 | |||
| 92 | if ($load_scripts_globally || has_block('pb/accordion-item', get_the_ID())) { | ||
| 93 | $min = (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) ? '' : '.min'; | ||
| 94 | |||
| 95 | wp_enqueue_script( | ||
| 96 | 'pb-accordion-blocks-frontend-script', | ||
| 97 | plugins_url("js/accordion-blocks$min.js", __FILE__), | ||
| 98 | array('jquery'), | ||
| 99 | $this->plugin_version, | ||
| 100 | true | ||
| 101 | ); | ||
| 102 | |||
| 103 | wp_enqueue_style( | ||
| 104 | 'pb-accordion-blocks-style', | ||
| 105 | plugins_url('build/index.css', __FILE__), | ||
| 106 | array(), | ||
| 107 | $this->plugin_version | ||
| 108 | ); | ||
| 109 | } | ||
| 110 | } | ||
| 111 | |||
| 112 | |||
| 113 | |||
| 114 | /** | ||
| 115 | * Tell WordPress which JavaScript files contain translations | ||
| 116 | */ | ||
| 117 | function set_script_translations() { | ||
| 118 | wp_set_script_translations('pb-accordion-blocks-editor-script', 'accordion-blocks'); | ||
| 119 | } | ||
| 120 | |||
| 121 | |||
| 122 | |||
| 123 | /** | ||
| 124 | * Register accordion defaults site setting | ||
| 125 | */ | ||
| 126 | public function register_settings() { | ||
| 127 | register_setting( | ||
| 128 | 'general', | ||
| 129 | 'accordion_blocks_defaults', | ||
| 130 | array( | ||
| 131 | 'type' => 'object', | ||
| 132 | 'show_in_rest' => array( | ||
| 133 | 'schema' => array( | ||
| 134 | 'type' => 'object', | ||
| 135 | 'properties' => array( | ||
| 136 | 'initiallyOpen' => array( | ||
| 137 | 'type' => 'boolean', | ||
| 138 | ), | ||
| 139 | 'clickToClose' => array( | ||
| 140 | 'type' => 'boolean', | ||
| 141 | ), | ||
| 142 | 'autoClose' => array( | ||
| 143 | 'type' => 'boolean', | ||
| 144 | ), | ||
| 145 | 'scroll' => array( | ||
| 146 | 'type' => 'boolean', | ||
| 147 | ), | ||
| 148 | 'scrollOffset' => array( | ||
| 149 | 'type' => 'integer', | ||
| 150 | ), | ||
| 151 | ), | ||
| 152 | ), | ||
| 153 | ), | ||
| 154 | 'default' => array( | ||
| 155 | 'initiallyOpen' => false, | ||
| 156 | 'clickToClose' => true, | ||
| 157 | 'autoClose' => true, | ||
| 158 | 'scroll' => false, | ||
| 159 | 'scrollOffset' => 0, | ||
| 160 | ), | ||
| 161 | ) | ||
| 162 | ); | ||
| 163 | |||
| 164 | register_setting( | ||
| 165 | 'accordion_blocks_settings', | ||
| 166 | 'accordion_blocks_load_scripts_globally', | ||
| 167 | array( | ||
| 168 | 'type' => 'boolean', | ||
| 169 | 'default' => 'on', | ||
| 170 | ) | ||
| 171 | ); | ||
| 172 | } | ||
| 173 | |||
| 174 | |||
| 175 | |||
| 176 | /** | ||
| 177 | * Register rest endpoint to get and set plugin defaults | ||
| 178 | */ | ||
| 179 | public function register_rest_routes() { | ||
| 180 | register_rest_route('accordion-blocks/v1', '/defaults', array( | ||
| 181 | 'methods' => WP_REST_Server::READABLE, | ||
| 182 | 'callback' => array($this, 'api_get_defaults'), | ||
| 183 | 'permission_callback' => function() { | ||
| 184 | return current_user_can('edit_posts'); | ||
| 185 | } | ||
| 186 | )); | ||
| 187 | |||
| 188 | register_rest_route('accordion-blocks/v1', '/defaults', array( | ||
| 189 | 'methods' => WP_REST_Server::EDITABLE, | ||
| 190 | 'callback' => array($this, 'api_set_defaults'), | ||
| 191 | 'permission_callback' => function() { | ||
| 192 | return current_user_can('publish_pages'); | ||
| 193 | } | ||
| 194 | )); | ||
| 195 | } | ||
| 196 | |||
| 197 | |||
| 198 | |||
| 199 | /** | ||
| 200 | * Get accordion block default settings | ||
| 201 | * | ||
| 202 | * @return object Default accordion block settings object | ||
| 203 | */ | ||
| 204 | public function api_get_defaults(WP_REST_Request $request) { | ||
| 205 | $response = new WP_REST_Response(get_option('accordion_blocks_defaults')); | ||
| 206 | $response->set_status(200); | ||
| 207 | |||
| 208 | return $response; | ||
| 209 | } | ||
| 210 | |||
| 211 | |||
| 212 | |||
| 213 | /** | ||
| 214 | * Set accordion block default settings | ||
| 215 | * | ||
| 216 | * @param data object The date passed from the API | ||
| 217 | * @return object Default accordion block settings object | ||
| 218 | */ | ||
| 219 | public function api_set_defaults($request) { | ||
| 220 | $old_defaults = get_option('accordion_blocks_defaults'); | ||
| 221 | |||
| 222 | $new_defaults = json_decode($request->get_body()); | ||
| 223 | |||
| 224 | $new_defaults = (object) array( | ||
| 225 | 'initiallyOpen' => isset($new_defaults->initiallyOpen) ? $new_defaults->initiallyOpen : $old_defaults->initiallyOpen, | ||
| 226 | 'clickToClose' => isset($new_defaults->clickToClose) ? $new_defaults->clickToClose : $old_defaults->clickToClose, | ||
| 227 | 'autoClose' => isset($new_defaults->autoClose) ? $new_defaults->autoClose : $old_defaults->autoClose, | ||
| 228 | 'scroll' => isset($new_defaults->scroll) ? $new_defaults->scroll : $old_defaults->scroll, | ||
| 229 | 'scrollOffset' => isset($new_defaults->scrollOffset) ? $new_defaults->scrollOffset : $old_defaults->scrollOffset, | ||
| 230 | ); | ||
| 231 | |||
| 232 | $updated = update_option('accordion_blocks_defaults', $new_defaults); | ||
| 233 | |||
| 234 | $response = new WP_REST_Response($new_defaults); | ||
| 235 | $response->set_status($updated ? 201 : 500); | ||
| 236 | |||
| 237 | return $response; | ||
| 238 | } | ||
| 239 | |||
| 240 | |||
| 241 | |||
| 242 | /** | ||
| 243 | * Add documentation link on plugin page | ||
| 244 | */ | ||
| 245 | public function add_documentation_link($links) { | ||
| 246 | array_push($links, sprintf('<a href="%s">%s</a>', | ||
| 247 | 'http://wordpress.org/plugins/accordion-blocks/', | ||
| 248 | _x('Documentation', 'link to documentation on wordpress.org site', 'accordion-blocks') | ||
| 249 | )); | ||
| 250 | |||
| 251 | array_push($links, sprintf('<a href="%s">%s</a>', | ||
| 252 | 'https://philbuchanan.com/donate/', | ||
| 253 | __('Donate', 'accordion-blocks') | ||
| 254 | )); | ||
| 255 | |||
| 256 | return $links; | ||
| 257 | } | ||
| 258 | |||
| 259 | |||
| 260 | |||
| 261 | /** | ||
| 262 | * Get the load_scripts_globally option and return true or false. | ||
| 263 | */ | ||
| 264 | private function should_load_scripts_globally() { | ||
| 265 | /** | ||
| 266 | * This removes the old option (the option name had a typo), but ensures | ||
| 267 | * the new option gets updated with the same setting. | ||
| 268 | */ | ||
| 269 | if (get_option('accordion_blocks_load_scripts_globablly') == 'on') { | ||
| 270 | update_option('accordion_blocks_load_scripts_globally', 'on'); | ||
| 271 | } | ||
| 272 | |||
| 273 | delete_option('accordion_blocks_load_scripts_globablly'); | ||
| 274 | |||
| 275 | $load_scripts_globally = get_option('accordion_blocks_load_scripts_globally', 'on'); | ||
| 276 | |||
| 277 | return !!$load_scripts_globally; | ||
| 278 | } | ||
| 279 | |||
| 280 | |||
| 281 | |||
| 282 | /** | ||
| 283 | * Add the admin menu settings page | ||
| 284 | */ | ||
| 285 | public function add_settings_menu() { | ||
| 286 | add_options_page( | ||
| 287 | __('Accordion Blocks Settings', 'accordion-blocks'), | ||
| 288 | __('Accordion Blocks', 'accordion-blocks'), | ||
| 289 | 'manage_options', | ||
| 290 | 'accordion_blocks_settings', | ||
| 291 | array($this, 'render_settings_page') | ||
| 292 | ); | ||
| 293 | } | ||
| 294 | |||
| 295 | |||
| 296 | |||
| 297 | /** | ||
| 298 | * Render the settings page | ||
| 299 | */ | ||
| 300 | public function render_settings_page() { | ||
| 301 | if (!current_user_can('manage_options')) { | ||
| 302 | wp_die(__('You do not have sufficient permissions to access this page.', 'accordion-blocks')); | ||
| 303 | } ?> | ||
| 304 | |||
| 305 | <div class="wrap"> | ||
| 306 | <h2><?php _e('Accordion Blocks Settings', 'accordion-blocks'); ?></h2> | ||
| 307 | <form method="POST" action="options.php"> | ||
| 308 | <?php | ||
| 309 | settings_fields('accordion_blocks_settings'); | ||
| 310 | do_settings_sections('accordion_blocks_settings'); | ||
| 311 | submit_button(); | ||
| 312 | ?> | ||
| 313 | </form> | ||
| 314 | </div> | ||
| 315 | <?php } | ||
| 316 | |||
| 317 | |||
| 318 | |||
| 319 | /** | ||
| 320 | * Register setting sections and individual settings | ||
| 321 | */ | ||
| 322 | public function settings_api_init() { | ||
| 323 | add_settings_section( | ||
| 324 | 'accordion_blocks_global_settings_section', | ||
| 325 | __('Global Settings', 'accordion-blocks'), | ||
| 326 | array($this, 'accordion_blocks_global_settings_section_callback'), | ||
| 327 | 'accordion_blocks_settings' | ||
| 328 | ); | ||
| 329 | |||
| 330 | add_settings_field( | ||
| 331 | 'accordion_blocks_load_scripts_globally', | ||
| 332 | __('Scripts and Styles', 'accordion-blocks'), | ||
| 333 | array($this, 'load_scripts_globally_setting_callback'), | ||
| 334 | 'accordion_blocks_settings', | ||
| 335 | 'accordion_blocks_global_settings_section', | ||
| 336 | array( | ||
| 337 | 'label_for' => 'accordion_blocks_load_scripts_globally', | ||
| 338 | ) | ||
| 339 | ); | ||
| 340 | } | ||
| 341 | |||
| 342 | |||
| 343 | |||
| 344 | /** | ||
| 345 | * Callback function for Accordion Blocks global settings section | ||
| 346 | * Add section intro copy here (if necessary) | ||
| 347 | */ | ||
| 348 | public function accordion_blocks_global_settings_section_callback() {} | ||
| 349 | |||
| 350 | |||
| 351 | |||
| 352 | /** | ||
| 353 | * Callback function for load scripts globally setting | ||
| 354 | */ | ||
| 355 | public function load_scripts_globally_setting_callback() { | ||
| 356 | $load_scripts_globally = $this->should_load_scripts_globally(); ?> | ||
| 357 | <fieldset> | ||
| 358 | <legend class="screen-reader-text"> | ||
| 359 | <span><?php _e('Scripts and Styles', 'accordion-blocks'); ?></span> | ||
| 360 | </legend> | ||
| 361 | <label for="accordion_blocks_load_scripts_globally"> | ||
| 362 | <input | ||
| 363 | type="checkbox" | ||
| 364 | id="accordion_blocks_load_scripts_globally" | ||
| 365 | name="accordion_blocks_load_scripts_globally" | ||
| 366 | aria-describedby="load-scripts-globally" | ||
| 367 | <?php checked($load_scripts_globally); ?> | ||
| 368 | > | ||
| 369 | <?php _e('Load scripts and styles globally', 'accordion-blocks'); ?> | ||
| 370 | </label> | ||
| 371 | <div id="load-scripts-globally"> | ||
| 372 | <p class="description"> | ||
| 373 | <?php _e('Turning this off may cause accordions to stop working in some instances.', 'accordion-blocks'); ?> | ||
| 374 | </p> | ||
| 375 | <p class="description"> | ||
| 376 | <?php _e('Turn this on if you use accordions outside of the main content editor, or are adding accordions programatically.', 'accordion-blocks'); ?> | ||
| 377 | </p> | ||
| 378 | </div> | ||
| 379 | </fieldset> | ||
| 380 | <?php } | ||
| 381 | |||
| 382 | } | ||
| 383 | |||
| 384 | $PB_Accordion_Blocks = new PB_Accordion_Blocks; | ||
| 385 | |||
| 386 | endif; |
371 Bytes
691 Bytes
153 KB
19.9 KB
| 1 | { | ||
| 2 | "apiVersion": "2", | ||
| 3 | "name": "pb/accordion-item", | ||
| 4 | "title": "Accordion Item", | ||
| 5 | "category": "text", | ||
| 6 | "textdomain": "accordion-blocks", | ||
| 7 | "attributes": { | ||
| 8 | "title": { | ||
| 9 | "type": "string", | ||
| 10 | "source": "html", | ||
| 11 | "selector": ".c-accordion__title" | ||
| 12 | }, | ||
| 13 | "initiallyOpen": { | ||
| 14 | "type": "boolean", | ||
| 15 | "default": false | ||
| 16 | }, | ||
| 17 | "clickToClose": { | ||
| 18 | "type": "boolean", | ||
| 19 | "default": true | ||
| 20 | }, | ||
| 21 | "autoClose": { | ||
| 22 | "type": "boolean", | ||
| 23 | "default": true | ||
| 24 | }, | ||
| 25 | "titleTag": { | ||
| 26 | "type": "string", | ||
| 27 | "default": "h2" | ||
| 28 | }, | ||
| 29 | "scroll": { | ||
| 30 | "type": "boolean", | ||
| 31 | "default": false | ||
| 32 | }, | ||
| 33 | "scrollOffset": { | ||
| 34 | "type": "number", | ||
| 35 | "default": 0 | ||
| 36 | }, | ||
| 37 | "uuid": { | ||
| 38 | "type": "number" | ||
| 39 | } | ||
| 40 | }, | ||
| 41 | "supports": { | ||
| 42 | "anchor": true | ||
| 43 | }, | ||
| 44 | "editorScript": "file:./build/index.js", | ||
| 45 | "editorStyle": "file:./build/index.css" | ||
| 46 | } |
| 1 | <?php return array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '348416c729ba3f21f077b8a632fd9ba7'); | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | .c-accordion__item.no-js .c-accordion__content{display:block!important}.c-accordion__item.no-js .c-accordion__title{cursor:default;padding-right:none}.c-accordion__item.no-js .c-accordion__title:after{display:none}.c-accordion__title--button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;border-radius:0;box-shadow:none;direction:ltr;display:inline-block;font:inherit;height:auto;margin:0;overflow:auto;padding:0;text-align:left;text-decoration:none;transition:0;vertical-align:middle;width:100%}.c-accordion__title--button,.c-accordion__title--button:focus,.c-accordion__title--button:hover{background-color:transparent;color:inherit}.c-accordion__title{cursor:pointer;padding-right:2rem;position:relative}.c-accordion__title:after{color:#777;content:"+";font-weight:300;position:absolute;right:0;top:50%;transform:translateY(-50%)}.is-open>.c-accordion__title:after{content:"−"}[data-initially-open=false] .c-accordion__content{display:none}@media print{.c-accordion__content{display:block!important}} | ||
| 2 | .editor-styles-wrapper .c-accordion__item.is-selected{border-bottom:1px solid var(--wp-admin-theme-color)!important} |
This diff is collapsed.
Click to expand it.
| 1 | (function($) { | ||
| 2 | 'use strict'; | ||
| 3 | |||
| 4 | // Remove the 'no-js' class since JavaScript is enabled | ||
| 5 | $('.js-accordion-item').removeClass('no-js'); | ||
| 6 | |||
| 7 | |||
| 8 | |||
| 9 | /** | ||
| 10 | * Accordion Blocks plugin function | ||
| 11 | * | ||
| 12 | * @param object options Plugin settings to override the defaults | ||
| 13 | */ | ||
| 14 | $.fn.accordionBlockItem = function(options) { | ||
| 15 | var settings = $.extend({ | ||
| 16 | // Set default settings | ||
| 17 | initiallyOpen: false, | ||
| 18 | autoClose: true, | ||
| 19 | clickToClose: true, | ||
| 20 | scroll: false, | ||
| 21 | scrollOffset: false, | ||
| 22 | }, options); | ||
| 23 | |||
| 24 | var duration = 250; | ||
| 25 | var hashID = window.location.hash.replace('#', ''); | ||
| 26 | |||
| 27 | var item = {}; | ||
| 28 | |||
| 29 | item.self = $(this); | ||
| 30 | item.id = $(this).attr('id'); | ||
| 31 | item.controller = $(this).children('.js-accordion-controller'); | ||
| 32 | item.uuid = getAccordionItemUUID(item.self); | ||
| 33 | item.content = $('#ac-' + item.uuid); | ||
| 34 | item.accordionGroupItems = [item.uuid]; | ||
| 35 | item.accordionAncestorItems = []; | ||
| 36 | |||
| 37 | |||
| 38 | |||
| 39 | /** | ||
| 40 | * Initial setup | ||
| 41 | * Set the scroll offset, and figure out which items should be open by | ||
| 42 | * default. | ||
| 43 | */ | ||
| 44 | (function initialSetup() { | ||
| 45 | /** | ||
| 46 | * Set up some defaults for this controller | ||
| 47 | * These cannot be set in the blocks `save` function because | ||
| 48 | * WordPress strips `tabindex` and `aria-controls` attributes from | ||
| 49 | * saved post content. See `_wp_add_global_attributes` function in | ||
| 50 | * wp-includes/kses.php for list of allowed attributes. | ||
| 51 | */ | ||
| 52 | item.controller.attr({ | ||
| 53 | 'tabindex': 0, | ||
| 54 | 'aria-controls': 'ac-' + item.uuid, | ||
| 55 | }); | ||
| 56 | |||
| 57 | settings.scrollOffset = Math.floor(parseInt(settings.scrollOffset, 10)) || 0; | ||
| 58 | |||
| 59 | /** | ||
| 60 | * Add any sibling accordion items to the accordionGroupItems array. | ||
| 61 | */ | ||
| 62 | $.each(item.self.siblings('.js-accordion-item'), function(index, ele) { | ||
| 63 | var uuid = getAccordionItemUUID(ele); | ||
| 64 | |||
| 65 | item.accordionGroupItems.push(uuid); | ||
| 66 | }); | ||
| 67 | |||
| 68 | /** | ||
| 69 | * Add any parent accordion items to the accordionAncestorItems array. | ||
| 70 | */ | ||
| 71 | $.each(item.self.parents('.js-accordion-item'), function(index, ele) { | ||
| 72 | var uuid = getAccordionItemUUID(ele); | ||
| 73 | |||
| 74 | item.accordionAncestorItems.push(uuid); | ||
| 75 | }); | ||
| 76 | |||
| 77 | // If this item has `initially-open prop` set to true, open it | ||
| 78 | if (settings.initiallyOpen) { | ||
| 79 | /** | ||
| 80 | * We aren't opening the item here (only setting open attributes) | ||
| 81 | * because the openItem() function fires the `openAccordionItem` | ||
| 82 | * event which, if `autoClose` is set, would override the users | ||
| 83 | * defined initiallyOpen settings. | ||
| 84 | * | ||
| 85 | * Only setting open attributes is fine since the item's content | ||
| 86 | * display (`display: none|block`) is already set by the plugin. | ||
| 87 | */ | ||
| 88 | setOpenItemAttributes(); | ||
| 89 | } | ||
| 90 | // If the hash matches this item, open it | ||
| 91 | else if (item.id === hashID) { | ||
| 92 | /** | ||
| 93 | * Unlike the `initiallyOpen` case above, if a hash is detected | ||
| 94 | * that matches one of the accordion items, we probably _want_ | ||
| 95 | * the other items to close so the user can focus on this item. | ||
| 96 | */ | ||
| 97 | openItem(); | ||
| 98 | |||
| 99 | // Open ancestors if necessary | ||
| 100 | $.each(item.accordionAncestorItems, function(index, uuid) { | ||
| 101 | $(document).trigger('openAncestorAccordionItem', uuid); | ||
| 102 | }); | ||
| 103 | } | ||
| 104 | // Otherwise, close the item | ||
| 105 | else { | ||
| 106 | /** | ||
| 107 | * Don't use closeItem() function call since it animates the | ||
| 108 | * closing. Instead, we only need to set the closed attributes. | ||
| 109 | */ | ||
| 110 | setCloseItemAttributes(); | ||
| 111 | } | ||
| 112 | })(); | ||
| 113 | |||
| 114 | |||
| 115 | |||
| 116 | /** | ||
| 117 | * Default click function | ||
| 118 | * Called when an accordion controller is clicked. | ||
| 119 | */ | ||
| 120 | function clickHandler() { | ||
| 121 | // Only open the item if item isn't already open | ||
| 122 | if (!item.self.hasClass('is-open')) { | ||
| 123 | // Open clicked item | ||
| 124 | openItem(); | ||
| 125 | } | ||
| 126 | // If item is open, and click to close is set, close it | ||
| 127 | else if (settings.clickToClose) { | ||
| 128 | closeItem(); | ||
| 129 | } | ||
| 130 | |||
| 131 | return false; | ||
| 132 | } | ||
| 133 | |||
| 134 | |||
| 135 | |||
| 136 | /** | ||
| 137 | * Get the accordion item UUID for a given accordion item DOM element. | ||
| 138 | */ | ||
| 139 | function getAccordionItemUUID(ele) { | ||
| 140 | return $(ele).children('.js-accordion-controller').attr('id').replace('at-', ''); | ||
| 141 | } | ||
| 142 | |||
| 143 | |||
| 144 | |||
| 145 | /** | ||
| 146 | * Opens an accordion item | ||
| 147 | * Also handles accessibility attribute settings. | ||
| 148 | */ | ||
| 149 | function openItem() { | ||
| 150 | setOpenItemAttributes(); | ||
| 151 | |||
| 152 | // Clear/stop any previous animations before revealing content | ||
| 153 | item.content.clearQueue().stop().slideDown(duration, function() { | ||
| 154 | // Scroll page to the title | ||
| 155 | if (settings.scroll) { | ||
| 156 | // Pause scrolling until other items have closed | ||
| 157 | setTimeout(function() { | ||
| 158 | $('html, body').animate({ | ||
| 159 | scrollTop: item.self.offset().top - settings.scrollOffset | ||
| 160 | }, duration); | ||
| 161 | }, duration); | ||
| 162 | } | ||
| 163 | }); | ||
| 164 | |||
| 165 | $(document).trigger('openAccordionItem', item); | ||
| 166 | } | ||
| 167 | |||
| 168 | |||
| 169 | |||
| 170 | /** | ||
| 171 | * Set open item attributes | ||
| 172 | * Mark accordion item as open and read and set aria attributes. | ||
| 173 | */ | ||
| 174 | function setOpenItemAttributes() { | ||
| 175 | item.self.addClass('is-open is-read'); | ||
| 176 | item.controller.attr('aria-expanded', true); | ||
| 177 | item.content.prop('hidden', false); | ||
| 178 | } | ||
| 179 | |||
| 180 | |||
| 181 | |||
| 182 | /** | ||
| 183 | * Closes an accordion item | ||
| 184 | * Also handles accessibility attribute settings. | ||
| 185 | */ | ||
| 186 | function closeItem() { | ||
| 187 | // Close the item | ||
| 188 | item.content.slideUp(duration, function() { | ||
| 189 | setCloseItemAttributes(); | ||
| 190 | }); | ||
| 191 | } | ||
| 192 | |||
| 193 | |||
| 194 | |||
| 195 | /** | ||
| 196 | * Set closed item attributes | ||
| 197 | * Mark accordion item as closed and set aria attributes. | ||
| 198 | */ | ||
| 199 | function setCloseItemAttributes() { | ||
| 200 | item.self.removeClass('is-open'); | ||
| 201 | item.controller.attr('aria-expanded', false); | ||
| 202 | item.content.attr('hidden', true); | ||
| 203 | } | ||
| 204 | |||
| 205 | |||
| 206 | |||
| 207 | /** | ||
| 208 | * Close all items if auto close is enabled | ||
| 209 | */ | ||
| 210 | function maybeCloseItem() { | ||
| 211 | if (settings.autoClose && item.self.hasClass('is-open')) { | ||
| 212 | closeItem(); | ||
| 213 | } | ||
| 214 | } | ||
| 215 | |||
| 216 | |||
| 217 | |||
| 218 | /** | ||
| 219 | * Add event listeners | ||
| 220 | */ | ||
| 221 | item.controller.on('click', clickHandler); | ||
| 222 | |||
| 223 | |||
| 224 | |||
| 225 | /** | ||
| 226 | * Listen for other accordion items opening | ||
| 227 | * | ||
| 228 | * The `openAccordionItem` event is fired whenever an accordion item is | ||
| 229 | * opened after initial plugin setup. | ||
| 230 | */ | ||
| 231 | $(document).on('openAccordionItem', function(event, ele) { | ||
| 232 | /** | ||
| 233 | * Only trigger potential close these conditions are met: | ||
| 234 | * | ||
| 235 | * 1. This isn't the item the user just clicked to open. | ||
| 236 | * 2. This accordion is in the same group of accordions as the one | ||
| 237 | * that was just clicked to open. | ||
| 238 | * 3. This accordion is not an ancestor of the item that was just | ||
| 239 | * clicked to open. | ||
| 240 | * | ||
| 241 | * This serves two purposes: | ||
| 242 | * | ||
| 243 | * 1. It allows nesting of accordions to work. | ||
| 244 | * 2. It allows users to group accordions to control independently | ||
| 245 | * of other groups of accordions. | ||
| 246 | * 3. It allows child accordions to be opened via hash change | ||
| 247 | * without automatically closing the parent accordion, therefore | ||
| 248 | * hiding the accordion the user just indicated they wanted open. | ||
| 249 | */ | ||
| 250 | if ( | ||
| 251 | ele !== item && | ||
| 252 | ele.accordionGroupItems.indexOf(item.uuid) > 0 && | ||
| 253 | ele.accordionAncestorItems.indexOf(item.uuid) === -1 | ||
| 254 | ) { | ||
| 255 | maybeCloseItem(); | ||
| 256 | } | ||
| 257 | }); | ||
| 258 | |||
| 259 | |||
| 260 | |||
| 261 | /** | ||
| 262 | * Listen for ancestor opening requests | ||
| 263 | * | ||
| 264 | * The `openAncestorAccordionItem` event is fired whenever a nested | ||
| 265 | * accordion item is opened, but the ancestors may also need to be | ||
| 266 | * opened. | ||
| 267 | */ | ||
| 268 | $(document).on('openAncestorAccordionItem', function(event, uuid) { | ||
| 269 | if (uuid === item.uuid) { | ||
| 270 | openItem(); | ||
| 271 | } | ||
| 272 | }); | ||
| 273 | |||
| 274 | |||
| 275 | |||
| 276 | item.controller.on('keydown', function(event) { | ||
| 277 | var code = event.which; | ||
| 278 | |||
| 279 | if (item.controller.prop('tagName') !== 'BUTTON') { | ||
| 280 | // 13 = Return, 32 = Space | ||
| 281 | if ((code === 13) || (code === 32)) { | ||
| 282 | // Simulate click on the controller | ||
| 283 | $(this).click(); | ||
| 284 | } | ||
| 285 | } | ||
| 286 | |||
| 287 | // 27 = Esc | ||
| 288 | if (code === 27) { | ||
| 289 | maybeCloseItem(); | ||
| 290 | } | ||
| 291 | }); | ||
| 292 | |||
| 293 | // Listen for hash changes (in page jump links for accordions) | ||
| 294 | $(window).on('hashchange', function() { | ||
| 295 | hashID = window.location.hash.replace('#', ''); | ||
| 296 | |||
| 297 | // Only open this item if the has matches the ID | ||
| 298 | if (hashID === item.id) { | ||
| 299 | var ele = $('#' + hashID); | ||
| 300 | |||
| 301 | // If there is a hash and the hash is on an accordion item | ||
| 302 | if (ele.length && ele.hasClass('js-accordion-item')) { | ||
| 303 | // Open clicked item | ||
| 304 | openItem(); | ||
| 305 | |||
| 306 | // Open ancestors if necessary | ||
| 307 | $.each(item.accordionAncestorItems, function(index, uuid) { | ||
| 308 | $(document).trigger('openAncestorAccordionItem', uuid); | ||
| 309 | }); | ||
| 310 | } | ||
| 311 | } | ||
| 312 | }); | ||
| 313 | |||
| 314 | return this; | ||
| 315 | }; | ||
| 316 | |||
| 317 | |||
| 318 | |||
| 319 | // Loop through accordion settings objects | ||
| 320 | // Wait for the entire page to load before loading the accordion | ||
| 321 | $(window).on('load', function() { | ||
| 322 | $('.js-accordion-item').each(function() { | ||
| 323 | $(this).accordionBlockItem({ | ||
| 324 | // Set default settings | ||
| 325 | initiallyOpen: $(this).data('initially-open'), | ||
| 326 | autoClose: $(this).data('auto-close'), | ||
| 327 | clickToClose: $(this).data('click-to-close'), | ||
| 328 | scroll: $(this).data('scroll'), | ||
| 329 | scrollOffset: $(this).data('scroll-offset'), | ||
| 330 | }); | ||
| 331 | }); | ||
| 332 | }); | ||
| 333 | }(jQuery)); |
| 1 | !function(u){"use strict";u(".js-accordion-item").removeClass("no-js"),u.fn.accordionBlockItem=function(o){var n=u.extend({initiallyOpen:!1,autoClose:!0,clickToClose:!0,scroll:!1,scrollOffset:!1},o),t=250,c=window.location.hash.replace("#",""),e={};function i(o){return u(o).children(".js-accordion-controller").attr("id").replace("at-","")}function s(){r(),e.content.clearQueue().stop().slideDown(t,function(){n.scroll&&setTimeout(function(){u("html, body").animate({scrollTop:e.self.offset().top-n.scrollOffset},t)},t)}),u(document).trigger("openAccordionItem",e)}function r(){e.self.addClass("is-open is-read"),e.controller.attr("aria-expanded",!0),e.content.prop("hidden",!1)}function l(){e.content.slideUp(t,function(){a()})}function a(){e.self.removeClass("is-open"),e.controller.attr("aria-expanded",!1),e.content.attr("hidden",!0)}function d(){n.autoClose&&e.self.hasClass("is-open")&&l()}return e.self=u(this),e.id=u(this).attr("id"),e.controller=u(this).children(".js-accordion-controller"),e.uuid=i(e.self),e.content=u("#ac-"+e.uuid),e.accordionGroupItems=[e.uuid],e.accordionAncestorItems=[],e.controller.attr({tabindex:0,"aria-controls":"ac-"+e.uuid}),n.scrollOffset=Math.floor(parseInt(n.scrollOffset,10))||0,u.each(e.self.siblings(".js-accordion-item"),function(o,n){var t=i(n);e.accordionGroupItems.push(t)}),u.each(e.self.parents(".js-accordion-item"),function(o,n){var t=i(n);e.accordionAncestorItems.push(t)}),n.initiallyOpen?r():e.id===c?(s(),u.each(e.accordionAncestorItems,function(o,n){u(document).trigger("openAncestorAccordionItem",n)})):a(),e.controller.on("click",function(){return e.self.hasClass("is-open")?n.clickToClose&&l():s(),!1}),u(document).on("openAccordionItem",function(o,n){n!==e&&0<n.accordionGroupItems.indexOf(e.uuid)&&-1===n.accordionAncestorItems.indexOf(e.uuid)&&d()}),u(document).on("openAncestorAccordionItem",function(o,n){n===e.uuid&&s()}),e.controller.on("keydown",function(o){var n=o.which;"BUTTON"!==e.controller.prop("tagName")&&(13!==n&&32!==n||u(this).click()),27===n&&d()}),u(window).on("hashchange",function(){var o;(c=window.location.hash.replace("#",""))!==e.id||(o=u("#"+c)).length&&o.hasClass("js-accordion-item")&&(s(),u.each(e.accordionAncestorItems,function(o,n){u(document).trigger("openAncestorAccordionItem",n)}))}),this},u(window).on("load",function(){u(".js-accordion-item").each(function(){u(this).accordionBlockItem({initiallyOpen:u(this).data("initially-open"),autoClose:u(this).data("auto-close"),clickToClose:u(this).data("click-to-close"),scroll:u(this).data("scroll"),scrollOffset:u(this).data("scroll-offset")})})})}(jQuery); |
This diff is collapsed.
Click to expand it.
| ... | @@ -98,9 +98,10 @@ error_log($carousel_style ); | ... | @@ -98,9 +98,10 @@ error_log($carousel_style ); |
| 98 | <?php endwhile; ?> | 98 | <?php endwhile; ?> |
| 99 | </div> | 99 | </div> |
| 100 | <div class="swiper-pagination"></div> | 100 | <div class="swiper-pagination"></div> |
| 101 | </div> | 101 | |
| 102 | <div class="swiper-button-prev" data-id="<?= $id ?>"></div> | 102 | <div class="swiper-button-prev" data-id="<?= $id ?>"></div> |
| 103 | <div class="swiper-button-next" data-id="<?= $id ?>"></div> | 103 | <div class="swiper-button-next" data-id="<?= $id ?>"></div> |
| 104 | </div> | ||
| 104 | <?php else: ?> | 105 | <?php else: ?> |
| 105 | <p>Please add some slides.</p> | 106 | <p>Please add some slides.</p> |
| 106 | <?php endif; ?> | 107 | <?php endif; ?> | ... | ... |
| ... | @@ -15604,11 +15604,10 @@ h1, .h1 { | ... | @@ -15604,11 +15604,10 @@ h1, .h1 { |
| 15604 | } | 15604 | } |
| 15605 | 15605 | ||
| 15606 | h2, .h2 { | 15606 | h2, .h2 { |
| 15607 | text-align: center; | ||
| 15608 | color: #0484B8; | 15607 | color: #0484B8; |
| 15609 | font-size: 40px; | 15608 | font-size: 40px; |
| 15610 | line-height: 49px; | 15609 | line-height: 49px; |
| 15611 | margin-bottom: 40px; | 15610 | margin-bottom: 20px; |
| 15612 | } | 15611 | } |
| 15613 | 15612 | ||
| 15614 | h3, .h3 { | 15613 | h3, .h3 { |
| ... | @@ -15618,6 +15617,14 @@ h3, .h3 { | ... | @@ -15618,6 +15617,14 @@ h3, .h3 { |
| 15618 | margin-top: 20px; | 15617 | margin-top: 20px; |
| 15619 | } | 15618 | } |
| 15620 | 15619 | ||
| 15620 | a { | ||
| 15621 | color: #2C2C2C; | ||
| 15622 | } | ||
| 15623 | |||
| 15624 | div#full-width-page-wrapper { | ||
| 15625 | padding-bottom: 0px; | ||
| 15626 | } | ||
| 15627 | |||
| 15621 | input[type=text], input[type=email] { | 15628 | input[type=text], input[type=email] { |
| 15622 | border-radius: 0px !important; | 15629 | border-radius: 0px !important; |
| 15623 | border: 0px solid #fff !important; | 15630 | border: 0px solid #fff !important; |
| ... | @@ -15659,16 +15666,21 @@ input[type=checkbox] { | ... | @@ -15659,16 +15666,21 @@ input[type=checkbox] { |
| 15659 | border-bottom: 20px solid #0484B8; | 15666 | border-bottom: 20px solid #0484B8; |
| 15660 | } | 15667 | } |
| 15661 | 15668 | ||
| 15662 | #wpcf7-f115-p18-o1 { | 15669 | .wpcf7 { |
| 15670 | max-width: 100% !important; | ||
| 15671 | } | ||
| 15672 | .wpcf7 .contact-form { | ||
| 15673 | padding-top: 40px; | ||
| 15663 | max-width: 80% !important; | 15674 | max-width: 80% !important; |
| 15675 | margin: auto; | ||
| 15664 | } | 15676 | } |
| 15665 | #wpcf7-f115-p18-o1 input[type=text], #wpcf7-f115-p18-o1 input[type=email], #wpcf7-f115-p18-o1 textarea { | 15677 | .wpcf7 .contact-form input[type=text], .wpcf7 .contact-form input[type=email], .wpcf7 .contact-form textarea { |
| 15666 | background-color: #E5F2F8; | 15678 | background-color: #E5F2F8; |
| 15667 | } | 15679 | } |
| 15668 | #wpcf7-f115-p18-o1 .wpcf7-list-item { | 15680 | .wpcf7 .contact-form .wpcf7-list-item { |
| 15669 | margin: 0px; | 15681 | margin: 0px; |
| 15670 | } | 15682 | } |
| 15671 | #wpcf7-f115-p18-o1 input[type=submit] { | 15683 | .wpcf7 .contact-form input[type=submit] { |
| 15672 | text-align: center; | 15684 | text-align: center; |
| 15673 | margin: auto; | 15685 | margin: auto; |
| 15674 | margin-top: 20px; | 15686 | margin-top: 20px; |
| ... | @@ -15677,6 +15689,22 @@ input[type=checkbox] { | ... | @@ -15677,6 +15689,22 @@ input[type=checkbox] { |
| 15677 | color: #fff; | 15689 | color: #fff; |
| 15678 | text-transform: uppercase; | 15690 | text-transform: uppercase; |
| 15679 | display: block; | 15691 | display: block; |
| 15692 | font-size: 18px; | ||
| 15693 | } | ||
| 15694 | |||
| 15695 | .no-bullets { | ||
| 15696 | list-style: none; | ||
| 15697 | -webkit-margin-before: 0em; | ||
| 15698 | margin-block-start: 0em; | ||
| 15699 | -webkit-padding-start: 0px; | ||
| 15700 | padding-inline-start: 0px; | ||
| 15701 | } | ||
| 15702 | .no-bullets li { | ||
| 15703 | margin-bottom: 10px; | ||
| 15704 | } | ||
| 15705 | |||
| 15706 | .wp-block-image.is-style-rounded img { | ||
| 15707 | border-radius: 25px; | ||
| 15680 | } | 15708 | } |
| 15681 | 15709 | ||
| 15682 | .pre-header { | 15710 | .pre-header { |
| ... | @@ -15828,11 +15856,11 @@ input[type=checkbox] { | ... | @@ -15828,11 +15856,11 @@ input[type=checkbox] { |
| 15828 | background-position: center; | 15856 | background-position: center; |
| 15829 | background-repeat: no-repeat; | 15857 | background-repeat: no-repeat; |
| 15830 | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23.024' height='23.545' viewBox='0 0 23.024 23.545'%3E%3Cg id='Group_1373' data-name='Group 1373' transform='translate(0 1.5)'%3E%3Cline id='Line_15' data-name='Line 15' y1='15.007' transform='translate(11.512 7.038)' fill='none' stroke='%23fff' stroke-width='3'/%3E%3Cpath id='Path_1388' data-name='Path 1388' d='M3331.593 12517.547h23.024' transform='translate(-3331.593 -12517.547)' fill='none' stroke='%23fff' stroke-width='3'/%3E%3Cpath id='Path_1389' data-name='Path 1389' d='M3279.832 12508.2l8.216-8.217 8.216 8.217' transform='translate(-3276.535 -12494.895)' fill='none' stroke='%23fff' stroke-width='3'/%3E%3C/g%3E%3C/svg%3E"); | 15858 | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23.024' height='23.545' viewBox='0 0 23.024 23.545'%3E%3Cg id='Group_1373' data-name='Group 1373' transform='translate(0 1.5)'%3E%3Cline id='Line_15' data-name='Line 15' y1='15.007' transform='translate(11.512 7.038)' fill='none' stroke='%23fff' stroke-width='3'/%3E%3Cpath id='Path_1388' data-name='Path 1388' d='M3331.593 12517.547h23.024' transform='translate(-3331.593 -12517.547)' fill='none' stroke='%23fff' stroke-width='3'/%3E%3Cpath id='Path_1389' data-name='Path 1389' d='M3279.832 12508.2l8.216-8.217 8.216 8.217' transform='translate(-3276.535 -12494.895)' fill='none' stroke='%23fff' stroke-width='3'/%3E%3C/g%3E%3C/svg%3E"); |
| 15859 | z-index: 999; | ||
| 15831 | } | 15860 | } |
| 15832 | 15861 | ||
| 15833 | #btn-back-to-top:hover { | 15862 | #btn-back-to-top:hover { |
| 15834 | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23.024' height='23.545' viewBox='0 0 23.024 23.545'%3E%3Cg id='Group_1373' data-name='Group 1373' transform='translate(0 1.5)'%3E%3Cline id='Line_15' data-name='Line 15' y1='15.007' transform='translate(11.512 7.038)' fill='none' stroke='%232C2C2C' stroke-width='3'/%3E%3Cpath id='Path_1388' data-name='Path 1388' d='M3331.593 12517.547h23.024' transform='translate(-3331.593 -12517.547)' fill='none' stroke='%232C2C2C' stroke-width='3'/%3E%3Cpath id='Path_1389' data-name='Path 1389' d='M3279.832 12508.2l8.216-8.217 8.216 8.217' transform='translate(-3276.535 -12494.895)' fill='none' stroke='%2C2C2C' stroke-width='3'/%3E%3C/g%3E%3C/svg%3E"); | 15863 | background-color: #000; |
| 15835 | background-color: #fff; | ||
| 15836 | } | 15864 | } |
| 15837 | 15865 | ||
| 15838 | #wrapper-footer-full { | 15866 | #wrapper-footer-full { |
| ... | @@ -15866,7 +15894,7 @@ input[type=checkbox] { | ... | @@ -15866,7 +15894,7 @@ input[type=checkbox] { |
| 15866 | .newsletter { | 15894 | .newsletter { |
| 15867 | background-color: #6ED5FF; | 15895 | background-color: #6ED5FF; |
| 15868 | min-height: 236px; | 15896 | min-height: 236px; |
| 15869 | padding-top: 52px; | 15897 | padding: 52px 0px 32px 0px; |
| 15870 | } | 15898 | } |
| 15871 | .newsletter h2, .newsletter .h2 { | 15899 | .newsletter h2, .newsletter .h2 { |
| 15872 | font-size: 18px; | 15900 | font-size: 18px; |
| ... | @@ -15923,12 +15951,6 @@ input[type=checkbox] { | ... | @@ -15923,12 +15951,6 @@ input[type=checkbox] { |
| 15923 | left: 0 !important; | 15951 | left: 0 !important; |
| 15924 | min-height: 340px !important; | 15952 | min-height: 340px !important; |
| 15925 | } | 15953 | } |
| 15926 | .carousel .carousel-items { | ||
| 15927 | margin-left: 1.75rem; | ||
| 15928 | } | ||
| 15929 | .carousel .swiper-wrapper { | ||
| 15930 | gap: 1rem; | ||
| 15931 | } | ||
| 15932 | .carousel .swiper-button-next { | 15954 | .carousel .swiper-button-next { |
| 15933 | right: 8px !important; | 15955 | right: 8px !important; |
| 15934 | } | 15956 | } |
| ... | @@ -15938,6 +15960,12 @@ input[type=checkbox] { | ... | @@ -15938,6 +15960,12 @@ input[type=checkbox] { |
| 15938 | .carousel .swiper-pagination { | 15960 | .carousel .swiper-pagination { |
| 15939 | bottom: -20px !important; | 15961 | bottom: -20px !important; |
| 15940 | } | 15962 | } |
| 15963 | .carousel .carousel-items { | ||
| 15964 | margin-left: 1.75rem; | ||
| 15965 | } | ||
| 15966 | .carousel .swiper-wrapper { | ||
| 15967 | gap: 1rem; | ||
| 15968 | } | ||
| 15941 | 15969 | ||
| 15942 | .testimonials-carousel .swiper-slide { | 15970 | .testimonials-carousel .swiper-slide { |
| 15943 | width: 890px !important; | 15971 | width: 890px !important; |
| ... | @@ -15945,7 +15973,7 @@ input[type=checkbox] { | ... | @@ -15945,7 +15973,7 @@ input[type=checkbox] { |
| 15945 | .testimonials-carousel .swiper-slide .testimonials { | 15973 | .testimonials-carousel .swiper-slide .testimonials { |
| 15946 | width: 890px; | 15974 | width: 890px; |
| 15947 | background: #E5F2F8; | 15975 | background: #E5F2F8; |
| 15948 | border-radius: 8px 8px 0px 0px; | 15976 | border-radius: 25px 25px 0px 0px; |
| 15949 | margin-right: 20px; | 15977 | margin-right: 20px; |
| 15950 | } | 15978 | } |
| 15951 | .testimonials-carousel .swiper-slide .testimonials .row { | 15979 | .testimonials-carousel .swiper-slide .testimonials .row { |
| ... | @@ -15971,12 +15999,118 @@ input[type=checkbox] { | ... | @@ -15971,12 +15999,118 @@ input[type=checkbox] { |
| 15971 | .testimonials-carousel .swiper-slide:nth-of-type(2) .testimonials .row { | 15999 | .testimonials-carousel .swiper-slide:nth-of-type(2) .testimonials .row { |
| 15972 | border-bottom: 20px solid #3F9C35; | 16000 | border-bottom: 20px solid #3F9C35; |
| 15973 | } | 16001 | } |
| 16002 | .testimonials-carousel .swiper-slide:nth-of-type(2) .promo-img img { | ||
| 16003 | border-bottom: 20px solid #3F9C35; | ||
| 16004 | } | ||
| 15974 | .testimonials-carousel .swiper-slide:nth-of-type(3) .testimonials .row { | 16005 | .testimonials-carousel .swiper-slide:nth-of-type(3) .testimonials .row { |
| 15975 | border-bottom: 20px solid #0484B8; | 16006 | border-bottom: 20px solid #0484B8; |
| 15976 | } | 16007 | } |
| 16008 | .testimonials-carousel .swiper-slide:nth-of-type(3) .promo-img img { | ||
| 16009 | border-bottom: 20px solid #0484B8; | ||
| 16010 | } | ||
| 15977 | .testimonials-carousel .swiper-slide:nth-of-type(4) .testimonials .row { | 16011 | .testimonials-carousel .swiper-slide:nth-of-type(4) .testimonials .row { |
| 15978 | border-bottom: 20px solid #E04E39; | 16012 | border-bottom: 20px solid #E04E39; |
| 15979 | } | 16013 | } |
| 16014 | .testimonials-carousel .swiper-slide:nth-of-type(4) .promo-img img { | ||
| 16015 | border-bottom: 20px solid #E04E39; | ||
| 16016 | } | ||
| 16017 | |||
| 16018 | .promo-carousel { | ||
| 16019 | width: 100% !important; | ||
| 16020 | margin-left: 0px !important; | ||
| 16021 | position: relative; | ||
| 16022 | } | ||
| 16023 | @media only screen and (min-width: 1400px) { | ||
| 16024 | .promo-carousel { | ||
| 16025 | max-width: 100% !important; | ||
| 16026 | } | ||
| 16027 | } | ||
| 16028 | .promo-carousel .swiper-slide { | ||
| 16029 | margin-left: 0px !important; | ||
| 16030 | max-width: 100% !important; | ||
| 16031 | } | ||
| 16032 | @media only screen and (min-width: 1400px) { | ||
| 16033 | .promo-carousel .swiper-slide { | ||
| 16034 | width: 100% !important; | ||
| 16035 | } | ||
| 16036 | } | ||
| 16037 | .promo-carousel .swiper-slide .promo-img { | ||
| 16038 | max-height: 264px; | ||
| 16039 | max-width: 372px; | ||
| 16040 | overflow: hidden; | ||
| 16041 | border-bottom: 20px solid #FFA300; | ||
| 16042 | } | ||
| 16043 | .promo-carousel .swiper-slide .promo-img img { | ||
| 16044 | max-width: 372px; | ||
| 16045 | border-radius: 25px 25px 0px 0px; | ||
| 16046 | } | ||
| 16047 | .promo-carousel .swiper-slide .promo.row { | ||
| 16048 | width: 100%; | ||
| 16049 | border-top: 1px solid #FFA300; | ||
| 16050 | border-bottom: 1px solid #FFA300; | ||
| 16051 | margin: 75px auto; | ||
| 16052 | padding: 56px 0px; | ||
| 16053 | } | ||
| 16054 | @media only screen and (min-width: 1400px) { | ||
| 16055 | .promo-carousel .swiper-slide .promo.row { | ||
| 16056 | max-width: 1344px; | ||
| 16057 | } | ||
| 16058 | } | ||
| 16059 | @media only screen and (max-width: 600px) { | ||
| 16060 | .promo-carousel .swiper-slide .promo.row { | ||
| 16061 | width: 80%; | ||
| 16062 | } | ||
| 16063 | } | ||
| 16064 | .promo-carousel .swiper-button-next { | ||
| 16065 | right: 30px !important; | ||
| 16066 | } | ||
| 16067 | .promo-carousel .swiper-button-prev { | ||
| 16068 | left: 7px !important; | ||
| 16069 | } | ||
| 16070 | .promo-carousel .swiper-pagination { | ||
| 16071 | bottom: 95px !important; | ||
| 16072 | } | ||
| 16073 | .promo-carousel .swiper-slide:nth-of-type(2) .promo-img { | ||
| 16074 | border-bottom: 20px solid #3F9C35; | ||
| 16075 | } | ||
| 16076 | .promo-carousel .swiper-slide:nth-of-type(3) .promo-img { | ||
| 16077 | border-bottom: 20px solid #0484B8; | ||
| 16078 | } | ||
| 16079 | .promo-carousel .swiper-slide:nth-of-type(4) .promo-img { | ||
| 16080 | border-bottom: 20px solid #E04E39; | ||
| 16081 | } | ||
| 16082 | |||
| 16083 | .c-accordion__title:after { | ||
| 16084 | content: "\f343"; | ||
| 16085 | font-family: "Font Awesome"; | ||
| 16086 | right: unset; | ||
| 16087 | left: 0px; | ||
| 16088 | } | ||
| 16089 | |||
| 16090 | .is-open > .c-accordion__title:after { | ||
| 16091 | content: "\f077"; | ||
| 16092 | font-family: "Font Awesome"; | ||
| 16093 | } | ||
| 16094 | |||
| 16095 | .c-accordion__title { | ||
| 16096 | padding-left: 30px; | ||
| 16097 | } | ||
| 16098 | |||
| 16099 | .c-accordion__content { | ||
| 16100 | padding-left: 30px; | ||
| 16101 | } | ||
| 16102 | |||
| 16103 | .js-accordion-item { | ||
| 16104 | background: var(--unnamed-color-ffffff) 0% 0% no-repeat padding-box; | ||
| 16105 | background: #FFFFFF 0% 0% no-repeat padding-box; | ||
| 16106 | box-shadow: 0px 3px 6px #00000029; | ||
| 16107 | border-radius: 10px; | ||
| 16108 | padding: 15px 10px 8px 10px; | ||
| 16109 | margin-bottom: 20px; | ||
| 16110 | } | ||
| 16111 | .js-accordion-item h3, .js-accordion-item .h3 { | ||
| 16112 | margin-top: 0px !important; | ||
| 16113 | } | ||
| 15980 | 16114 | ||
| 15981 | .has-blue-color, | 16115 | .has-blue-color, |
| 15982 | .has-blue-color:visited { | 16116 | .has-blue-color:visited { | ... | ... |
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
| ... | @@ -9,6 +9,8 @@ | ... | @@ -9,6 +9,8 @@ |
| 9 | defined( 'ABSPATH' ) || exit; | 9 | defined( 'ABSPATH' ) || exit; |
| 10 | include 'inc/menu-widgets.php'; | 10 | include 'inc/menu-widgets.php'; |
| 11 | include 'inc/blocks.php'; | 11 | include 'inc/blocks.php'; |
| 12 | include 'inc/custom-post-type.php'; | ||
| 13 | include 'inc/shortcodes.php'; | ||
| 12 | 14 | ||
| 13 | 15 | ||
| 14 | /** | 16 | /** | ... | ... |
| 1 | <?php | ||
| 2 | |||
| 3 | function create_posttype() { | ||
| 4 | |||
| 5 | register_post_type( 'promo', | ||
| 6 | array( | ||
| 7 | 'labels' => array( | ||
| 8 | 'name' => __( 'Promos' ), | ||
| 9 | 'singular_name' => __( 'Promo' ) | ||
| 10 | ), | ||
| 11 | 'menu_icon' => 'dashicons-info', | ||
| 12 | 'public' => true, | ||
| 13 | 'has_archive' => false, | ||
| 14 | 'rewrite' => array('slug' => 'promo', 'with_front'=>false), | ||
| 15 | 'show_in_rest' => true, | ||
| 16 | 'taxonomies' => array( 'category' ), | ||
| 17 | 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields' ), | ||
| 18 | |||
| 19 | ) | ||
| 20 | ); | ||
| 21 | |||
| 22 | $labels = array( | ||
| 23 | 'name' => _x( 'Promo Categories', 'taxonomy general name' ), | ||
| 24 | 'singular_name' => _x( 'Promo Category', 'taxonomy singular name' ), | ||
| 25 | 'search_items' => __( 'Search Promo Cats' ), | ||
| 26 | 'all_items' => __( 'All Promo Cats' ), | ||
| 27 | 'parent_item' => __( 'Parent Subject' ), | ||
| 28 | 'parent_item_colon' => __( 'Parent Subject:' ), | ||
| 29 | 'edit_item' => __( 'Edit Subject' ), | ||
| 30 | 'update_item' => __( 'Update Subject' ), | ||
| 31 | 'add_new_item' => __( 'Add New Subject' ), | ||
| 32 | 'new_item_name' => __( 'New Subject Name' ), | ||
| 33 | 'menu_name' => __( 'Promo Category' ), | ||
| 34 | ); | ||
| 35 | |||
| 36 | // Now register the taxonomy | ||
| 37 | register_taxonomy('promo_category',array('promo'), array( | ||
| 38 | 'hierarchical' => true, | ||
| 39 | 'labels' => $labels, | ||
| 40 | 'show_ui' => true, | ||
| 41 | 'show_in_rest' => true, | ||
| 42 | 'show_admin_column' => true, | ||
| 43 | 'query_var' => true, | ||
| 44 | 'rewrite' => array( 'slug' => 'promo-category' ), | ||
| 45 | )); | ||
| 46 | |||
| 47 | } | ||
| 48 | |||
| 49 | add_action( 'init', 'create_posttype' ); | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
wp-content/themes/crlg/inc/shortcodes.php
0 → 100644
| 1 | <?php | ||
| 2 | function promos() | ||
| 3 | { | ||
| 4 | $custom_args = array( | ||
| 5 | 'post_type' => 'promo', | ||
| 6 | 'posts_per_page' => 3, | ||
| 7 | 'paged' => 1, | ||
| 8 | ); | ||
| 9 | $custom_query = new \WP_Query($custom_args); | ||
| 10 | |||
| 11 | ob_start(); | ||
| 12 | $uniqid = uniqid(); | ||
| 13 | if ($custom_query->have_posts()):?> | ||
| 14 | <div class="carousel"> | ||
| 15 | <div id="<?php echo $uniqid; ?>" class="promo-carousel carousel-items"> | ||
| 16 | <div class='swiper-wrapper'> | ||
| 17 | <?php while ($custom_query->have_posts()): $custom_query->the_post(); | ||
| 18 | $id = get_the_ID(); | ||
| 19 | $post = get_post($id); | ||
| 20 | $link = get_permalink($id); | ||
| 21 | if ($custom_link = get_post_meta($id, 'link', true)) { | ||
| 22 | $link = $custom_link; | ||
| 23 | } | ||
| 24 | $link_text = "Read More..."; | ||
| 25 | if ($custom_link_text = get_post_meta($id, 'link_text', true)) { | ||
| 26 | $link_text = $custom_link_text; | ||
| 27 | } | ||
| 28 | $text = strip_shortcodes($post->post_content); | ||
| 29 | $text = apply_filters( 'the_content', $text ); | ||
| 30 | $text = str_replace(']]>', ']]>', $text); | ||
| 31 | |||
| 32 | $excerpt_length = apply_filters( 'excerpt_length', 40 ); | ||
| 33 | $text = wp_trim_words( $text, $excerpt_length, ' ...' ); | ||
| 34 | ?> | ||
| 35 | <div class="swiper-slide container"> | ||
| 36 | <div class="promo row align-items-center"> | ||
| 37 | <div class="col-lg-4 col-md-12"> | ||
| 38 | <div class="promo-img"> | ||
| 39 | <?php echo get_the_post_thumbnail($id, 'full' ); ?> | ||
| 40 | <div class="promo-img-over"> </div> | ||
| 41 | </div> | ||
| 42 | </div> | ||
| 43 | <div class="promo_content col-lg-8 col-md-12"> | ||
| 44 | <?php echo '<h3>'.$post->post_title.'</h3><p>'. $text.'</p>'; ?> | ||
| 45 | <a class="promo-link" target="_blank" href="<?php echo $link; ?>" title="<?php the_title_attribute(); ?>"><?php echo $link_text;?></a> | ||
| 46 | </div> | ||
| 47 | </div> | ||
| 48 | </div> | ||
| 49 | <?php endwhile; ?> | ||
| 50 | </div> | ||
| 51 | <div class="swiper-pagination"></div> | ||
| 52 | <div class="swiper-button-prev" data-id="<?= $uniqid; ?>"></div> | ||
| 53 | <div class="swiper-button-next" data-id="<?= $uniqid; ?>"></div> | ||
| 54 | </div> | ||
| 55 | </div> | ||
| 56 | <?php endif; ?> | ||
| 57 | <?php wp_reset_query(); ?> | ||
| 58 | <?php $output = ob_get_clean(); | ||
| 59 | |||
| 60 | return $output; | ||
| 61 | } | ||
| 62 | |||
| 63 | add_shortcode( 'promos', 'promos' ); | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
This diff is collapsed.
Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
| 1 | module.exports = { | 1 | module.exports = { |
| 2 | "proxy": "localhost/", | 2 | "proxy": "http://st-joes.test/", |
| 3 | "notify": false, | 3 | "notify": false, |
| 4 | "files": ["./css/*.min.css", "./js/*.min.js", "./**/*.php"] | 4 | "files": ["./css/*.min.css", "./js/*.min.js", "./**/*.php"] |
| 5 | }; | 5 | }; |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| 1 | import Swiper, { Navigation, Pagination } from 'swiper'; | 1 | import Swiper, { Navigation, Pagination, A11y, Keyboard } from 'swiper'; |
| 2 | import 'swiper/css'; | 2 | import 'swiper/css'; |
| 3 | import 'swiper/css/navigation'; | 3 | import 'swiper/css/navigation'; |
| 4 | import 'swiper/css/pagination'; | 4 | import 'swiper/css/pagination'; |
| 5 | 5 | import 'swiper/css/keyboard'; | |
| 6 | import 'swiper/css/a11y'; | ||
| 6 | 7 | ||
| 7 | jQuery(document).ready(function($) { | 8 | jQuery(document).ready(function($) { |
| 8 | 9 | ||
| 9 | 10 | ||
| 10 | var offset = ((window.innerWidth - $('.entry-content').width() ) / 2) - 28; | ||
| 11 | 11 | ||
| 12 | jQuery('.carousel-items').each(function() { | 12 | jQuery('.carousel-items').each(function() { |
| 13 | 13 | ||
| 14 | var offset = ((window.innerWidth - $('.entry-content').width() ) / 2) - 28; | ||
| 15 | var offsetAfter = 0; | ||
| 16 | var PerView = 'auto'; | ||
| 17 | var space = 20; | ||
| 18 | |||
| 14 | var _id = jQuery(this).parent().attr('id'); | 19 | var _id = jQuery(this).parent().attr('id'); |
| 15 | 20 | ||
| 16 | var swiper_params = { | 21 | if(jQuery(this).hasClass('promo-carousel')) { |
| 17 | modules: [Navigation, Pagination], | 22 | offset = 0; |
| 23 | PerView = 1; | ||
| 24 | space = 0; | ||
| 25 | offsetAfter = 0; | ||
| 26 | _id = jQuery(this).attr('id'); | ||
| 27 | } | ||
| 28 | |||
| 18 | 29 | ||
| 19 | slidesPerView:"auto", | ||
| 20 | slidesOffsetBefore:offset, | ||
| 21 | spaceBetween:25, | ||
| 22 | 30 | ||
| 31 | var swiper_params = { | ||
| 32 | modules: [Navigation, Pagination, A11y, Keyboard], | ||
| 33 | slidesPerView:PerView, | ||
| 34 | slidesOffsetAfter:offsetAfter, | ||
| 35 | slidesOffsetBefore:offset, | ||
| 36 | spaceBetween:space, | ||
| 37 | slidesPerGroup:1, | ||
| 23 | pagination: { | 38 | pagination: { |
| 24 | el: ".swiper-pagination", | 39 | el: ".swiper-pagination", |
| 25 | type: 'bullets', | 40 | type: 'bullets', |
| 41 | clickable:"true", | ||
| 26 | }, | 42 | }, |
| 27 | 43 | ||
| 28 | // Navigation arrows | ||
| 29 | navigation: { | 44 | navigation: { |
| 30 | nextEl: '.swiper-button-next[data-id="'+_id+'"]', | 45 | nextEl: '.swiper-button-next[data-id="'+_id+'"]', |
| 31 | prevEl: '.swiper-button-prev[data-id="'+_id+'"]', | 46 | prevEl: '.swiper-button-prev[data-id="'+_id+'"]', |
| 32 | }, | 47 | }, |
| 48 | |||
| 49 | a11y: { | ||
| 50 | prevSlideMessage: 'Previous slide', | ||
| 51 | nextSlideMessage: 'Next slide', | ||
| 52 | }, | ||
| 53 | keyboard: { | ||
| 54 | enabled: true, | ||
| 55 | onlyInViewport: false, | ||
| 56 | }, | ||
| 33 | 57 | ||
| 34 | }; | 58 | }; |
| 35 | 59 | ||
| 36 | |||
| 37 | 60 | ||
| 38 | new Swiper(this, swiper_params); | 61 | new Swiper(this, swiper_params); |
| 39 | 62 | console.log(swiper_params); | |
| 40 | 63 | ||
| 41 | }); | 64 | }); |
| 42 | 65 | ... | ... |
| ... | @@ -11,7 +11,8 @@ | ... | @@ -11,7 +11,8 @@ |
| 11 | @import "theme/child_theme"; // <------- Add your styles into this file | 11 | @import "theme/child_theme"; // <------- Add your styles into this file |
| 12 | @import "theme/header"; | 12 | @import "theme/header"; |
| 13 | @import "theme/footer"; | 13 | @import "theme/footer"; |
| 14 | @import "theme/carousel"; | 14 | @import "theme/carousel"; |
| 15 | @import "theme/accordion"; | ||
| 15 | 16 | ||
| 16 | @import "assets/understrap/theme/colors"; // <-------- This creates the necessary bootstrap color classes. | 17 | @import "assets/understrap/theme/colors"; // <-------- This creates the necessary bootstrap color classes. |
| 17 | @import "assets/understrap/theme/blocks"; // <-------- This adds Bootstrap styles to blocks. | 18 | @import "assets/understrap/theme/blocks"; // <-------- This adds Bootstrap styles to blocks. | ... | ... |
| 1 | .c-accordion__title:after{ | ||
| 2 | content: "\f343"; | ||
| 3 | font-family: "Font Awesome"; | ||
| 4 | right: unset; | ||
| 5 | left:0px; | ||
| 6 | } | ||
| 7 | |||
| 8 | .is-open>.c-accordion__title:after { | ||
| 9 | content: "\f077"; | ||
| 10 | font-family: "Font Awesome"; | ||
| 11 | } | ||
| 12 | |||
| 13 | .c-accordion__title{ | ||
| 14 | padding-left: 30px; | ||
| 15 | } | ||
| 16 | .c-accordion__content{ | ||
| 17 | padding-left: 30px; | ||
| 18 | } | ||
| 19 | .js-accordion-item{ | ||
| 20 | background: var(--unnamed-color-ffffff) 0% 0% no-repeat padding-box; | ||
| 21 | background: #FFFFFF 0% 0% no-repeat padding-box; | ||
| 22 | box-shadow: 0px 3px 6px #00000029; | ||
| 23 | border-radius: 10px; | ||
| 24 | padding: 15px 10px 8px 10px; | ||
| 25 | margin-bottom: 20px; | ||
| 26 | h3{ | ||
| 27 | margin-top: 0px !important; | ||
| 28 | } | ||
| 29 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -30,14 +30,6 @@ | ... | @@ -30,14 +30,6 @@ |
| 30 | 30 | ||
| 31 | 31 | ||
| 32 | .carousel { | 32 | .carousel { |
| 33 | .carousel-items { | ||
| 34 | margin-left:1.75rem; | ||
| 35 | } | ||
| 36 | .swiper-wrapper { | ||
| 37 | gap: 1rem; | ||
| 38 | } | ||
| 39 | |||
| 40 | |||
| 41 | width:100vw; | 33 | width:100vw; |
| 42 | margin-left:calc((100% - 100vw) / 2); | 34 | margin-left:calc((100% - 100vw) / 2); |
| 43 | left:0 !important; | 35 | left:0 !important; |
| ... | @@ -51,6 +43,12 @@ | ... | @@ -51,6 +43,12 @@ |
| 51 | .swiper-pagination{ | 43 | .swiper-pagination{ |
| 52 | bottom: -20px !important; | 44 | bottom: -20px !important; |
| 53 | } | 45 | } |
| 46 | .carousel-items { | ||
| 47 | margin-left:1.75rem; | ||
| 48 | } | ||
| 49 | .swiper-wrapper { | ||
| 50 | gap: 1rem; | ||
| 51 | } | ||
| 54 | } | 52 | } |
| 55 | 53 | ||
| 56 | // testimonials carousel css | 54 | // testimonials carousel css |
| ... | @@ -61,7 +59,7 @@ | ... | @@ -61,7 +59,7 @@ |
| 61 | .testimonials{ | 59 | .testimonials{ |
| 62 | width:890px; | 60 | width:890px; |
| 63 | background:#E5F2F8; | 61 | background:#E5F2F8; |
| 64 | border-radius: 8px 8px 0px 0px; | 62 | border-radius: 25px 25px 0px 0px; |
| 65 | margin-right: 20px; | 63 | margin-right: 20px; |
| 66 | .row{ | 64 | .row{ |
| 67 | margin-right: 0rem !important; | 65 | margin-right: 0rem !important; |
| ... | @@ -94,7 +92,10 @@ | ... | @@ -94,7 +92,10 @@ |
| 94 | .testimonials{ | 92 | .testimonials{ |
| 95 | .row{ | 93 | .row{ |
| 96 | border-bottom:20px solid #3F9C35; | 94 | border-bottom:20px solid #3F9C35; |
| 95 | } | ||
| 97 | } | 96 | } |
| 97 | .promo-img img{ | ||
| 98 | border-bottom:20px solid #3F9C35; | ||
| 98 | } | 99 | } |
| 99 | } | 100 | } |
| 100 | .swiper-slide:nth-of-type(3){ | 101 | .swiper-slide:nth-of-type(3){ |
| ... | @@ -103,6 +104,9 @@ | ... | @@ -103,6 +104,9 @@ |
| 103 | border-bottom:20px solid #0484B8; | 104 | border-bottom:20px solid #0484B8; |
| 104 | } | 105 | } |
| 105 | } | 106 | } |
| 107 | .promo-img img{ | ||
| 108 | border-bottom:20px solid #0484B8; | ||
| 109 | } | ||
| 106 | } | 110 | } |
| 107 | .swiper-slide:nth-of-type(4){ | 111 | .swiper-slide:nth-of-type(4){ |
| 108 | .testimonials{ | 112 | .testimonials{ |
| ... | @@ -110,9 +114,80 @@ | ... | @@ -110,9 +114,80 @@ |
| 110 | border-bottom:20px solid #E04E39; | 114 | border-bottom:20px solid #E04E39; |
| 111 | } | 115 | } |
| 112 | } | 116 | } |
| 117 | .promo-img img{ | ||
| 118 | border-bottom:20px solid #E04E39; | ||
| 119 | } | ||
| 113 | } | 120 | } |
| 114 | 121 | ||
| 115 | 122 | ||
| 116 | 123 | ||
| 117 | 124 | ||
| 125 | } | ||
| 126 | |||
| 127 | |||
| 128 | .promo-carousel{ | ||
| 129 | width:100% !important; | ||
| 130 | margin-left:0px !important; | ||
| 131 | position: relative; | ||
| 132 | @media only screen and (min-width:1400px) { | ||
| 133 | max-width: 100% !important; | ||
| 134 | } | ||
| 135 | .swiper-slide{ | ||
| 136 | margin-left:0px !important; | ||
| 137 | max-width: 100% !important; | ||
| 138 | @media only screen and (min-width:1400px) { | ||
| 139 | width:100% !important; | ||
| 140 | } | ||
| 141 | .promo-img{ | ||
| 142 | max-height: 264px; | ||
| 143 | max-width: 372px; | ||
| 144 | overflow: hidden; | ||
| 145 | border-bottom:20px solid #FFA300; | ||
| 146 | } | ||
| 147 | .promo-img img{ | ||
| 148 | max-width: 372px; | ||
| 149 | border-radius: 25px 25px 0px 0px; | ||
| 150 | |||
| 151 | } | ||
| 152 | .promo.row{ | ||
| 153 | width:100%; | ||
| 154 | border-top:1px solid #FFA300; | ||
| 155 | border-bottom:1px solid #FFA300; | ||
| 156 | @media only screen and (min-width:1400px) { | ||
| 157 | max-width: 1344px; | ||
| 158 | } | ||
| 159 | @media only screen and (max-width: 600px) { | ||
| 160 | width:80%; | ||
| 161 | } | ||
| 162 | margin: 75px auto; | ||
| 163 | padding: 56px 0px; | ||
| 164 | |||
| 165 | } | ||
| 166 | } | ||
| 167 | .swiper-button-next { | ||
| 168 | right:30px !important; | ||
| 169 | } | ||
| 170 | .swiper-button-prev { | ||
| 171 | left:7px !important; | ||
| 172 | } | ||
| 173 | .swiper-pagination{ | ||
| 174 | bottom: 95px !important; | ||
| 175 | } | ||
| 176 | |||
| 177 | |||
| 178 | .swiper-slide:nth-of-type(2){ | ||
| 179 | .promo-img { | ||
| 180 | border-bottom:20px solid #3F9C35; | ||
| 181 | } | ||
| 182 | } | ||
| 183 | .swiper-slide:nth-of-type(3){ | ||
| 184 | .promo-img { | ||
| 185 | border-bottom:20px solid #0484B8; | ||
| 186 | } | ||
| 187 | } | ||
| 188 | .swiper-slide:nth-of-type(4){ | ||
| 189 | .promo-img { | ||
| 190 | border-bottom:20px solid #E04E39; | ||
| 191 | } | ||
| 192 | } | ||
| 118 | } | 193 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -4,11 +4,11 @@ h1{ | ... | @@ -4,11 +4,11 @@ h1{ |
| 4 | } | 4 | } |
| 5 | 5 | ||
| 6 | h2{ | 6 | h2{ |
| 7 | text-align: center; | 7 | |
| 8 | color: #0484B8; | 8 | color: #0484B8; |
| 9 | font-size: 40px; | 9 | font-size: 40px; |
| 10 | line-height: 49px; | 10 | line-height: 49px; |
| 11 | margin-bottom: 40px; | 11 | margin-bottom: 20px; |
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | h3{ | 14 | h3{ |
| ... | @@ -17,6 +17,14 @@ h3{ | ... | @@ -17,6 +17,14 @@ h3{ |
| 17 | line-height: 32px; | 17 | line-height: 32px; |
| 18 | margin-top: 20px; | 18 | margin-top: 20px; |
| 19 | } | 19 | } |
| 20 | a{ | ||
| 21 | color:#2C2C2C; | ||
| 22 | } | ||
| 23 | |||
| 24 | div#full-width-page-wrapper { | ||
| 25 | padding-bottom: 0px; | ||
| 26 | } | ||
| 27 | |||
| 20 | 28 | ||
| 21 | input[type=text],input[type=email]{ | 29 | input[type=text],input[type=email]{ |
| 22 | border-radius: 0px !important; | 30 | border-radius: 0px !important; |
| ... | @@ -65,24 +73,42 @@ input[type=checkbox] | ... | @@ -65,24 +73,42 @@ input[type=checkbox] |
| 65 | } | 73 | } |
| 66 | } | 74 | } |
| 67 | } | 75 | } |
| 76 | .wpcf7{ | ||
| 77 | max-width: 100% !important; | ||
| 78 | .contact-form{ | ||
| 79 | padding-top: 40px; | ||
| 80 | max-width: 80% !important; | ||
| 81 | margin: auto; | ||
| 82 | input[type=text],input[type=email],textarea{ | ||
| 83 | background-color: #E5F2F8; | ||
| 84 | } | ||
| 85 | .wpcf7-list-item{ | ||
| 86 | margin:0px; | ||
| 87 | } | ||
| 88 | input[type=submit]{ | ||
| 89 | text-align: center; | ||
| 90 | margin: auto; | ||
| 91 | margin-top: 20px; | ||
| 92 | width: 112px; | ||
| 93 | background-color: #0484B8; | ||
| 94 | color: #fff; | ||
| 95 | text-transform: uppercase; | ||
| 96 | display: block; | ||
| 97 | font-size: 18px; | ||
| 68 | 98 | ||
| 69 | #wpcf7-f115-p18-o1{ | 99 | } |
| 70 | max-width: 80% !important; | ||
| 71 | input[type=text],input[type=email],textarea{ | ||
| 72 | background-color: #E5F2F8; | ||
| 73 | } | ||
| 74 | .wpcf7-list-item{ | ||
| 75 | margin:0px; | ||
| 76 | } | 100 | } |
| 77 | input[type=submit]{ | 101 | } |
| 78 | text-align: center; | ||
| 79 | margin: auto; | ||
| 80 | margin-top: 20px; | ||
| 81 | width: 112px; | ||
| 82 | background-color: #0484B8; | ||
| 83 | color: #fff; | ||
| 84 | text-transform: uppercase; | ||
| 85 | display: block; | ||
| 86 | 102 | ||
| 103 | .no-bullets{ | ||
| 104 | list-style: none; | ||
| 105 | margin-block-start: 0em; | ||
| 106 | padding-inline-start: 0px; | ||
| 107 | li{ | ||
| 108 | margin-bottom: 10px; | ||
| 87 | } | 109 | } |
| 110 | } | ||
| 111 | |||
| 112 | .wp-block-image.is-style-rounded img{ | ||
| 113 | border-radius: 25px; | ||
| 88 | } | 114 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -41,7 +41,7 @@ | ... | @@ -41,7 +41,7 @@ |
| 41 | .newsletter{ | 41 | .newsletter{ |
| 42 | background-color: #6ED5FF; | 42 | background-color: #6ED5FF; |
| 43 | min-height: 236px; | 43 | min-height: 236px; |
| 44 | padding-top: 52px; | 44 | padding: 52px 0px 32px 0px; |
| 45 | h2{ | 45 | h2{ |
| 46 | font-size: 18px; | 46 | font-size: 18px; |
| 47 | line-height: 24px; | 47 | line-height: 24px; | ... | ... |
| ... | @@ -151,11 +151,11 @@ | ... | @@ -151,11 +151,11 @@ |
| 151 | background-position: center; | 151 | background-position: center; |
| 152 | background-repeat: no-repeat; | 152 | background-repeat: no-repeat; |
| 153 | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23.024' height='23.545' viewBox='0 0 23.024 23.545'%3E%3Cg id='Group_1373' data-name='Group 1373' transform='translate(0 1.5)'%3E%3Cline id='Line_15' data-name='Line 15' y1='15.007' transform='translate(11.512 7.038)' fill='none' stroke='%23fff' stroke-width='3'/%3E%3Cpath id='Path_1388' data-name='Path 1388' d='M3331.593 12517.547h23.024' transform='translate(-3331.593 -12517.547)' fill='none' stroke='%23fff' stroke-width='3'/%3E%3Cpath id='Path_1389' data-name='Path 1389' d='M3279.832 12508.2l8.216-8.217 8.216 8.217' transform='translate(-3276.535 -12494.895)' fill='none' stroke='%23fff' stroke-width='3'/%3E%3C/g%3E%3C/svg%3E"); | 153 | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23.024' height='23.545' viewBox='0 0 23.024 23.545'%3E%3Cg id='Group_1373' data-name='Group 1373' transform='translate(0 1.5)'%3E%3Cline id='Line_15' data-name='Line 15' y1='15.007' transform='translate(11.512 7.038)' fill='none' stroke='%23fff' stroke-width='3'/%3E%3Cpath id='Path_1388' data-name='Path 1388' d='M3331.593 12517.547h23.024' transform='translate(-3331.593 -12517.547)' fill='none' stroke='%23fff' stroke-width='3'/%3E%3Cpath id='Path_1389' data-name='Path 1389' d='M3279.832 12508.2l8.216-8.217 8.216 8.217' transform='translate(-3276.535 -12494.895)' fill='none' stroke='%23fff' stroke-width='3'/%3E%3C/g%3E%3C/svg%3E"); |
| 154 | 154 | z-index: 999; | |
| 155 | } | 155 | } |
| 156 | 156 | ||
| 157 | #btn-back-to-top:hover{ | 157 | #btn-back-to-top:hover{ |
| 158 | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23.024' height='23.545' viewBox='0 0 23.024 23.545'%3E%3Cg id='Group_1373' data-name='Group 1373' transform='translate(0 1.5)'%3E%3Cline id='Line_15' data-name='Line 15' y1='15.007' transform='translate(11.512 7.038)' fill='none' stroke='%232C2C2C' stroke-width='3'/%3E%3Cpath id='Path_1388' data-name='Path 1388' d='M3331.593 12517.547h23.024' transform='translate(-3331.593 -12517.547)' fill='none' stroke='%232C2C2C' stroke-width='3'/%3E%3Cpath id='Path_1389' data-name='Path 1389' d='M3279.832 12508.2l8.216-8.217 8.216 8.217' transform='translate(-3276.535 -12494.895)' fill='none' stroke='%2C2C2C' stroke-width='3'/%3E%3C/g%3E%3C/svg%3E"); | 158 | |
| 159 | background-color:#fff; | 159 | background-color:#000; |
| 160 | 160 | ||
| 161 | } | 161 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment