Announcement

Collapse
No announcement yet.

Convert standard mobile menu in Sellerdeck to a 'Hamburger'

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Convert standard mobile menu in Sellerdeck to a 'Hamburger'

    The standard mobile menu in Sellerdeck is the word CATEGORIES with a +/-

    You can easily change his to the universally acceptable 'Hamburger' menu using the scripting from W3C at: https://www.w3schools.com/howto/howto_css_menu_icon.asp

    Click image for larger version

Name:	Screenshot_20200106-094510.jpg
Views:	52
Size:	72.8 KB
ID:	551887


    1. Copy and paste these styles into the very bottom of the current stylesheet:

    Code:
    /* Hamburger */
    .burgerbun {
        display: inline-block;
        cursor: pointer;
        margin-top: 1.8em;
         margin-left: .5em;
    }
    
    .bar1, .bar2, .bar3 {
        width: 35px;
        height: 3px;
        background-color: #222222;
        margin: 6px 0;
        transition: 0.4s;
    }
    
    .change .bar1 {
        -webkit-transform: rotate(-45deg) translate(-5px, 5px);
        transform: rotate(-45deg) translate(-5px, 5px);
    }
    
    .change .bar2 {opacity: 0;}
    
    .change .bar3 {
        -webkit-transform: rotate(45deg) translate(-8px, -8px);
        transform: rotate(45deg) translate(-8px, -8px);
    }
    @media (min-width:801px) {
    .undereight {display:none;}
    .overeight {display:inherit;}
    }
    @media (max-width:800px) {
    .overeight {display:none;}
    .undereight {display:inherit;}
    div.quick-search {
        float: right;
        max-width: 80%;
        margin-right: 8px;
    }
    .quick-search input[type="submit"], .quick-search input[type="submit"]:hover {
        margin: .5em;
    }
    .quick-search input[type="text"] {
        float: right;
        margin: 0.5em 0 0 0;
        padding: 0.3em;
        margin-right: 1em;
    }
    .quick-search form span.quick-search-button-wrapper {
        margin: 0;
        padding: 0;
        position: absolute;
        top: 1.3em;
        right: 2.7em;
    }
    .navigation-bar {
        border:1px solid #cccccc;
        box-shadow:inset 0px 0px 0px 1px #ffffff;
        background: #efefef; /* Old browsers */
        /* IE9 SVG, needs conditional override of 'filter' to 'none' */
        background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2VmZWZlZiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNkZmRmZGYiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
        background:-moz-linear-gradient(top, <actinic:variable name="CheckoutBG" /> 0%, <actinic:variable name="PaletteBG" /> 100%); /* FF3.6+ */
        background:-webkit-gradient(linear, left top, left bottom, color-stop(0%,<actinic:variable name="CheckoutBG" />), color-stop(100%,<actinic:variable name="PaletteBG" />)); /* Chrome,Safari4+ */
        background:-webkit-linear-gradient(top, <actinic:variable name="CheckoutBG" /> 0%,<actinic:variable name="PaletteBG" /> 100%); /* Chrome10+,Safari5.1+ */
        background:-o-linear-gradient(top, <actinic:variable name="CheckoutBG" /> 0%,<actinic:variable name="PaletteBG" /> 100%); /* Opera 11.10+ */
        background:-ms-linear-gradient(top, <actinic:variable name="CheckoutBG" /> 0%,<actinic:variable name="PaletteBG" /> 100%); /* IE10+ */
        background:linear-gradient(to bottom, <actinic:variable name="CheckoutBG" /> 0%,<actinic:variable name="PaletteBG" /> 100%); /* W3C */
        filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='<actinic:variable name="CheckoutBG" />', endColorstr='<actinic:variable name="PaletteBG" />',GradientType=0 ); /* IE6-8 */
    }
    #mega-menu {
        background: #fff;
    }
    }
    Add the class 'overeight' to the quicksearch div:

    Code:
    <div class="quick-search overeight">
    <form name="simplesearch" method="get" action="<actinic:variable name="OnlineScriptURL" value="Search Script URL" />"> etc etc etc
    Replace the Mini Nav layout with this:

    Code:
    <div class="miniNav">
        <actinic:block if="%3cactinic%3avariable%20name%3d%22Wiz4%5fSectionPageList%22%20%2f%3e%20%3d%3d%20%22Main%20Menu%20Bar%22%20OR%20%3cactinic%3avariable%20name%3d%22Wiz5%5fBrochureList%22%20%2f%3e%20%3d%3d%20%22Main%20Menu%20Bar%22" >
            <!--<p class="mainNav">Categories<a id="mainNav" href="#menu" onclick="$(this).text($(this).text() == '-' ? '+' : '-');">+</a></p>
            <p class="mainNav">Categories<a id="mainNav" href="#menu" onclick="$(this).text($(this).text() == '-' ? '+' : '-');">+</a></p>-->
            <nav class="mobile-nav" role="navigation">
            <a class="burgerbun" onclick="myBurger(this)" id="mainNav">
            <div class="bar1"></div>
            <div class="bar2"></div>
            <div class="bar3"></div>
            </a>
            
    <div class="quick-search">
    <form name="simplesearch" method="get" action="<actinic:variable name="OnlineScriptURL" value="Search Script URL" />">
    
        <actinic:block if="%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e">
            <!-- Hidden field when in trial mode -->
            <input type="hidden" name="SHOP" value="<Actinic:Variable Name="HiddenFields"/>" />
        </actinic:block>
    
        <input type="hidden" name="page" value="search" />
        <input type="text" name="SS" size="18" value="Quick Search" onfocus="this.value='';" class="quick-search-text" />&nbsp;
        <input type="hidden" name="PR" value="-1" />
        <input type="hidden" name="TB" value="O" />
        <span class="button-wrapper quick-search-button-wrapper">
            <input class="button quick-search-button" type="submit" name="ACTION" value="<actinic:variable name="QuickSearchButtonText" />" />
        </span>
    
    </form>
    </div>        
            
          </nav>
    <script>
    function myBurger(x) {
        x.classList.toggle("change");
    }
    </script>
    
        </actinic:block>
        <actinic:block if="%3cactinic%3avariable%20name%3d%22MobileLeftColumn%22%20%2f%3e%20%3d%3d%20%22Before%20Main%20Content%22">
            <actinic:block if="%3cactinic%3avariable%20name%3d%22Wiz6%5fQuickSearch%22%20%2f%3e%20%3d%3d%20%22Left%20Side%22">
                <p class="quickSearchTitle">Quick Search<a id="quickSearchTitle" href="#quickSearchLeft" onclick="$(this).text($(this).text() == '-' ? '+' : '-');">+</a></p>
            </actinic:block>
            <actinic:block if="%3cactinic%3avariable%20name%3d%22Wiz7%5fCartFunctions%22%20%2f%3e%20%3d%3d%20%22Left%20Side%22">
                <p class="shoppingCartSummaryTitle">Cart Summary<a id="shoppingCartSummaryTitle" href="#shoppingCartSummaryLeft" onclick="$(this).text($(this).text() == '-' ? '+' : '-');">+</a></p>
            </actinic:block>    
            <actinic:block if="%3cactinic%3avariable%20name%3d%22LEFTBARTITLE%22%20%2f%3e%20%21%3d%20%22%22%20%20OR%20%0d%3cactinic%3avariable%20name%3d%22LEFTBARTEXT%22%20%2f%3e%20%21%3d%20%22%22%20OR%0d%3cactinic%3avariable%20name%3d%22Wiz4_SectionPageList%22%20%2f%3e%20%3d%3d%20%22Left%20Side%22%20OR%0d%3cactinic%3avariable%20name%3d%22Wiz5%5fBrochureList%22%20%2f%3e%20%3d%3d%20%22Left%20Side%22" >
                <actinic:block if="%3cactinic%3avariable%20name%3d%22LEFTBARTITLE%22%20%2f%3e%20%21%3d%20%22%22%20%20OR%20%0d%3cactinic%3avariable%20name%3d%22LEFTBARTEXT%22%20%2f%3e%20%21%3d%20%22%22" >
                    <p class="infoBoxTitle"><actinic:variable formatting="h2" name="LEFTBARTITLE" /><a id="infoBoxTitle" href="#infoBox" onclick="$(this).text($(this).text() == '-' ? '+' : '-');">+</a></p>
                </actinic:block>
                <actinic:block if="%3cactinic%3avariable%20name%3d%22Wiz4_SectionPageList%22%20%2f%3e%20%3d%3d%20%22Left%20Side%22" >
                    <p class="storeSectionsTitle">Store Sections<a id="storeSectionsTitle" href="#storeSections" onclick="$(this).text($(this).text() == '-' ? '+' : '-');">+</a></p>
                </actinic:block>
                <actinic:block if="%3cactinic%3avariable%20name%3d%22Wiz5%5fBrochureList%22%20%2f%3e%20%3d%3d%20%22Left%20Side%22" >
                    <p class="informationTitle">Information<a id="informationTitle" href="#information" onclick="$(this).text($(this).text() == '-' ? '+' : '-');">+</a></p>
                </actinic:block>
            </actinic:block>
            <actinic:block if="%3cactinic%3avariable%20name%3d%22Wiz9%5fBestSellers%22%20%2f%3e%20%3d%3d%20%22Left%20Side%22%20AND%0d%3cactinic%3avariable%20name%3d%22BestsellersListIsEnabled%22%20%2f%3e%20AND%0d%3cactinic%3avariable%20name%3d%22BestSellerListLocation%22%20%2f%3e%20%21%3d%20%22Home%20Page%20Only%22" >
                <p class="bestSellerTitle">Best Sellers<a id="bestSellerTitle" href="#bestSellerLeft" onclick="$(this).text($(this).text() == '-' ? '+' : '-');">+</a></p>
            </actinic:block>
            <actinic:block if="%3cactinic%3avariable%20name%3d%22Wiz8%5fNewProducts%22%20%2f%3e%20%3d%3d%20%22Left%20Side%22%20AND%0d%3cactinic%3avariable%20name%3d%22NewProductsListIsEnabled%22%20%2f%3e%20AND%0d%3cactinic%3avariable%20name%3d%22NewProductsListLocation%22%20%2f%3e%20%21%3d%20%22Home%20Page%20Only%22" >
                <p class="newProductTitle">New Products<a id="newProductTitle" href="#newProductLeft" onclick="$(this).text($(this).text() == '-' ? '+' : '-');">+</a></p>
            </actinic:block>
            <actinic:block if="%3cactinic%3avariable%20name%3d%22CaptureCoupon%22%20%2f%3e" >
                <p class="couponFieldTitle">Coupon<a id="couponFieldTitle" href="#couponFieldLeft" onclick="$(this).text($(this).text() == '-' ? '+' : '-');">+</a></p>
            </actinic:block>
        </actinic:block>
        <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Section%22" >
            <actinic:block if="%3cactinic%3avariable%20name%3d%22IsFilteringEnabled%22%20%2f%3e">
                <p class="productFiltersTitle">Filter<a id="productFiltersTitle" href="#productFiltersLeft" onclick="$(this).text($(this).text() == '-' ? '+' : '-');">+</a></p>
            </actinic:block>
        </actinic:block>
    </div>
    See it working here:

    http://www.graphicz.solutions/hamburger/

    Thank you
    Jonathan Chappell
    Website Designer
    SellerDeck Website Designer
    Actinic to SellerDeck upgrades
    Graphicz Limited - www.graphicz.co.uk

    #2
    Nice. Thank you.
    Elysium:Online - Official Accredited SellerDeck Partner
    SellerDeck Design, Build, Hosting & Promotion
    Based in rural Northants

    Comment

    Working...
    X