11<?php
2+
23/**
34 * @package Astroid Framework
45 * @author JoomDev https://www.joomdev.com
2829$ main_link_hover_color = $ template ->params ->get ('main_menu_link_hover_color ' , '' );
2930$ main_link_active_color = $ template ->params ->get ('main_menu_link_active_color ' , '' );
3031
31- // Dropdowns
32+ // Dropdown Menu
3233$ dropdown_main_background_color = $ template ->params ->get ('dropdown_bg_color ' , '' );
3334$ dropdown_main_link_color = $ template ->params ->get ('dropdown_link_color ' , '' );
3435$ dropdown_main_hover_link_color = $ template ->params ->get ('dropdown_menu_link_hover_color ' , '' );
4445$ mobile_active_link_color = $ template ->params ->get ('mobile_menu_active_link_color ' , '' );
4546$ mobile_active_background_color = $ template ->params ->get ('mobile_menu_active_bg_color ' , '' );
4647
47- //Footer
48+ // Footer
4849$ footer_background_color = $ template ->params ->get ('footer_bg_color ' , '' );
4950$ footer_text_color = $ template ->params ->get ('footer_text_color ' , '' );
5051$ footer_link_color = $ template ->params ->get ('footer_link_color ' , '' );
7172
7273<?php
7374
74- // Main Menu Coloring
75- $ main_menu_styles = [];
76- if (!empty ($ main_link_color )) {
77- $ main_menu_styles [] = '.astroid-nav .nav-link,.astroid-nav .nav-link{ color: ' . $ main_link_color . ' !important;} ' ;
78- }
79- if (!empty ($ main_link_hover_color )) {
80- $ main_menu_styles [] = '.astroid-nav .nav-link:hover, .astroid-nav .nav-link:hover{ color: ' . $ main_link_hover_color . ' !important;} ' ;
81- }
82- if (!empty ($ main_link_active_color )) {
83- $ main_menu_styles [] = '.astroid-nav .nav-link.active, .astroid-nav .nav-link.active{ color: ' . $ main_link_active_color . ' !important;} ' ;
84- }
85- ?>
86-
87- <?php
88-
8975// Header Coloring
9076$ header_styles = [];
9177if (!empty ($ header_background_color )) {
92- $ header_styles [] = 'header{ background-color: ' . $ header_background_color . ' !important;} ' ;
78+ $ header_styles [] = '.astroid- header-section { background-color: ' . $ header_background_color . ' !important;} ' ;
9379}
9480if (!empty ($ header_text_color )) {
95- $ header_styles [] = 'header * { color: ' . $ header_text_color . ' !important;} ' ;
81+ $ header_styles [] = 'header{ color: ' . $ header_text_color . ' !important;} ' ;
9682}
9783if (!empty ($ header_logo_text_color )) {
9884 $ header_styles [] = '.astroid-logo-text .site-title{ color: ' . $ header_logo_text_color . ' !important;} ' ;
10793
10894<?php
10995
96+ // Main Menu Coloring
97+ $ main_menu_styles = [];
98+ if (!empty ($ main_link_color )) {
99+ $ main_menu_styles [] = '.astroid-nav .nav-link{ color: ' . $ main_link_color . ' !important;} ' ;
100+ }
101+ if (!empty ($ main_link_hover_color )) {
102+ $ main_menu_styles [] = '.astroid-nav .nav-link:hover, .astroid-nav .nav-link:focus{ color: ' . $ main_link_hover_color . ' !important;} ' ;
103+ }
104+ if (!empty ($ main_link_active_color )) {
105+ $ main_menu_styles [] = '.astroid-nav .nav-link.active{ color: ' . $ main_link_active_color . ' !important;} ' ;
106+ }
107+ ?>
108+
109+ <?php
110+
110111// Dropdown Coloring
111112$ dropdown_styles = [];
112113if (!empty ($ dropdown_main_background_color )) {
113- $ dropdown_styles [] = '.astroid-nav .navbar-subnav,.astroid-nav .has-subnav.nav-item-level-1.hovered:after,.astroid-nav .has-subnav.nav-item-level-1.hovered:before{ background: ' . $ dropdown_main_background_color . ' !important;} ' ;
114+ $ dropdown_styles [] = '.astroid-nav .navbar-subnav, .astroid-nav .has-subnav.nav-item-level-1.hovered:after, .astroid-nav .has-subnav.nav-item-level-1.hovered:before{ background: ' . $ dropdown_main_background_color . ' !important;} ' ;
114115 $ dropdown_styles [] = '.astroid-nav .megamenu-container,.astroid-nav .has-megamenu.nav-item-level-1.hovered:after,.astroid-nav .has-megamenu.nav-item-level-1.hovered:before{ background: ' . $ dropdown_main_background_color . ' !important;} ' ;
115116}
116117if (!empty ($ dropdown_main_link_color )) {
137138
138139<?php
139140
140- // MobilemenuColoring
141+ // Mobile Menu Coloring
141142$ mobilemenu_styles = [];
142143if (!empty ($ mobile_background_color )) {
143144 $ mobilemenu_styles [] = '.astroid-mobilemenu-container .astroid-mobilemenu-inner .menu-item a,.astroid-mobilemenu-container .astroid-mobilemenu-inner .menu-item .menu-indicator,.astroid-mobilemenu-container .astroid-mobilemenu-inner .menu-indicator-back{ background-color: ' . $ mobile_background_color . ' !important;} ' ;
161162
162163<?php
163164
164- // MobilemenuColoring
165+ // Footer Coloring
165166$ footer_styles = [];
166167if (!empty ($ footer_background_color )) {
167- $ footer_styles [] = '# astroid-footer{ background-color: ' . $ footer_background_color . ' !important;} ' ;
168+ $ footer_styles [] = '. astroid-footer-section { background-color: ' . $ footer_background_color . ' !important;} ' ;
168169}
169170if (!empty ($ footer_text_color )) {
170171 $ footer_styles [] = '#astroid-footer{ color: ' . $ footer_text_color . ' !important;} ' ;
182183$ document = JFactory::getDocument ();
183184$ document ->addStyledeclaration (implode ('' , $ body_styles ));
184185$ document ->addStyledeclaration (implode ('' , $ header_styles ));
186+ $ document ->addStyledeclaration (implode ('' , $ main_menu_styles ));
185187$ document ->addStyledeclaration (implode ('' , $ dropdown_styles ));
186188$ document ->addStyledeclaration (implode ('' , $ mobilemenu_styles ));
187- $ document ->addStyledeclaration (implode ('' , $ main_menu_styles ));
188189$ document ->addStyledeclaration (implode ('' , $ footer_styles ));
189190?>
0 commit comments