This file contains 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
Project structure: | |
.github/workflows/deploy-acquia.yml | |
scripts/ci/push.sh | |
scripts/composer/ScriptHandler.php | |
.gitignore | |
composer.json |
This file contains 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 | |
/** | |
* A hack. | |
* | |
* A composer post-update/post-install command to find, download, copy, whatever front-end library files | |
* specified in a drupal module's "composer.libraries.json" file (which is non-standard). This is a replacement | |
* for the wikimedia/composer-merge-plugin package which is deprecated and causes issues on Pantheon | |
* See: https://www.drupal.org/project/webform/issues/3088336#comment-13312823 | |
* And: https://www.drupal.org/project/documentation/issues/2605130 |
This file contains 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
exports.handler = (event, context, callback) => { | |
const request = event.Records[0].cf.request; | |
if (request.headers['host'][0].value !== 'www.example.com') { | |
/* | |
* Generate HTTP redirect response with 302 status code and Location header. | |
*/ | |
const response = { | |
status: '302', | |
statusDescription: 'Found', |
This file contains 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 | |
/** | |
* Debugging using the database connection. | |
*/ | |
/** @var \Drupal\Core\Database\Connection */ | |
$connection = \Drupal::service('database'); | |
$query = $connection->select('node', 'node'); | |
$query->fields('node', ['nid']) |
This file contains 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 | |
// Set the e-mail address that submission should be sent to. | |
$address = '[email protected]'; | |
// Set the e-mail subject prefix. | |
$prefix = 'Website feedback'; | |
// DO NOT EDIT ANYTHING BELOW UNLESS YOU KNOW WHAT YOU ARE DOING. |
This file contains 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 | |
// To be passed to hook_mail | |
$params = array(); | |
// To be passed to hook_mail | |
$key = 'my_mail_key'; | |
$langcode = \Drupal::languageManager()->getDefaultLanguage(); | |
\Drupal::service('plugin.manager.mail') |
This file contains 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
body { | |
background: #fff; | |
} | |
.postbg { | |
background: transparent; | |
box-shadow: none; | |
} | |
.header_area { |
This file contains 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 | |
// Place this file your theme's "templates" folder. | |
/** | |
* @file | |
* Theme override to display a pager. | |
* | |
* This is a backport of pager.html.twig from Drupal 8 to Drupal 7, which add | |
* accessibility support for WCAG 2.0 section 2.4.9. | |
* |
This file contains 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
// Animated throbber | |
html.js .form-autocomplete { | |
background-image: image-url('svg/throbber-inactive.svg'); | |
background-position: 95% center; | |
background-position: -webkit-calc(100% - 5px) center; | |
background-position: calc(100% - 5px) center; | |
background-repeat: no-repeat; | |
} | |
html.js .throbbing { |
This file contains 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
/** | |
* Technique from http://lea.verou.me/2011/01/styling-children-based-on-their-number-with-css3/ | |
*/ | |
/* one item */ | |
li:first-child:nth-last-child(1) { | |
width: 100%; | |
} | |
/* two items */ |
NewerOlder