Commit 299f3c75 authored by Oliver Davies's avatar Oliver Davies
Browse files

Issue #3197081 by lhockley, opdavies: Remove Preprocess Logic; Default to svg Tailwind Logo

parent 6f16d0c7
Loading
Loading
Loading
Loading

logo.png

deleted100644 → 0
−12.2 KiB
Loading image diff...

logo.svg

0 → 100644
+1 −0
Original line number Diff line number Diff line
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64"><defs><linearGradient x1="0" y1="-21.333" y2="85.333" id="A" x2="64" gradientUnits="userSpaceOnUse"><stop stop-color="#2383ae" offset="0%"/><stop stop-color="#6dd7b9" offset="100%"/></linearGradient></defs><path d="M16 25.6c2.133-8.533 7.467-12.8 16-12.8 12.8 0 14.4 9.6 20.8 11.2 4.267 1.067 8-.533 11.2-4.8C61.867 27.733 56.533 32 48 32c-12.8 0-14.4-9.6-20.8-11.2-4.267-1.067-8 .533-11.2 4.8zM0 44.8C2.133 36.267 7.467 32 16 32c12.8 0 14.4 9.6 20.8 11.2 4.267 1.067 8-.533 11.2-4.8-2.133 8.533-7.467 12.8-16 12.8-12.8 0-14.4-9.6-20.8-11.2-4.267-1.067-8 .533-11.2 4.8z" fill="url(#A)" fill-rule="evenodd"/></svg>
 No newline at end of file

tailwindcss.theme

deleted100644 → 0
+0 −29
Original line number Diff line number Diff line
<?php

/**
 * @file
 * Functions to support theming in the Tailwind CSS theme.
 */

/**
 * Implements hook_preprocess_HOOK().
 */
function tailwindcss_preprocess_block(&$variables) {
  if (tailwindcss_get_active_theme() == 'tailwindcss' && $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']);
    }
  }
}


/**
 * Get the active theme.
 *
 * @return string
 *   The name of the active theme.
 */
function tailwindcss_get_active_theme() {
  return \Drupal::service('theme.manager')->getActiveTheme()->getName();
}