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
/* Load plugins */ | |
var gulp = require('gulp'), | |
watch = require('gulp-watch'), | |
notify = require('gulp-notify'), | |
uncss = require('gulp-uncss'), | |
zopfli = require("gulp-zopfli"), | |
connect = require('gulp-connect'), | |
htmlmin = require('gulp-htmlmin'), | |
inlinesource = require('gulp-inline-source'), | |
imagemin = require('gulp-imagemin'), |
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
var gulp = require('gulp'); | |
var fs = require('fs'); | |
var del = require('del'); | |
var htmlreplace = require('gulp-html-replace'); | |
var uglify = require('gulp-uglify'); | |
var minifyHTML = require('gulp-minify-html'); | |
var minifyCSS = require('gulp-minify-css'); | |
var rename = require("gulp-rename"); | |
var bowerSrc = require('gulp-bower-src'); | |
var gulpFilter = require('gulp-filter'); |
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
var gulp = require('gulp'), | |
fs = require('fs'), | |
path = require('path'), | |
naturalSort = require('gulp-natural-sort'), | |
browserSync = require('browser-sync'), | |
cp = require('child_process'), | |
rsync = require('gulp-rsync'), | |
rev = require('gulp-rev'), | |
del = require('del'), | |
collect = require('gulp-rev-collector'), |
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
{ | |
"exclude": [ | |
".git/**", | |
"misc/**", | |
"modules/**", | |
"profiles/**", | |
"themes/**", | |
"node_modules/**", | |
"bower_components/**" | |
], |
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
homeassistant: | |
# Name of the location where Home Assistant is running | |
name: emonPi Demo | |
# C for Celcius, F for Fahrenheit | |
temperature_unit: C | |
# Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones | |
time_zone: Europe/London | |
# Location required to calculate the time the sun rises and sets | |
latitude: 56.14286 | |
longitude: -4.15401 |
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 | |
/** | |
* Implements hook_theme_suggestions_HOOK_alter(). | |
*/ | |
function THEMENAME_theme_suggestions_block_alter(array &$suggestions, array $variables) { | |
$block_id = $variables['elements']['#id']; | |
// See if block ID contains the word mobile. | |
$is_mobile_block = strpos($block_id, 'mobile'); | |
$block = \Drupal\block\Entity\Block::load($block_id); |
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 | |
/** | |
* Implements hook_preprocess_HOOK() for region templates. | |
*/ | |
function themename_preprocess_region__region_name(&$variables) { | |
// Check if current page is a node. | |
if ($node = \Drupal::routeMatch()->getParameter('node')) { | |
// Check if node has the field site_section. | |
if ($node->hasField('field_site_section')) { |
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
# Force HTTPS | |
RewriteCond %{HTTPS} off | |
RewriteCond %{REQUEST_URI} !^/who-we-are/careers$ [NC] | |
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
# Ensure that Careers page is not forced over HTTPS | |
RewriteCond %{HTTPS} on | |
RewriteCond %{REQUEST_URI} ^/who-we-are/careers$ [NC] | |
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
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 | |
/** | |
* Implements hook_preprocess_HOOK() for block.html.twig. | |
*/ | |
function themename_preprocess_block(&$variables) { | |
// Get Title of Block's parent Node. | |
$request = \Drupal::request(); | |
$route_match = \Drupal::routeMatch(); |
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 | |
use Drupal\image\Entity\ImageStyle; | |
/** | |
* Implements hook_preprocess_HOOK() for paragraph--para-slide.html.twig. | |
*/ | |
function themename_preprocess_paragraph__para_slide(&$variables) { | |
$paragraph = $variables['paragraph']; | |
if (!$paragraph->field_image->isEmpty()) { |