This repository has been archived on 2025-01-07. You can view files and clone it, but cannot push or open issues or pull requests.
drupal-tailwindcss-purgecss.../web/themes/contrib/tailwindcss/tailwindcss.theme

26 lines
660 B
Plaintext

<?php
/**
* @file
* Functions to support theming in the Tailwind CSS theme.
*/
/**
* Implements hook_preprocess_HOOK().
*/
function tailwindcss_preprocess_html(&$variables) {
$variables['attributes']['class'][] = 'tw-bg-red-200';
}
/**
* Implements hook_preprocess_HOOK().
*/
function tailwindcss_preprocess_block(&$variables) {
if ($variables['base_plugin_id'] == 'system_branding_block') {
$variables['site_logo'] = '';
if ($variables['content']['site_logo']['#access'] && $variables['content']['site_logo']['#uri']) {
$variables['site_logo'] = str_replace('.svg', '.png', $variables['content']['site_logo']['#uri']);
}
}
}