Skip to content

Instantly share code, notes, and snippets.

@bryanrsebastian
Last active November 30, 2018 01:28
Show Gist options
  • Save bryanrsebastian/0415d379c8e879834cfc2429ba3cb572 to your computer and use it in GitHub Desktop.
Save bryanrsebastian/0415d379c8e879834cfc2429ba3cb572 to your computer and use it in GitHub Desktop.
/* Remove action bar while scrolling */
.et_fixed_nav #top-header {
position: absolute !important;
}
.et-fixed-header {
top: 0px !important;
}
/* Change the color of search icon */
#et_search_icon:hover,
.mobile_menu_bar_toggle:before {
color: #c64a2c;
}
/* Make the mobile menu sticky */
.et_mobile_menu {
border-top: 3px solid #c64a2c;
overflow-y: auto !important;
max-height: 70vh;
}
@media (max-width: 980px) {
.et_non_fixed_nav.et_transparent_nav #main-header,
.et_non_fixed_nav.et_transparent_nav #top-header,
.et_fixed_nav #main-header,
.et_fixed_nav #top-header {
position: fixed;
}
}
/* Redesign the copyright section in footer */
#footer-info {
float: none;
text-align: center;
}
#footer-info a:hover {
color: #c13b1a;
}
/**
* Change the RSS icon to IG icon
* simple trick to add IG social link in secondary menu
* */
.et-social-rss a.icon:before {
content: "\e09a";
}
/* Footer social media icon */
footer .zoom-social-icons-list li {
padding-left: 0 !important;
}
footer .zoom-social-icons-list li:before {
display: none;
}
/* Center the footer logo */
@media ( max-width: 767px ) {
#footer-widgets .footer-widget:first-child {
text-align: center;
}
#footer-widgets .footer-widget > div {
float: none;
}
#footer-widgets .footer-widget:first-child .widget_media_image img {
max-width: 200px !important;
}
}
/* Make the button inline */
.__welcome_message .et_pb_button_module_wrapper {
display: inline-block;
vertical-align: top;
}
/* === Begin: Set the divi slider height === */
/* Src: https://divibooster.com/changing-the-height-of-the-divi-slider/ */
/* Desktop */
.myslider .et_pb_slide .et_pb_container {
height: auto !important;
min-height: 550px !important;
}
/* Tablet */
@media only screen and (min-width: 768px) and (max-width: 980px) {
.myslider .et_pb_slide .et_pb_container {
height: auto !important;
min-height: 400px !important;
}
}
/* Phone */
@media only screen and (max-width: 767px) {
.myslider .et_pb_slide .et_pb_container {
height: auto !important;
min-height: 300px !important;
}
}
/* Handle padding */
.myslider .et_pb_slide {
padding-bottom: 0px !important;
}
.myslider div.et_pb_slide_description,
.myslider .et_pb_slider_fullwidth_off div.et_pb_slide_description {
padding-top: 1%;
padding-bottom: 1%;
}
/* === End: Set divi slider height === */
<style type="text/css">
#main-header .et_mobile_menu .menu-item-has-children > a {
background-color: transparent;
position: relative;
}
#main-header .et_mobile_menu .menu-item-has-children > a:after {
font-family: 'ETmodules';
text-align: center;
speak: none;
font-weight: normal;
font-variant: normal;
text-transform: none;
-webkit-font-smoothing: antialiased;
position: absolute;
}
#main-header .et_mobile_menu .menu-item-has-children > a:after {
font-size: 16px;
content: '\4c';
top: 13px;
right: 10px;
}
#main-header .et_mobile_menu .menu-item-has-children.visible > a:after {
content: '\4d';
}
#main-header .et_mobile_menu ul.sub-menu {
display: none !important;
visibility: hidden !important;
transition: all 1.5s ease-in-out;
}
#main-header .et_mobile_menu .visible > ul.sub-menu {
display: block !important;
visibility: visible !important;
}
</style>
<script type="text/javascript">
(function($) {
function setup_collapsible_submenus() {
var $menu = $('#mobile_menu'),
top_level_link = '#mobile_menu .menu-item-has-children > a';
$menu.find('a').each(function() {
$(this).off('click');
if ( $(this).is(top_level_link) ) {
$(this).attr('href', '#');
}
if ( ! $(this).siblings('.sub-menu').length ) {
$(this).on('click', function(event) {
$(this).parents('.mobile_nav').trigger('click');
});
} else {
$(this).on('click', function(event) {
event.preventDefault();
$(this).parent().toggleClass('visible');
});
}
});
}
$(window).load(function() {
setTimeout(function() {
setup_collapsible_submenus();
}, 700);
});
})(jQuery);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment