Commit d57b0024 authored by Taras Kruts's avatar Taras Kruts
Browse files

Issue #3083877 by ribel: Simplify conditions for sky theme

parent 9691e617
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -39,9 +39,8 @@ function socialblue_library_info_alter(&$libraries, $extension) {
 * Prepares variables for group templates.
 */
function socialblue_preprocess_group(array &$variables) {
  $style = theme_get_setting('style');
  $view_modes = ['teaser', 'featured'];
  if ($style && $style === 'sky' && in_array($variables['view_mode'], $view_modes)) {
  if (theme_get_setting('style') === 'sky' && in_array($variables['view_mode'], $view_modes)) {
    $variables['title_prefix']['teaser_tag'] = [
      '#markup' => '<div class="teaser__tag">' . t('Group') . '</div>',
    ];
+1 −2
Original line number Diff line number Diff line
@@ -23,8 +23,7 @@ class Node extends NodeBase {
    /** @var \Drupal\node\Entity\Node $node */
    $node = $variables['node'];

    $style = theme_get_setting('style');
    if ($style && $style === 'sky') {
    if (theme_get_setting('style') === 'sky') {

      if (!empty($variables['topic_type'])) {
        $teaser_tag = $variables['topic_type'];
+1 −2
Original line number Diff line number Diff line
@@ -19,8 +19,7 @@ class Page extends PageBase {
  public function preprocess(array &$variables, $hook, array $info) {
    parent::preprocess($variables, $hook, $info);

    $style = theme_get_setting('style');
    if ($style && $style === 'sky') {
    if (theme_get_setting('style') === 'sky') {

      // Display merged sidebar on the left side of profile pages, except edit.
      $route_match = \Drupal::routeMatch();