This commit is contained in:
AlxMedia 2022-09-05 13:06:22 +02:00
parent bff8a29a7f
commit b7e70ef2fc
6 changed files with 112 additions and 6 deletions

View file

@ -545,6 +545,7 @@ if ( ! function_exists( 'inunity_body_class' ) ) {
if ( get_theme_mod( 'dark-theme' ,'off' ) == 'on' ) { $classes[] = 'dark'; }
if ( get_theme_mod( 'invert-logo' ,'on' ) == 'on' ) { $classes[] = 'invert-dark-logo'; }
if ( get_theme_mod( 'theme-toggle' ,'on' ) == 'on' ) { $classes[] = 'theme-toggle-on'; }
if ( get_theme_mod( 'color-header-sidebar' ,'#ffffff' ) != '#ffffff' ) { $classes[] = 'header-color'; }
if (! ( is_user_logged_in() ) ) { $classes[] = 'logged-out'; }
return $classes;
}

View file

@ -134,6 +134,96 @@ if ( ! function_exists( 'inunity_dynamic_css' ) ) {
.content-wrap-inner { border-radius: '.esc_attr( get_theme_mod('box-border-radius') ).'px; }
'."\n";
}
// header / sidebar color
if ( get_theme_mod('color-header-sidebar','#ffffff') != '#ffffff' ) {
$styles .= '
.header-color #header { border-right: 0; }
.header-color #header,
.header-color #header-bottom { background: '.esc_attr( get_theme_mod('color-header-sidebar') ).'; }
.header-color #header-top { border-bottom-color: rgba(255,255,255,0.1); }
.header-color #header-bottom { border-top-color: rgba(255,255,255,0.1); }
.header-color #header-bottom-bottom { background: rgba(0,0,0,0.1); }
.header-color .site-title a { color: #fff; }
.header-color .site-description { color: rgba(255,255,255,0.5); }
.header-color .toggle-search { border-left-color: rgba(255,255,255,0.1); }
.header-color .toggle-search.active { background-color: transparent; }
.header-color .toggle-search .svg-icon { fill: rgba(255,255,255,0.8); }
.header-color .toggle-search.active #svg-close { fill: rgba(255,255,255,0.8); }
.header-color .toggle-search:focus #svg-search { fill: rgba(255,255,255,0.5); }
.header-color .toggle-search:focus #svg-close { fill: rgba(255,255,255,0.5); }
.header-color .search-expand { background-color: transparent; }
.header-color #header .themeform.searchform div input { background: '.esc_attr( get_theme_mod('color-header-sidebar') ).'; color: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.08); }
@media only screen and (max-width: 719px) {
.header-color #header .themeform.searchform div input { border-top: 1px solid rgba(255,255,255,0.1); }
}
.header-color .social-links .social-tooltip { color: rgba(255,255,255,0.8); }
.header-color .social-links .social-tooltip:hover { color: #fff; }
.header-color #theme-toggle i { color: rgba(255,255,255,0.4); }
.header-color #theme-toggle-btn { background-color: rgba(0,0,0,0.1); }
.header-color #theme-toggle-btn:before { background: '.esc_attr( get_theme_mod('color-header-sidebar') ).'; }
body.dark.header-color #theme-toggle i { color: rgba(255,255,255,0.4); }
body.dark.header-color #theme-toggle-btn { background-color: rgba(0,0,0,0.1); box-shadow: none; }
body.dark.header-color #theme-toggle-btn:before { background: '.esc_attr( get_theme_mod('color-header-sidebar') ).'; border-color: #fff; }
.header-color .menu-toggle-icon span { background: #fff; }
.header-color .nav-menu.mobile button:focus,
.header-color .menu-toggle:focus { background: rgba(255,255,255,0.04); }
.header-color .nav-menu a { color: #fff; }
.header-color .nav-menu .svg-icon { fill: #fff; }
.header-color .nav-menu:not(.mobile) .menu ul { background: #fff; color: #fff; }
.header-color .nav-menu:not(.mobile) .menu ul:after { border-bottom-color: #fff; }
.header-color .nav-menu:not(.mobile) .menu ul ul:after { border-bottom-color: transparent; border-right-color: #fff; }
.header-color .nav-menu-dropdown-left .nav-menu:not(.mobile) .menu ul ul:after { border-left-color: #fff; border-bottom-color: transparent; }
.header-color .nav-menu:not(.mobile) a { color: rgba(255,255,255,0.6); }
.header-color .nav-menu:not(.mobile) a:hover { color: #fff; }
.header-color .nav-menu:not(.mobile) ul ul a:hover { color: #555; }
.header-color .nav-menu:not(.mobile) ul ul > li:hover > span { background: rgba(0,0,0,0.04); }
.header-color .nav-menu:not(.mobile) ul ul a { color: #333; }
.header-color .nav-menu:not(.mobile) button { color: #666; }
.header-color .nav-menu:not(.mobile) button.active { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.6); }
.header-color .nav-menu:not(.mobile) button .svg-icon { fill: rgba(255,255,255,0.7); }
.header-color .nav-menu:not(.mobile) ul ul button { color: #333; }
.header-color .nav-menu:not(.mobile) ul ul button.active { background: #eee; color: rgba(255,255,255,0.5); }
.header-color .nav-menu:not(.mobile) ul ul button .svg-icon { fill: rgba(0,0,0,0.5); }
.header-color .nav-menu:not(.mobile) li.current_page_item > span > a,
.header-color .nav-menu:not(.mobile) li.current-menu-item > span > a,
.header-color .nav-menu:not(.mobile) li.current-menu-ancestor > span > a,
.header-color .nav-menu:not(.mobile) li.current-post-parent > span > a { color: #fff; }
.header-color .nav-menu:not(.mobile) ul ul li.current_page_item > span > a,
.header-color .nav-menu:not(.mobile) ul ul li.current-menu-item > span > a,
.header-color .nav-menu:not(.mobile) ul ul li.current-menu-ancestor > span > a,
.header-color .nav-menu:not(.mobile) ul ul li.current-post-parent > span > a { color: #777; }
.header-color .nav-menu.mobile { }
.header-color .nav-menu.mobile button.active .svg-icon { fill: #fff; }
.header-color .nav-menu.mobile ul ul { background: rgba(0,0,0,0.08); }
.header-color .nav-menu.mobile ul li .menu-item-wrapper,
.header-color .nav-menu.mobile ul ul li .menu-item-wrapper { border-bottom: 1px solid rgba(255,255,255,0.07); }
.header-color .nav-menu.mobile ul li a { color: #fff; }
.header-color .nav-menu.mobile ul button,
.header-color .nav-menu.mobile ul ul button { border-left: 1px solid rgba(255,255,255,0.07); }
.header-color .nav-menu.mobile > div > ul { border-top: 1px solid rgba(255,255,255,0.07); }
@media only screen and (min-width: 1024px) {
.header-color .nav-menu:not(.mobile) button { background: rgba(0,0,0,0.15); }
.header-color .nav-menu:not(.mobile) .menu ul:after { border: 8px solid transparent; border-right-color: #fff; }
.header-color .nav-menu:not(.mobile) ul ul button { background: transparent; color: rgba(255,255,255,0.5); }
}
@media only screen and (max-width: 719px) {
.header-color .toggle-search .svg-icon,
.header-color .toggle-search.active #svg-close { fill: #fff; }
.header-color .toggle-search:focus #svg-search,
.header-color .toggle-search:focus #svg-close { fill: rgba(255,255,255,0.6); }
}
'."\n";
}
// background color
if ( get_theme_mod('color-background','#f4f4f4') != '#f4f4f4' ) {
$styles .= '

View file

@ -705,6 +705,14 @@ Kirki::add_field( 'inunity_theme', array(
'step' => '1',
),
) );
// Styling: Header / Sidebar Color
Kirki::add_field( 'inunity_theme', array(
'type' => 'color',
'settings' => 'color-header-sidebar',
'label' => esc_html__( 'Header / Sidebar Color', 'inunity' ),
'section' => 'styling',
'default' => '#ffffff',
) );
// Styling: Background Color
Kirki::add_field( 'inunity_theme', array(
'type' => 'color',

View file

@ -2,7 +2,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Inunity\n"
"POT-Creation-Date: 2022-09-05 10:54+0200\n"
"POT-Creation-Date: 2022-09-05 13:02+0200\n"
"PO-Revision-Date: 2018-09-21 21:27+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -123,19 +123,19 @@ msgstr ""
msgid "Footer 4"
msgstr ""
#: functions.php:691
#: functions.php:692
msgid "Alx Extensions"
msgstr ""
#: functions.php:695
#: functions.php:696
msgid "Meta Box"
msgstr ""
#: functions.php:699
#: functions.php:700
msgid "Regenerate Thumbnails"
msgstr ""
#: functions.php:703
#: functions.php:704
msgid "WP-PageNavi"
msgstr ""
@ -759,6 +759,10 @@ msgid "Change radius of the content boxes."
msgstr ""
#: functions/theme-options.php:712
msgid "Header / Sidebar Color"
msgstr ""
#: functions/theme-options.php:720
msgid "Background Color"
msgstr ""

View file

@ -91,5 +91,8 @@ Content images
== Changelog ==
= 1.0.1 - 2022-09-05 =
* Added header / sidebar color styling option
= 1.0.0 - 2022-09-05 =
* Initial release

View file

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