Add several new styling layout options

This commit is contained in:
AlxMedia 2021-08-21 11:12:06 +02:00
parent f91185a775
commit 101731873d
5 changed files with 99 additions and 4 deletions

View file

@ -157,11 +157,43 @@ body,
'."\n";
}
// background color (boxed)
if ( get_theme_mod('color-background','#2d313a') != '#2d313a' ) {
if ( get_theme_mod('color-background-boxed','#2d313a') != '#2d313a' ) {
$styles .= '
.boxed #wrapper { background-color: '.esc_attr( get_theme_mod('color-background-boxed') ).'; }
'."\n";
}
// header background color
if ( get_theme_mod('color-header-background','') != '' ) {
$styles .= '
#header { background-color: '.esc_attr( get_theme_mod('color-header-background') ).'; }
'."\n";
}
// carousel background color
if ( get_theme_mod('color-carousel-background','') != '' ) {
$styles .= '
.slick-featured { background-color: '.esc_attr( get_theme_mod('color-carousel-background') ).'; }
'."\n";
}
// content background color
if ( get_theme_mod('color-content-background','') != '' ) {
$styles .= '
#page { background-color: '.esc_attr( get_theme_mod('color-content-background') ).'; }
#wrapper-bg { display: none; }
'."\n";
}
// sidebar widget background color
if ( get_theme_mod('color-widget-background','') != '' ) {
$styles .= '
.sidebar .widget,
.sidebar .widget:hover { background-color: '.esc_attr( get_theme_mod('color-widget-background') ).'; }
'."\n";
}
// footer background color
if ( get_theme_mod('color-footer-background','') != '' ) {
$styles .= '
#footer { background-color: '.esc_attr( get_theme_mod('color-footer-background') ).'; }
'."\n";
}
// header logo max-height
if ( get_theme_mod('logo-max-height','60') != '60' ) {
$styles .= '.site-title a img { max-height: '.esc_attr( get_theme_mod('logo-max-height') ).'px; }'."\n";

View file

@ -653,6 +653,46 @@ Kirki::add_field( 'incolor_theme', array(
'section' => 'styling',
'default' => '#2d313a',
) );
// Styling: Header Background
Kirki::add_field( 'incolor_theme', array(
'type' => 'color',
'settings' => 'color-header-background',
'label' => esc_html__( 'Header Background Color', 'incolor' ),
'section' => 'styling',
'default' => '',
) );
// Styling: Carousel Background
Kirki::add_field( 'incolor_theme', array(
'type' => 'color',
'settings' => 'color-carousel-background',
'label' => esc_html__( 'Carousel Background Color', 'incolor' ),
'section' => 'styling',
'default' => '',
) );
// Styling: Content Background
Kirki::add_field( 'incolor_theme', array(
'type' => 'color',
'settings' => 'color-content-background',
'label' => esc_html__( 'Content Background Color', 'incolor' ),
'section' => 'styling',
'default' => '',
) );
// Styling: Widget Background
Kirki::add_field( 'incolor_theme', array(
'type' => 'color',
'settings' => 'color-widget-background',
'label' => esc_html__( 'Sidebar Widget Background Color', 'incolor' ),
'section' => 'styling',
'default' => '',
) );
// Styling: Footer Background
Kirki::add_field( 'incolor_theme', array(
'type' => 'color',
'settings' => 'color-footer-background',
'label' => esc_html__( 'Footer Background Color', 'incolor' ),
'section' => 'styling',
'default' => '',
) );
// Styling: Header Logo Max-height
Kirki::add_field( 'incolor_theme', array(
'type' => 'slider',

View file

@ -2,7 +2,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Incolor\n"
"POT-Creation-Date: 2021-08-20 19:44+0200\n"
"POT-Creation-Date: 2021-08-21 11:11+0200\n"
"PO-Revision-Date: 2018-09-21 21:27+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -715,10 +715,30 @@ msgid "Background Color (Boxed)"
msgstr ""
#: functions/theme-options.php:660
msgid "Header Background Color"
msgstr ""
#: functions/theme-options.php:668
msgid "Carousel Background Color"
msgstr ""
#: functions/theme-options.php:676
msgid "Content Background Color"
msgstr ""
#: functions/theme-options.php:684
msgid "Sidebar Widget Background Color"
msgstr ""
#: functions/theme-options.php:692
msgid "Footer Background Color"
msgstr ""
#: functions/theme-options.php:700
msgid "Header Logo Image Max-height"
msgstr ""
#: functions/theme-options.php:661
#: functions/theme-options.php:701
msgid ""
"Your logo image should have the double height of this to be high resolution"
msgstr ""

View file

@ -87,5 +87,8 @@ Sidebar images
== Changelog ==
= 1.0.1 - 2021-08-21 =
* Added several more styling layout color options
= 1.0.0 - 2021-08-21 =
* Initial release

View file

@ -1,7 +1,7 @@
/*
Theme Name: Incolor
Theme URI: http://alx.media/themes/incolor/
Version: 1.0.0
Version: 1.0.1
Requires at least: 5.0
Requires PHP: 5.6
Tested up to: 5.8