Remove alternate and add link color setting
This commit is contained in:
@@ -151,12 +151,19 @@
|
|||||||
margin-bottom: 4em;
|
margin-bottom: 4em;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Templates */
|
/* View all */
|
||||||
.sp-view-all-link {
|
.sp-view-all-link {
|
||||||
display: block;
|
display: block;
|
||||||
margin-top: 0.5em;
|
margin-top: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Alternate */
|
||||||
|
.sp-data-table tbody tr.odd,
|
||||||
|
.sp-data-table tbody tr.alternate,
|
||||||
|
.sp-calendar tbody td#today {
|
||||||
|
background: rgba(0, 0, 0, 0.02);
|
||||||
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 40em) {
|
@media only screen and (max-width: 40em) {
|
||||||
.sp-responsive-table {
|
.sp-responsive-table {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
|||||||
@@ -126,15 +126,15 @@ class SP_Settings_General extends SP_Settings_Page {
|
|||||||
$primary = ( ! empty( $_POST['sportspress_frontend_css_primary'] ) ) ? sp_format_hex( $_POST['sportspress_frontend_css_primary'] ) : '';
|
$primary = ( ! empty( $_POST['sportspress_frontend_css_primary'] ) ) ? sp_format_hex( $_POST['sportspress_frontend_css_primary'] ) : '';
|
||||||
$heading = ( ! empty( $_POST['sportspress_frontend_css_heading'] ) ) ? sp_format_hex( $_POST['sportspress_frontend_css_heading'] ) : '';
|
$heading = ( ! empty( $_POST['sportspress_frontend_css_heading'] ) ) ? sp_format_hex( $_POST['sportspress_frontend_css_heading'] ) : '';
|
||||||
$text = ( ! empty( $_POST['sportspress_frontend_css_text'] ) ) ? sp_format_hex( $_POST['sportspress_frontend_css_text'] ) : '';
|
$text = ( ! empty( $_POST['sportspress_frontend_css_text'] ) ) ? sp_format_hex( $_POST['sportspress_frontend_css_text'] ) : '';
|
||||||
|
$link = ( ! empty( $_POST['sportspress_frontend_css_link'] ) ) ? sp_format_hex( $_POST['sportspress_frontend_css_link'] ) : '';
|
||||||
$background = ( ! empty( $_POST['sportspress_frontend_css_background'] ) ) ? sp_format_hex( $_POST['sportspress_frontend_css_background'] ) : '';
|
$background = ( ! empty( $_POST['sportspress_frontend_css_background'] ) ) ? sp_format_hex( $_POST['sportspress_frontend_css_background'] ) : '';
|
||||||
$alternate = ( ! empty( $_POST['sportspress_frontend_css_alternate'] ) ) ? sp_format_hex( $_POST['sportspress_frontend_css_alternate'] ) : '';
|
|
||||||
|
|
||||||
$colors = array(
|
$colors = array(
|
||||||
'primary' => $primary,
|
'primary' => $primary,
|
||||||
'heading' => $heading,
|
'heading' => $heading,
|
||||||
'text' => $text,
|
'text' => $text,
|
||||||
'background' => $background,
|
'background' => $background,
|
||||||
'alternate' => $alternate
|
'link' => $link
|
||||||
);
|
);
|
||||||
|
|
||||||
update_option( 'sportspress_frontend_css_colors', $colors );
|
update_option( 'sportspress_frontend_css_colors', $colors );
|
||||||
@@ -186,14 +186,14 @@ class SP_Settings_General extends SP_Settings_Page {
|
|||||||
if ( empty( $colors['heading'] ) ) $colors['heading'] = '#ffffff';
|
if ( empty( $colors['heading'] ) ) $colors['heading'] = '#ffffff';
|
||||||
if ( empty( $colors['text'] ) ) $colors['text'] = '#222222';
|
if ( empty( $colors['text'] ) ) $colors['text'] = '#222222';
|
||||||
if ( empty( $colors['background'] ) ) $colors['background'] = '#f5f5f5';
|
if ( empty( $colors['background'] ) ) $colors['background'] = '#f5f5f5';
|
||||||
if ( empty( $colors['alternate'] ) ) $colors['alternate'] = '#f0f0f0';
|
if ( empty( $colors['link'] ) ) $colors['link'] = '#00a69c';
|
||||||
|
|
||||||
// Show inputs
|
// Show inputs
|
||||||
$this->color_picker( __( 'Primary', 'sportspress' ), 'sportspress_frontend_css_primary', $colors['primary'] );
|
$this->color_picker( __( 'Primary', 'sportspress' ), 'sportspress_frontend_css_primary', $colors['primary'] );
|
||||||
$this->color_picker( __( 'Heading', 'sportspress' ), 'sportspress_frontend_css_heading', $colors['heading'] );
|
$this->color_picker( __( 'Heading', 'sportspress' ), 'sportspress_frontend_css_heading', $colors['heading'] );
|
||||||
$this->color_picker( __( 'Text', 'sportspress' ), 'sportspress_frontend_css_text', $colors['text'] );
|
$this->color_picker( __( 'Text', 'sportspress' ), 'sportspress_frontend_css_text', $colors['text'] );
|
||||||
|
$this->color_picker( __( 'Link', 'sportspress' ), 'sportspress_frontend_css_link', $colors['link'] );
|
||||||
$this->color_picker( __( 'Background', 'sportspress' ), 'sportspress_frontend_css_background', $colors['background'] );
|
$this->color_picker( __( 'Background', 'sportspress' ), 'sportspress_frontend_css_background', $colors['background'] );
|
||||||
$this->color_picker( __( 'Alternate', 'sportspress' ), 'sportspress_frontend_css_alternate', $colors['alternate'] );
|
|
||||||
|
|
||||||
?><br>
|
?><br>
|
||||||
<label for="sportspress_enable_frontend_css">
|
<label for="sportspress_enable_frontend_css">
|
||||||
|
|||||||
@@ -108,11 +108,11 @@ class SP_Frontend_Scripts {
|
|||||||
if ( isset( $colors['text'] ) )
|
if ( isset( $colors['text'] ) )
|
||||||
echo '.sp-data-table tbody,.sp-calendar tbody{color: ' . $colors['text'] . ' !important}';
|
echo '.sp-data-table tbody,.sp-calendar tbody{color: ' . $colors['text'] . ' !important}';
|
||||||
|
|
||||||
|
if ( isset( $colors['link'] ) )
|
||||||
|
echo '.sp-data-table tbody a,.sp-data-table tbody a:hover,.sp-calendar tbody a:focus{color: ' . $colors['link'] . ' !important}';
|
||||||
|
|
||||||
if ( isset( $colors['background'] ) )
|
if ( isset( $colors['background'] ) )
|
||||||
echo '.sp-data-table tbody,.sp-calendar tbody{background: ' . $colors['background'] . ' !important}';
|
echo '.sp-data-table tbody,.sp-calendar tbody{background: ' . $colors['background'] . ' !important}';
|
||||||
|
|
||||||
if ( isset( $colors['alternate'] ) )
|
|
||||||
echo '.sp-data-table tbody tr.odd,.sp-data-table tbody tr.alternate,.sp-calendar tbody td#today{background: ' . $colors['alternate'] . ' !important}';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty( $custom ) )
|
if ( ! empty( $custom ) )
|
||||||
|
|||||||
@@ -129,8 +129,8 @@ class SP_Install {
|
|||||||
add_option( 'sportspress_frontend_css_primary', '#00a69c' );
|
add_option( 'sportspress_frontend_css_primary', '#00a69c' );
|
||||||
add_option( 'sportspress_frontend_css_heading', '#ffffff' );
|
add_option( 'sportspress_frontend_css_heading', '#ffffff' );
|
||||||
add_option( 'sportspress_frontend_css_text', '#222222' );
|
add_option( 'sportspress_frontend_css_text', '#222222' );
|
||||||
|
add_option( 'sportspress_frontend_css_link', '#00a69c' );
|
||||||
add_option( 'sportspress_frontend_css_background', '#f5f5f5' );
|
add_option( 'sportspress_frontend_css_background', '#f5f5f5' );
|
||||||
add_option( 'sportspress_frontend_css_alternate', '#f0f0f0' );
|
|
||||||
|
|
||||||
if ( ! get_option( 'sportspress_installed' ) ) {
|
if ( ! get_option( 'sportspress_installed' ) ) {
|
||||||
// Configure default sport
|
// Configure default sport
|
||||||
|
|||||||
Reference in New Issue
Block a user