Fix league table alignment and responsive height
This commit is contained in:
@@ -78,10 +78,21 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* League Table */
|
/* League Table */
|
||||||
.sp-league-table .team-logo {
|
.sp-league-table td {
|
||||||
vertical-align: middle;
|
line-height: 2em;
|
||||||
height: 2.5em;
|
}
|
||||||
|
.sp-league-table .data-name.has-logo {
|
||||||
|
padding-left: 2.5em;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sp-league-table .data-name.has-logo .team-logo {
|
||||||
width: auto;
|
width: auto;
|
||||||
|
height: auto;
|
||||||
|
max-width: 2em;
|
||||||
|
max-height: 2em;
|
||||||
|
position: absolute;
|
||||||
|
left: 0.25em;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Event Performance */
|
/* Event Performance */
|
||||||
|
|||||||
@@ -72,9 +72,14 @@ foreach( $data as $team_id => $row ):
|
|||||||
// Rank
|
// Rank
|
||||||
$output .= '<td class="data-rank">' . ( $i + 1 ) . '</td>';
|
$output .= '<td class="data-rank">' . ( $i + 1 ) . '</td>';
|
||||||
|
|
||||||
|
$name_class = '';
|
||||||
|
|
||||||
if ( $show_team_logo ):
|
if ( $show_team_logo ):
|
||||||
$logo = get_the_post_thumbnail( $team_id, 'sportspress-fit-icon', array( 'class' => 'team-logo' ) );
|
if ( has_post_thumbnail( $team_id ) ):
|
||||||
$name = $logo . ' ' . $name;
|
$logo = get_the_post_thumbnail( $team_id, 'sportspress-fit-icon', array( 'class' => 'team-logo' ) );
|
||||||
|
$name = $logo . ' ' . $name;
|
||||||
|
$name_class .= ' has-logo';
|
||||||
|
endif;
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
if ( $link_posts ):
|
if ( $link_posts ):
|
||||||
@@ -82,7 +87,7 @@ foreach( $data as $team_id => $row ):
|
|||||||
$name = '<a href="' . $permalink . '">' . $name . '</a>';
|
$name = '<a href="' . $permalink . '">' . $name . '</a>';
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
$output .= '<td class="data-name">' . $name . '</td>';
|
$output .= '<td class="data-name' . $name_class . '">' . $name . '</td>';
|
||||||
|
|
||||||
foreach( $labels as $key => $value ):
|
foreach( $labels as $key => $value ):
|
||||||
if ( $key == 'name' )
|
if ( $key == 'name' )
|
||||||
|
|||||||
Reference in New Issue
Block a user