This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {% attributes.class.add([ | |
| 'node', | |
| 'node--type-' ~ node.bundle|class, | |
| node.promoted ? 'node--promoted', | |
| node.sticky ? 'node--sticky', | |
| not node.published ? 'node--unpublished', | |
| preview ? 'node--preview', | |
| 'node--view-mode-' ~ view_mode|class | |
| ]).remove([ | |
| 'some-module-class' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * @file | |
| * Example of how to attach external and inline resources for a theme via the | |
| * #attached render array method in 8.x. | |
| */ | |
| /** | |
| * Helper function for attaching resources to a render array. | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $items = array(); | |
| $build['list'] = array( | |
| '#theme' => 'item_list', | |
| '#items' => $items, | |
| '#empty' => t('You have no content, please <a href="!link">create some</a>.', array( | |
| '!link' => 'node/add', | |
| ), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Script: cocoaDialogTests.sh | |
| # Author: Mark Carver | |
| # Created: 2011-09-23 | |
| # Updated: 2012-07-24 | |
| # Copyright (c) 2012 Mark Carver. All rights reserved. | |
| cocoaDialog(){ | |
| # Replace this with your path if it isn't installed in the applications folder. | |
| /Users/Shared/Applications/cocoaDialog.app/Contents/MacOS/cocoaDialog "${@}"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # cocoaDialog Rsync Progress | |
| # | |
| # Rsync files using the cocoaDialog progress bar. Example usage: | |
| # $ rsync -avr --progress ~/source ~/destination | ./rsync-progress.sh | |
| # | |
| # Copyright (C) 2014 Mark Carver | |
| # | |
| # Adapted from Kevin Hendricks example code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Helper classes. | |
| @each $property in (border, margin, padding) { | |
| @each $direction in ('', -left, -right, -top, -bottom) { | |
| .#{$property}#{$direction} { | |
| @if $property == border { | |
| #{$property}#{$direction}: 1px solid $gray-lighter; | |
| } | |
| @else { | |
| #{$property}#{$direction}: 1em; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Drush Bot Service | |
| description "Drush Bot" | |
| author "Mark Carver <[email protected]>" | |
| start on runlevel [2345] | |
| stop on starting rc RUNLEVEL=[016] | |
| respawn | |
| respawn limit 2 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // In your sub-theme, create this file ./THEMENAME/src/Plugin/Preprocess/ViewsExposedForm.php and place this contents in it. | |
| /** | |
| * @file | |
| * Contains \Drupal\THEMENAME\Plugin\Preprocess\ViewsExposedForm. | |
| */ | |
| namespace Drupal\THEMENAME\Plugin\Preprocess; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Drupal\bootstrap_mobildata\Plugin\Form; | |
| use Drupal\bootstrap\Annotation\BootstrapForm; | |
| use Drupal\bootstrap\Utility\Element; | |
| use Drupal\Core\Form\FormStateInterface; | |
| /** | |
| * Implements hook_form_FORM_ID_alter(). | |
| * |