Skip to content

Commit

Permalink
Added header color styling option
Browse files Browse the repository at this point in the history
  • Loading branch information
AlxMedia committed Jul 12, 2019
1 parent 2b0fc23 commit ce597cd
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 5 deletions.
27 changes: 27 additions & 0 deletions functions/dynamic-styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,33 @@ function minimer_dynamic_css() {
#wrapper { border-top-color: '.esc_attr( get_theme_mod('color-header-line') ).'; }
'."\n";
}
// header color
if ( get_theme_mod('color-header','#ffffff') != '#ffffff' ) {
$styles .= '
#header { background: '.esc_attr( get_theme_mod('color-header') ).'; border-bottom-color: rgba(0,0,0,0.1); }
.sticky-element-sticky #header { border-bottom-color: rgba(0,0,0,0.1); }
.site-title a { color: #fff; }
.site-description { color: rgba(255,255,255,0.7); }
#header .social-links { border-left-color: rgba(255,255,255,0.3); }
#header .social-links .social-tooltip { color: rgba(255,255,255,0.8); }
#header .social-links .social-tooltip:hover { color: #fff; }
.toggle-search { color: rgba(255,255,255,0.8); }
.toggle-search:hover,
.toggle-search.active { color: #fff; }
@media only screen and (min-width: 720px) {
#nav-header .nav > li > a { color: rgba(255,255,255,0.8); }
#nav-header .nav > li > a:hover,
#nav-header .nav > li:hover > a { color: #fff; }
#nav-header .nav > li.current_page_item > a,
#nav-header .nav > li.current-menu-item > a,
#nav-header .nav > li.current-menu-ancestor > a,
#nav-header .nav > li.current-post-parent > a { color: #fff; }
}
@media only screen and (max-width: 719px) {
.site-title { border-bottom-color: rgba(255,255,255,0.2)!important; }
}
'."\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";
Expand Down
8 changes: 8 additions & 0 deletions functions/theme-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,14 @@ function minimer_kirki_sidebars_select() {
'section' => 'styling',
'default' => '#333333',
) );
// Styling: Header Color
Kirki::add_field( 'minimer_theme', array(
'type' => 'color',
'settings' => 'color-header',
'label' => esc_html__( 'Header Color', 'minimer' ),
'section' => 'styling',
'default' => '#ffffff',
) );
// Styling: Comment Bubble
Kirki::add_field( 'minimer_theme', array(
'type' => 'color',
Expand Down
14 changes: 9 additions & 5 deletions languages/minimer.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Minimer\n"
"POT-Creation-Date: 2019-07-12 18:26+0200\n"
"POT-Creation-Date: 2019-07-12 18:50+0200\n"
"PO-Revision-Date: 2018-09-21 21:27+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down Expand Up @@ -734,22 +734,26 @@ msgid "Header Line Color"
msgstr ""

#: functions/theme-options.php:704
msgid "Comment Bubble Color"
msgid "Header Color"
msgstr ""

#: functions/theme-options.php:712
msgid "Category Label Color"
msgid "Comment Bubble Color"
msgstr ""

#: functions/theme-options.php:720
msgid "Footer Color"
msgid "Category Label Color"
msgstr ""

#: functions/theme-options.php:728
msgid "Footer Color"
msgstr ""

#: functions/theme-options.php:736
msgid "Header Logo Image Max-height"
msgstr ""

#: functions/theme-options.php:729
#: functions/theme-options.php:737
msgid ""
"Your logo image should have the double height of this to be high resolution"
msgstr ""
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Sidebar images
== Changelog ==

= 1.0.6 - 2019-07-12 =
* Added header color styling option
* Added link color styling option
* Fixed sidebar profile link color

Expand Down

0 comments on commit ce597cd

Please sign in to comment.