diff --git a/assets/css/sportspress-rtl.css b/assets/css/sportspress-rtl.css new file mode 100644 index 00000000..3122784d --- /dev/null +++ b/assets/css/sportspress-rtl.css @@ -0,0 +1,58 @@ +/* SportsPress RTL */ + +/* Thumbnails and Details */ +.sp-template-logo, +.sp-template-photo { + float: right; + margin-right: 0; + margin-left: 2em; +} + +/* Pagination */ +.sp-pagination tfoot tr td.prev { + text-align: right; +} +.sp-pagination tfoot tr td.next { + text-align: left; +} + +/* League Table and Player List */ +.sp-league-table .data-name .team-logo, +.sp-player-list .data-name .player-photo { + margin-right: 0; + margin-left: 0.25em; + float: right; +} + +/* Event Calendar */ +.sp-event-calendar #next { + text-align: left; +} +.sp-event-calendar #prev { + text-align: right; +} + +/* Event List */ +.sp-event-list .data-article a .dashicons { + padding-right: 0; + padding-left: 3px; +} + +/* Event Blocks */ +.sp-event-blocks .logo-odd { + float: right; +} +.sp-event-blocks .logo-even { + float: left; +} + +@media only screen and (max-width: 40em) { + .sp-pinned-table { + left: auto; + right: 0; + } + .sp-responsive-table-wrapper .scrollable { + margin-left: 0; + margin-right: 50%; + } +} \ No newline at end of file diff --git a/assets/css/sportspress.css b/assets/css/sportspress.css index e18585e5..931734ec 100644 --- a/assets/css/sportspress.css +++ b/assets/css/sportspress.css @@ -6,12 +6,20 @@ overflow: visible; } -/* Title */ -.sp-event-logos { - margin-top: 0.5em; - margin-bottom: 0.5em; +/* Thumbnails and Details */ +.sp-template-logo, +.sp-template-photo { + float: left; + margin-bottom: 2em; + margin-right: 2em; + max-width: 50%; +} +.sp-template-event-logos { text-align: center; } +.sp-template-details { + display: inline-block; +} /* Data Tables */ .sp-scrollable-table-wrapper { @@ -243,7 +251,6 @@ .sp-responsive-table { margin-bottom: 0; } - .sp-pinned-table { position: absolute; left: 0; @@ -265,7 +272,6 @@ .sp-pinned-table td:last-child { border-bottom: 0; } - .sp-responsive-table-wrapper { position: relative; overflow: hidden; @@ -278,7 +284,6 @@ overflow: scroll; overflow-y: hidden; } - .sp-responsive-table-wrapper .scrollable td, .sp-responsive-table-wrapper .scrollable th { position: relative; diff --git a/includes/class-sp-frontend-scripts.php b/includes/class-sp-frontend-scripts.php index 3b7f5a3b..b1aff60e 100644 --- a/includes/class-sp-frontend-scripts.php +++ b/includes/class-sp-frontend-scripts.php @@ -25,14 +25,25 @@ class SP_Frontend_Scripts { * @return array */ public static function get_styles() { - return apply_filters( 'sportspress_enqueue_styles', array( + $styles = array( 'sportspress-general' => array( 'src' => str_replace( array( 'http:', 'https:' ), '', SP()->plugin_url() ) . '/assets/css/sportspress.css', 'deps' => '', 'version' => SP_VERSION, 'media' => 'all' ), - )); + ); + + if ( is_rtl() ): + $styles['sportspress-rtl'] = array( + 'src' => str_replace( array( 'http:', 'https:' ), '', SP()->plugin_url() ) . '/assets/css/sportspress-rtl.css', + 'deps' => '', + 'version' => SP_VERSION, + 'media' => 'all' + ); + endif; + + return apply_filters( 'sportspress_enqueue_styles', $styles ); } /** diff --git a/templates/event-blocks.php b/templates/event-blocks.php index 76e9a709..e9ec84cd 100644 --- a/templates/event-blocks.php +++ b/templates/event-blocks.php @@ -64,7 +64,7 @@ if ( isset( $columns ) ) $j++; if ( has_post_thumbnail ( $team ) ): if ( $link_teams ): - $logo = '' . get_the_post_thumbnail( $team, 'sportspress-fit-icon', array( 'class' => 'team-logo logo-' . ( $j % 2 ? 'odd' : 'even' ) ) ) . ''; + $logo = ''; else: $logo = get_the_post_thumbnail( $team, 'sportspress-fit-icon', array( 'class' => 'team-logo logo-' . ( $j % 2 ? 'odd' : 'even' ) ) ); endif;