Skip to content

Commit

Permalink
Add empty spaces to have icons aligned
Browse files Browse the repository at this point in the history
Not sure if this is best solution, might change it in the future
  • Loading branch information
Moc committed Jan 11, 2025
1 parent b0221e6 commit 5509d97
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions cookbook_shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,14 @@ function sc_cookbook_recipes_in_category($parm = array())
*/
function sc_cookbook_recipe_persons($parm = array())
{
return $this->var["r_persons"];
if(!$this->var["r_persons"])
{
return " "; // To align icons properly
}
else
{
return $this->var["r_persons"];
}
}

/**
Expand Down Expand Up @@ -364,7 +371,7 @@ function sc_cookbook_recipe_authorrating($parm = array())

if(e107::getPlugPref('cookbook', 'recipe_authorrating') == false)
{
return false;
return " ";
}

// Check if we want to display the stars
Expand Down Expand Up @@ -405,7 +412,7 @@ function sc_cookbook_recipe_difficulty($parm = array())

if(e107::getPlugPref('cookbook', 'recipe_difficulty') == false)
{
return false;
return " ";
}

// Check if we want to display the stars
Expand Down Expand Up @@ -491,7 +498,7 @@ function sc_cookbook_recipe_keywords($parm = array())
{
// Retrieve keywords from db. Stop when no keywords are present.
$keywords = $this->var['r_keywords'];
if(!$keywords) return '';
if(!$keywords) return ' ';

// Define other variables
$ret = $urlparms = array();
Expand Down

1 comment on commit 5509d97

@Moc
Copy link
Owner Author

@Moc Moc commented on 5509d97 Jan 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May help with #39

Please sign in to comment.