First, install the required dependencies:
pnpm add vue-grid-layout-3 element-resize-detector
{% set preprinted_supplies = node.field_issue_calendar.value %} | |
{% set preprinted_supplies_not_empty = [] %} | |
{% for item in preprinted_supplies %} | |
{% set psp = drupal_field('field_preprinted_supplied_pieces', 'paragraph', item.target_id) %} | |
{% if psp['#title'] is not null %} | |
{% set preprinted_supplies_not_empty = preprinted_supplies_not_empty|merge(['true']) %} | |
{% endif %} | |
{% endfor %} | |
{% if preprinted_supplies_not_empty|length > 0 %} |
function custom_theme_preprocess_html(&$vars) { | |
$vars['is_front'] = \Drupal::service('path.matcher')->isFrontPage(); | |
} |
exports.onCreateNode = ({node, actions, getNodes, graphql, createNodeId, getCache}) => { | |
if (node.internal.type !== 'SitePage') { | |
return; | |
} | |
const { | |
createNode | |
} = actions | |
let media = [] | |
Drupal\geolocation\Plugin\Field\FieldType\GeolocationItem.php
public static function generateSampleValue(FieldDefinitionInterface $field_definition) {
// Guadalajara.
$longitude = (float) -103.3496;
$latitude = (float) 20.6597;
$radius = rand(1,5); // in miles
/* eslint-disable */ | |
(function ($) { | |
Drupal.behaviors.dieToolbardie = { | |
attach: function (context) { | |
window.matchMedia('(min-width: 975px)').addListener( function(event) { | |
event.matches ? $('#toolbar-item-administration', context).click() : $('.toolbar-item.is-active', context).click(); | |
}); | |
} | |
}; | |
})(jQuery); |
// Sticky navigation. | |
var navbar = $("#navbar"); | |
var stickyClass = "sticky"; | |
var offsetTop = $('#navbar').offset(); | |
$(window, context).scroll(function() { | |
if ( $(this).scrollTop() > offsetTop.top ) { | |
navbar.addClass(stickyClass); | |
$('#dla-main-content').css('margin-top', navbar.height()); | |
} else if ( $(this).scrollTop() < navbar.height() ) { |