Plugin Directory

Changeset 2151875


Ignore:
Timestamp:
09/05/2019 06:08:12 PM (7 years ago)
Author:
metricthemes
Message:

Added Sticky Header Feature and Mobile Menu is now full screen.

Location:
header-footer-composer
Files:
48 added
10 edited

Legend:

Unmodified
Added
Removed
  • header-footer-composer/trunk/README.txt

    r2146503 r2151875  
    77Tested up to: 5.2
    88Requires PHP: 5.6
    9 Stable tag: 1.0.0
     9Stable tag: 1.0.1
    1010License: GPLv2 or later
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4040== Changelog ==
    4141
    42 = 1.0 .0 =
     42= 1.0.1 =
     43* Added Sticky Header Feature 
     44* Mobile Menu is now full screen.
     45
     46= 1.0.0 =
    4347* Initial Release
    4448
  • header-footer-composer/trunk/header-footer-composer.php

    r2146501 r2151875  
    2424 * Plugin URI:        https://github.com/metricthemes/header-footer-composer
    2525 * Description:       Design custom headers and footers for your site using Elementor Page builder.
    26  * Version:           1.0.0
     26 * Version:           1.0.1
    2727 * Author:            MetricThemes
    2828 * Author URI:        https://metricthemes.com
  • header-footer-composer/trunk/includes/class-header-footer-composer-widgets.php

    r2146501 r2151875  
    4242            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/widgets/hfc-sitelogo.php';
    4343            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/widgets/hfc-navmenu.php';
    44             require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/widgets/hfc-overlay-nav.php';           
     44            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/widgets/hfc-overlay-nav.php';                      
    4545        }
    4646
  • header-footer-composer/trunk/includes/class-header-footer-composer.php

    r2146501 r2151875  
    117117        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-header-footer-composer-render.php';                                   
    118118       
    119         require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-header-footer-composer-widgets.php';                                         
    120        
     119        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-header-footer-composer-widgets.php';                                                         
     120       
     121        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/widgets/hfc-stickyheader.php';                                     
    121122       
    122123        $this->loader = new Header_Footer_Composer_Loader();
  • header-footer-composer/trunk/includes/widgets/hfc-navmenu.php

    r2146501 r2151875  
    172172        );
    173173       
    174         $this->add_control(
     174        $this->add_responsive_control(
    175175            'hfc_nav_menu_bgcolor',
    176176            [
    177                 'label' => __( 'Navbar Background Color', 'header-footer-composer' ),
     177                'label' => __( 'Navbar Background Color', 'header-footer-composer' ),               
    178178                'type' => \Elementor\Controls_Manager::COLOR,
    179179                'default' => '#191919',
    180180                'selectors' => [
    181                     '{{WRAPPER}} .hfc-navbar' => 'background-color: {{VALUE}}',
     181                    '{{WRAPPER}} .hfc-navbar, .hfc-nav-menu-top.open' => 'background-color: {{VALUE}}',
    182182                ],
    183183            ]
     
    212212        );     
    213213       
    214         $this->add_control(
     214        $this->add_responsive_control(
    215215            'hfc_nav_menu_style_normal_color',
    216216            [
     
    224224        );     
    225225       
    226         $this->add_control(
     226        $this->add_responsive_control(
    227227            'hfc_nav_menu_style_normal_bgcolor',
    228228            [
     
    245245        );     
    246246       
    247         $this->add_control(
     247        $this->add_responsive_control(
    248248            'hfc_nav_menu_style_hover_color',
    249249            [
     
    256256        );     
    257257       
    258         $this->add_control(
     258        $this->add_responsive_control(
    259259            'hfc_nav_menu_style_hover_bgcolor',
    260260            [
     
    275275        );     
    276276       
    277         $this->add_control(
     277        $this->add_responsive_control(
    278278            'hfc_nav_menu_style_active_color',
    279279            [
     
    286286        );     
    287287       
    288         $this->add_control(
     288        $this->add_responsive_control(
    289289            'hfc_nav_menu_style_active_bgcolor',
    290290            [
     
    342342        );             
    343343       
    344         $this->add_control(
     344        $this->add_responsive_control(
    345345            'hfc_nav_menu_dropdown_bgcolor',
    346346            [
     
    381381        );     
    382382       
    383         $this->add_control(
     383        $this->add_responsive_control(
    384384            'hfc_nav_menu_dropdown_style_normal_color',
    385385            [
     
    393393        );     
    394394       
    395         $this->add_control(
     395        $this->add_responsive_control(
    396396            'hfc_nav_menu_dropdown_style_normal_bgcolor',
    397397            [
     
    414414        );     
    415415       
    416         $this->add_control(
     416        $this->add_responsive_control(
    417417            'hfc_nav_menu_dropdown_style_hover_color',
    418418            [
     
    425425        );     
    426426       
    427         $this->add_control(
     427        $this->add_responsive_control(
    428428            'hfc_nav_menu_dropdown_style_hover_bgcolor',
    429429            [
     
    444444        );     
    445445       
    446         $this->add_control(
     446        $this->add_responsive_control(
    447447            'hfc_nav_menu_dropdown_style_active_color',
    448448            [
     
    455455        );     
    456456       
    457         $this->add_control(
     457        $this->add_responsive_control(
    458458            'hfc_nav_menu_dropdown_style_active_bgcolor',
    459459            [
     
    482482                'name' => 'hfc_nav_menu_dropdown_style_link_border',
    483483                'label' => __( 'Border', 'header-footer-composer' ),
    484                 'selector' => '{{WRAPPER}} .hfc-navbar ul ul',
     484                'selector' => '{{WRAPPER}} .hfc-navbar ul ul.sub-menu',
    485485            ]
    486486        );
     
    549549                'label' => __( 'Background Color', 'header-footer-composer' ),
    550550                'type' => \Elementor\Controls_Manager::COLOR,
     551                'default' => '#191919',             
    551552                'selectors' => [
    552553                    '{{WRAPPER}} .hfc-navbar #menu-button' => 'background-color: {{VALUE}}',
     
    592593        $this->add_control(
    593594            'hfc_nav_menu_toggle_style_align', [
    594                 'label'          =>esc_html__( 'Alignment', 'header-footer-composer' ),
     595                'label'          => esc_html__( 'Alignment', 'header-footer-composer' ),
    595596                'type'           => Controls_Manager::CHOOSE,
    596597                'options'        => [
  • header-footer-composer/trunk/languages/header-footer-composer.pot

    r2146501 r2151875  
    99"Project-Id-Version: PACKAGE VERSION\n"
    1010"Report-Msgid-Bugs-To: \n"
    11 "POT-Creation-Date: 2019-08-24 17:57+0545\n"
     11"POT-Creation-Date: 2019-09-05 23:45+0545\n"
    1212"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    148148
    149149#: includes/widgets/hfc-navmenu.php:29 includes/widgets/hfc-navmenu.php:63
    150 #: includes/widgets/hfc-overlay-nav.php:65
     150#: includes/widgets/hfc-overlay-nav.php:63
    151151msgid "Nav Menu"
    152152msgstr ""
    153153
    154 #: includes/widgets/hfc-navmenu.php:50 includes/widgets/hfc-overlay-nav.php:52
     154#: includes/widgets/hfc-navmenu.php:50 includes/widgets/hfc-overlay-nav.php:50
    155155msgid "Select a Menu"
    156156msgstr ""
    157157
    158 #: includes/widgets/hfc-navmenu.php:71 includes/widgets/hfc-overlay-nav.php:73
     158#: includes/widgets/hfc-navmenu.php:71 includes/widgets/hfc-overlay-nav.php:71
    159159msgid "Select Menu"
    160160msgstr ""
    161161
    162 #: includes/widgets/hfc-navmenu.php:83 includes/widgets/hfc-overlay-nav.php:85
     162#: includes/widgets/hfc-navmenu.php:83 includes/widgets/hfc-overlay-nav.php:83
    163163msgid ""
    164164"<small>Please Go to the Dashboard >> Appereance >> Menus screen to manage "
     
    166166msgstr ""
    167167
    168 #: includes/widgets/hfc-navmenu.php:96 includes/widgets/hfc-navmenu.php:594
    169 #: includes/widgets/hfc-overlay-nav.php:91
     168#: includes/widgets/hfc-navmenu.php:96 includes/widgets/hfc-navmenu.php:595
     169#: includes/widgets/hfc-overlay-nav.php:89
    170170#: includes/widgets/hfc-sitelogo.php:43 includes/widgets/hfc-sitetitle.php:73
    171171msgid "Alignment"
     
    173173
    174174#: includes/widgets/hfc-navmenu.php:100 includes/widgets/hfc-navmenu.php:145
    175 #: includes/widgets/hfc-navmenu.php:599
    176 #: includes/widgets/hfc-overlay-nav.php:97
     175#: includes/widgets/hfc-navmenu.php:600
     176#: includes/widgets/hfc-overlay-nav.php:95
    177177#: includes/widgets/hfc-sitelogo.php:48 includes/widgets/hfc-sitetitle.php:78
    178178msgid "Left"
     
    180180
    181181#: includes/widgets/hfc-navmenu.php:104 includes/widgets/hfc-navmenu.php:149
    182 #: includes/widgets/hfc-navmenu.php:603
    183 #: includes/widgets/hfc-overlay-nav.php:101
     182#: includes/widgets/hfc-navmenu.php:604
     183#: includes/widgets/hfc-overlay-nav.php:99
    184184#: includes/widgets/hfc-sitelogo.php:52 includes/widgets/hfc-sitetitle.php:82
    185185msgid "Center"
     
    187187
    188188#: includes/widgets/hfc-navmenu.php:108 includes/widgets/hfc-navmenu.php:153
    189 #: includes/widgets/hfc-navmenu.php:607
    190 #: includes/widgets/hfc-overlay-nav.php:105
     189#: includes/widgets/hfc-navmenu.php:608
     190#: includes/widgets/hfc-overlay-nav.php:103
    191191#: includes/widgets/hfc-sitelogo.php:56 includes/widgets/hfc-sitetitle.php:86
    192192msgid "Right"
     
    222222
    223223#: includes/widgets/hfc-navmenu.php:169
    224 #: includes/widgets/hfc-overlay-nav.php:120
     224#: includes/widgets/hfc-overlay-nav.php:118
    225225msgid "Main Menu"
    226226msgstr ""
     
    231231
    232232#: includes/widgets/hfc-navmenu.php:190 includes/widgets/hfc-navmenu.php:360
    233 #: includes/widgets/hfc-overlay-nav.php:141
     233#: includes/widgets/hfc-overlay-nav.php:139
    234234#: includes/widgets/hfc-sitetitle.php:126
    235235#: includes/widgets/hfc-sitetitle.php:165
     
    238238
    239239#: includes/widgets/hfc-navmenu.php:210 includes/widgets/hfc-navmenu.php:379
    240 #: includes/widgets/hfc-overlay-nav.php:161
     240#: includes/widgets/hfc-overlay-nav.php:159
    241241msgid "Normal"
    242242msgstr ""
    243243
    244244#: includes/widgets/hfc-navmenu.php:217 includes/widgets/hfc-navmenu.php:386
    245 #: includes/widgets/hfc-overlay-nav.php:168
     245#: includes/widgets/hfc-overlay-nav.php:166
    246246msgid "Link Color"
    247247msgstr ""
    248248
    249249#: includes/widgets/hfc-navmenu.php:229 includes/widgets/hfc-navmenu.php:398
    250 #: includes/widgets/hfc-overlay-nav.php:180
     250#: includes/widgets/hfc-overlay-nav.php:178
    251251msgid "Link Background Color"
    252252msgstr ""
    253253
    254254#: includes/widgets/hfc-navmenu.php:243 includes/widgets/hfc-navmenu.php:412
    255 #: includes/widgets/hfc-overlay-nav.php:194
     255#: includes/widgets/hfc-overlay-nav.php:192
    256256msgid "Hover"
    257257msgstr ""
    258258
    259259#: includes/widgets/hfc-navmenu.php:250 includes/widgets/hfc-navmenu.php:419
    260 #: includes/widgets/hfc-overlay-nav.php:201
     260#: includes/widgets/hfc-overlay-nav.php:199
    261261msgid "Hover Link Color"
    262262msgstr ""
    263263
    264264#: includes/widgets/hfc-navmenu.php:261 includes/widgets/hfc-navmenu.php:430
    265 #: includes/widgets/hfc-overlay-nav.php:212
     265#: includes/widgets/hfc-overlay-nav.php:210
    266266msgid "Hover Link Background Color"
    267267msgstr ""
     
    280280
    281281#: includes/widgets/hfc-navmenu.php:313 includes/widgets/hfc-navmenu.php:503
    282 #: includes/widgets/hfc-navmenu.php:649
    283 #: includes/widgets/hfc-overlay-nav.php:233
    284 #: includes/widgets/hfc-overlay-nav.php:353
     282#: includes/widgets/hfc-navmenu.php:650
     283#: includes/widgets/hfc-overlay-nav.php:231
     284#: includes/widgets/hfc-overlay-nav.php:351
    285285#: includes/widgets/hfc-sitelogo.php:115
    286286msgid "Padding"
     
    288288
    289289#: includes/widgets/hfc-navmenu.php:325 includes/widgets/hfc-navmenu.php:515
    290 #: includes/widgets/hfc-overlay-nav.php:245
     290#: includes/widgets/hfc-overlay-nav.php:243
    291291#: includes/widgets/hfc-sitelogo.php:127
    292292msgid "Margin"
     
    305305msgstr ""
    306306
    307 #: includes/widgets/hfc-navmenu.php:491 includes/widgets/hfc-navmenu.php:637
    308 #: includes/widgets/hfc-overlay-nav.php:341
     307#: includes/widgets/hfc-navmenu.php:491 includes/widgets/hfc-navmenu.php:638
     308#: includes/widgets/hfc-overlay-nav.php:339
    309309msgid "Border Radius"
    310310msgstr ""
    311311
    312312#: includes/widgets/hfc-navmenu.php:529
    313 #: includes/widgets/hfc-overlay-nav.php:259
     313#: includes/widgets/hfc-overlay-nav.php:257
    314314msgid "Toggle Button"
    315315msgstr ""
    316316
    317317#: includes/widgets/hfc-navmenu.php:537
    318 #: includes/widgets/hfc-overlay-nav.php:267
     318#: includes/widgets/hfc-overlay-nav.php:265
    319319#: includes/widgets/hfc-sitetitle.php:149
    320320msgid "Color"
     
    322322
    323323#: includes/widgets/hfc-navmenu.php:549
    324 #: includes/widgets/hfc-overlay-nav.php:128
    325 #: includes/widgets/hfc-overlay-nav.php:279
     324#: includes/widgets/hfc-overlay-nav.php:126
     325#: includes/widgets/hfc-overlay-nav.php:277
     326#: includes/widgets/hfc-stickyheader.php:92
    326327msgid "Background Color"
    327328msgstr ""
    328329
    329 #: includes/widgets/hfc-navmenu.php:568
    330 #: includes/widgets/hfc-overlay-nav.php:298
     330#: includes/widgets/hfc-navmenu.php:569
     331#: includes/widgets/hfc-overlay-nav.php:296
    331332msgid "Size"
    332333msgstr ""
    333334
    334 #: includes/widgets/hfc-navmenu.php:629
    335 #: includes/widgets/hfc-overlay-nav.php:333
     335#: includes/widgets/hfc-navmenu.php:630
     336#: includes/widgets/hfc-overlay-nav.php:331
    336337msgid "Toggle Border"
    337338msgstr ""
    338339
    339 #: includes/widgets/hfc-overlay-nav.php:31
     340#: includes/widgets/hfc-overlay-nav.php:29
    340341msgid "Overlay Nav Menu"
     342msgstr ""
     343
     344#: includes/widgets/hfc-overlay-nav.php:373
     345msgid "&#9776;"
    341346msgstr ""
    342347
     
    423428msgid "Site Description"
    424429msgstr ""
     430
     431#: includes/widgets/hfc-stickyheader.php:9
     432msgid "Sticky Header"
     433msgstr ""
     434
     435#: includes/widgets/hfc-stickyheader.php:17
     436msgid "Enable Sticky Header"
     437msgstr ""
     438
     439#: includes/widgets/hfc-stickyheader.php:19
     440#: includes/widgets/hfc-stickyheader.php:116
     441msgid "On"
     442msgstr ""
     443
     444#: includes/widgets/hfc-stickyheader.php:20
     445#: includes/widgets/hfc-stickyheader.php:117
     446msgid "Off"
     447msgstr ""
     448
     449#: includes/widgets/hfc-stickyheader.php:31
     450msgid "Enabled On"
     451msgstr ""
     452
     453#: includes/widgets/hfc-stickyheader.php:37
     454msgid "Desktop"
     455msgstr ""
     456
     457#: includes/widgets/hfc-stickyheader.php:38
     458msgid "Tablet"
     459msgstr ""
     460
     461#: includes/widgets/hfc-stickyheader.php:39
     462msgid "Mobile"
     463msgstr ""
     464
     465#: includes/widgets/hfc-stickyheader.php:61
     466msgid "Scroll Distance (px)"
     467msgstr ""
     468
     469#: includes/widgets/hfc-stickyheader.php:70
     470msgid "Choose the scroll distance to enable Sticky Header Effects"
     471msgstr ""
     472
     473#: includes/widgets/hfc-stickyheader.php:114
     474msgid "Bottom Border"
     475msgstr ""
     476
     477#: includes/widgets/hfc-stickyheader.php:132
     478msgid "Border Color"
     479msgstr ""
     480
     481#: includes/widgets/hfc-stickyheader.php:145
     482msgid "Border Size (px)"
     483msgstr ""
     484
     485#: includes/widgets/hfc-stickyheader.php:154
     486msgid "Only adds bottom border to the sticky header."
     487msgstr ""
  • header-footer-composer/trunk/public/css/header-footer-composer-public.css

    r2146501 r2151875  
    1010    transition: opacity 0.5s, visibility 0s 0.5s;
    1111}
     12.hfc-sticky-header-on {
     13transition: 0.300s ease-out;
     14}
     15.hfc-sticky-header {
     16    position: fixed !important;
     17    top: 0px;
     18    width: 100%;
     19    z-index: 9999;
     20    transform: translateY(0%); 
     21    transition: .35s ease-out; 
     22}
  • header-footer-composer/trunk/public/css/hfc-navmenu.css

    r2146501 r2151875  
    139139  .hfc-navbar ul li {
    140140    width: 100%;
    141     border-top: 1px solid rgba(120, 120, 120, 0.2);
    142141  }
    143142  .hfc-navbar ul ul li,
     
    195194    margin: 0px auto;
    196195    text-align: center;
    197     width: 50px;
    198196    /* float: right; */
     197  } 
     198  .hfc-navbar #menu-button.menu-opened {
     199  z-index:10;
    199200  } 
    200201  .hfc-navbar #menu-button.menu-opened:after {
     
    274275  }
    275276}
     277
     278@media (min-width: 320px) and (max-width: 767px) {
     279    .hfc-nav-menu-top.open {
     280    display: block;
     281    position: fixed;
     282    width: 100%;   
     283    top: 0;
     284    left: 0;
     285    height: 100vh;
     286    padding-top:16%;
     287    }
     288}
  • header-footer-composer/trunk/public/js/header-footer-composer-public.js

    r2146501 r2151875  
    11jQuery(document).ready(function ($) {
     2                                                     
     3function HFC_Header() {
     4   
     5        var hfcheader   = $('.hfc-sticky-header-on');               
     6        data_settings   = hfcheader.data('settings');                   
     7       
     8        if ( typeof data_settings != 'undefined' ) {
     9       
     10            data_scroll_dist    = data_settings["hfc_sticky_header_scroll_top"];
     11            var scroll_dist     = data_scroll_dist["size"];             
     12           
     13           
     14            var backgroundcolor = data_settings["hfc_sticky_header_bgcolor"];               
     15           
     16            var border_ed       = data_settings["hfc_sticky_header_border_ed"];                     
     17            if (border_ed) {
     18                var bordercolor     = data_settings["hfc_sticky_header_border_color"];                             
     19                var bordersize      = data_settings["hfc_sticky_header_border_size"];                               
     20                data_border_size    = data_settings["hfc_sticky_header_border_size"];
     21                var border_size     = data_border_size["size"];     
     22            }
     23   
     24            var devices     = data_settings["hfc_sticky_header_devices"];
     25            var width       = $(window).width();
     26            header_height   = hfcheader.height();       
     27                           
     28            if( typeof width != 'undefined' && width) {     
     29                if( width >= 1025 ) {
     30                    var enabled = "desktop";
     31                }
     32                else if (width  > 767 && width < 1025  ) {
     33                    var enabled = "tablet";                 
     34                }
     35                else if (width <= 767 ) {
     36                    var enabled = "mobile";
     37                }
     38            }   
     39           
     40            /* Sticky Menu */
     41            if ($.inArray(enabled, devices)!='-1') {
     42                var mns = "hfc-sticky-header";
     43               
     44                if (scroll_dist) {
     45                    hdr = scroll_dist;
     46                }
     47                else {
     48                    hdr = $('.hfc-sticky-header-on').height();
     49                }
     50                       
     51                mn = $(".hfc-sticky-header-on");
     52       
     53                $(window).scroll(function() {
     54                    if( $(this).scrollTop() > hdr ) {
     55                        mn.addClass(mns);
     56                        $('.hfc-sticky-header-on').css('background-color', backgroundcolor);
     57                            if (border_ed) {
     58                                $('.hfc-sticky-header-on').css('border-bottom-color', bordercolor);
     59                                $('.hfc-sticky-header-on').css('border-bottom-width', border_size);
     60                                $('.hfc-sticky-header-on').css('border-bottom-style', 'solid');             
     61                            }
     62                        }
     63                        else
     64                        {
     65                        mn.removeClass(mns);
     66                        $('.hfc-sticky-header-on').css('background-color', '');         
     67                            if (border_ed) {               
     68                                $('.hfc-sticky-header-on').css('border-bottom-color', '');
     69                                $('.hfc-sticky-header-on').css('border-bottom-width', '');             
     70                                $('.hfc-sticky-header-on').css('border-bottom-style', '');                             
     71                            }
     72                        }
     73                });
     74            }
     75        }       
     76    /* Sticky Menu Ends */         
     77}
     78
     79HFC_Header();                               
    280
    381});
    4 
  • header-footer-composer/trunk/public/js/hfc-navmenu.js

    r2146501 r2151875  
    11(function($) {
     2           
    23
    34  $.fn.menumaker = function(options) {
     
    6162})(jQuery);
    6263
    63 (function($){
    64          
    65 /*
    66 $(window).load(function () {
    67 
    68     var screenwidth = $(window).width();
    69    
    70     if (screenwidth <= 375) {
    71         var toggleheight = $('.hfc-navbar').height();
    72         var leftpull = screenwidth - 675;
    73         $(".hfc-nav-menu-top").css({"position":"absolute", "width": screenwidth, "left": leftpull, "top": toggleheight, "background-color": "#000000" });
    74     }
    75    
    76     if (screenwidth <= 768) {
    77         var toggleheight = $('.hfc-navbar').height();
    78         var leftpull = screenwidth - 1000;
    79         $(".hfc-nav-menu-top").css({"position":"absolute", "width": screenwidth, "left": leftpull, "top": toggleheight, "background-color": "#000000" });
    80     }   
    81 
    82 });
    83 */
    84          
     64(function($){     
     65     
    8566$(document).ready(function(){
    8667
Note: See TracChangeset for help on using the changeset viewer.