Delete all that custom theme code we aren't using
This commit is contained in:
parent
c9ebf23775
commit
79a54aff70
1 changed files with 0 additions and 32 deletions
|
@ -1,34 +1,2 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Implements hook_preprocess_HOOK() for page templates.
|
||||
*
|
||||
* Provide the elements of the branding block in the page.
|
||||
*/
|
||||
function geofresco_preprocess_page(&$variables) {
|
||||
$block_manager = \Drupal::service('plugin.manager.block');
|
||||
$branding = $block_manager->createInstance('system_branding_block', [])->build();
|
||||
$variables['site_logo'] = $branding['site_logo']['#uri'];
|
||||
$variables['site_slogan'] = $branding['site_slogan'];
|
||||
$variables['site_name'] = $branding['site_name'];
|
||||
}
|
||||
|
||||
|
||||
// Below workaround to prevent upscaling of responsive images taken from
|
||||
// https://drupal.stackexchange.com/questions/254109/how-to-add-a-width-attribute-to-a-responsive-image-with-srcset
|
||||
// see https://www.drupal.org/project/drupal/issues/2999960
|
||||
|
||||
/**
|
||||
* Implements hook_preprocess_responsive_image_formatter().
|
||||
*
|
||||
* In order to do an incredibly ugly hack to prevent responsive images from
|
||||
* upscaling themselves.
|
||||
WE DECIDED WE WANT TO ALLOW UPSCALING ON THIS SITE
|
||||
function geofresco_preprocess_responsive_image_formatter(array &$variables) {
|
||||
$width = $variables['item']->width;
|
||||
if ($width > 1199) {
|
||||
return;
|
||||
}
|
||||
$variables['responsive_image']['#attributes']['style'] = 'width: ' . $width . 'px';
|
||||
}
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue