PX to REM Conversion
8px = 0.5rem
9px = 0.5625rem
10px = 0.625rem
11px = 0.6875rem
12px = 0.75rem
13px = 0.8125rem
var subMenuButton = 'ul#primary-menu li.menu-item-has-children > a' | |
var subMenuDropdown = 'ul.submenu.menu-depth-1' | |
// Hide menu drop-down on outside click | |
$(document).on('click', function (e) { | |
if ($(subMenuButton).hasClass('expanded') && $(e.target).closest(subMenuButton).length === 0) { | |
$(subMenuButton).removeClass('expanded') | |
$(subMenuDropdown).hide() | |
} | |
}) |
<script> | |
document.write("<script type='text/javascript' src='/js/script.js?v=" + Date.now() + "'><\/script>"); | |
</script> |
// Browsersync notify | |
#__bs_notify__ { | |
/* Move notification to bottom-left */ | |
color: $white !important; | |
font-size: rem(15) !important; | |
font-weight: 500; | |
text-shadow: 0 -1px 0 $black; | |
border-top-right-radius: 8px !important; | |
border-bottom-left-radius: 0 !important; | |
background-color: rgba($black, 0.8) !important; |
# create patch from www directory | |
git diff 79896c5ede e8d7f85300c4 --relative > drupal-core-7.72-7.73.patch | |
# run patch dry-run | |
patch -p1 --dry-run < ~/patches/PATCHFILE |
PX to REM Conversion
8px = 0.5rem
9px = 0.5625rem
10px = 0.625rem
11px = 0.6875rem
12px = 0.75rem
13px = 0.8125rem
<?php if (!empty($node) && $node->type == 'content_type_name'): ?> | |
Do something... | |
<?php endif; ?> |
https://www.drupal.org/node/1343430#comment-11853998
Do not print view block code when it is empty.
Twig Teak Cheet Sheet Rendering blocks with Twig Tweak
# system blocks
vendor/bin/drush ev "print_r(array_keys(\Drupal::service('plugin.manager.block')->getDefinitions()));"