Removes chrome from color input swatch and overlays over an image, using blend modes to colorize. Voila! Color changing without JS.
Chrome and Firefox only right now.
| <?php | |
| // Namespace | |
| namespace App\Validators; | |
| // Using directives | |
| use Cache; | |
| use Carbon\Carbon; | |
| // Domain black list validation class |
| <?php | |
| // Rename this file to `CUSTOMMODULE.module` | |
| /** | |
| * Implements hook_form_FORM_ID_alter(). | |
| */ | |
| function CUSTOMMODULE_form_views_exposed_form_alter(&$form, &$form_state, $form_id) { | |
| // Replace `Size` filter. | |
| CUSTOMMODULE_jumpmenu($form, 'field_size_tid'); |
| (function ($) { | |
| Drupal.behaviors.CUSTOMMODULE = { | |
| attach: function (context, settings) { | |
| // @see http://dinbror.dk/blog/blazy/?ref=example-page#Options | |
| var options = settings.CUSTOMMODULE.bLazy ? settings.CUSTOMMODULE.bLazy : {}; | |
| var bLazy = new Blazy(options); | |
| } | |
| }; | |
| }(jQuery)); |
| <?php | |
| // This plug needs to be placed in a custom module: | |
| // `modules/custom/YOURMODULE/src/Plugin/Filter/FilterLazyload.php` | |
| namespace Drupal\YOURMODULE\Plugin\Filter; | |
| use Drupal\Component\Utility\Html; | |
| use Drupal\filter\FilterProcessResult; | |
| use Drupal\filter\Plugin\FilterBase; |
| <?php | |
| namespace Drupal\wt_base; | |
| use Symfony\Component\HttpFoundation\RequestStack; | |
| use Drupal\Core\PathProcessor\OutboundPathProcessorInterface; | |
| use Symfony\Component\HttpFoundation\Request; | |
| use Drupal\Core\Render\BubbleableMetadata; | |
| /** | |
| * Class DefaultService. |
| <?php | |
| /** | |
| * Verbose Beautified Date Range | |
| * | |
| * @access public | |
| * @param mixed $start_date | |
| * @param mixed $end_date | |
| * @return $date_range (beautified date range) | |
| * @license WTFPL | |
| * |
| var queryParams = window.location.search.substr(1).split('&').reduce(function (q, query) { | |
| var chunks = query.split('='); | |
| var key = chunks[0]; | |
| var value = chunks[1]; | |
| return (q[key] = value, q); | |
| }, {}); |
| <?php | |
| /* | |
| Plugin Name: Cake - Recent Posts Widget | |
| Version: 1.0.0 | |
| Plugin URI: https://gorm.us/wordpress/plugins/recent-posts | |
| Description: A widget to display recent posts. | |
| Author: Osman Gormus | |
| Author URI: https://gorm.us | |
| */ |