class
"mega-menu prevented" to specific menu item as trigger.
+3. Create an elementor section as your mega menu with class
and ID
.
+ - class
= mega-menu
+ - ID
= Use the label used in the WP menu trigger. E.g "Main Services" = "main-services".
+
+Notes: It might appear to be buggy when you don't have anything on page except the header & menu. It doesn't hide the menu but only "z-index: -1" which make it still hoverable if there are no other sections on the page to cover it.
+
+**Script**
+```
+// Mega Menu
+$("li.mega-menu").each(function(){
+ // Variable the menu label as selector
+ var menuClass = $(this).find("a")[0].childNodes[0].nodeValue.trim();
+ menuClass = menuClass.replace(/\s+/g, '-').toLowerCase();
+
+ $(this).hover(function() {
+ // Add active to menu trigger to preserved hovered state
+ $(this).find("a").addClass("active");
+ $("#"+menuClass).addClass("active");
+ }, function() {
+ $(this).find("a").removeClass("active");
+ $("#"+menuClass).removeClass("active");
+ });
+ // Preserve the hover on mega menu container
+ $("#"+menuClass).hover(function() {
+ $(this).addClass("active");
+ $("li.mega-menu a:contains("+menuClass+")").addClass("active");
+ }, function() {
+ $(this).removeClass("active");
+ $("li.mega-menu a:contains("+menuClass+")").removeClass("active");
+ });
+ //// Prevent going to URL on first click on Touch Devices
+ $(this).on("touch", function(e) {
+ if($(this).hasClass("prevented")) {
+ event.preventDefault();
+ $(this).removeClass("prevented");
+ } else {
+ $(this).addClass("prevented");
+ $(this).unbind("click");
+ }
+ });
+});
+```
+**Style**
+```
+section.mega-menu {
+ position: absolute;
+ top: 0;
+ width: 100%;
+ display: block;
+ opacity: 0;
+ transition: .3s !important;
+ z-index: -1;
+}
+section.mega-menu.active {
+ opacity: 1;
+ z-index: 10;
+}
+#menu-main li.mega-menu a:hover:before {
+ content: '';
+ height: 20px; //Height of the distance from to mega-menu
+ width: 300vw;
+ left: -100vw;
+ position: absolute;
+ top: 100%;
+}
+```
+
+### [READ MORE/READ LESS]
+
+**HTML Structure**
+```
+class
in the accordion.
+
+**Script**
+```
+// Elementor Accordion
+$(".active-hover .elementor-accordion-item").on("mouseenter click", function() {
+ $(this).find(".elementor-tab-title").addClass("elementor-active");
+ $(this).find(".elementor-tab-content").addClass("elementor-active");
+ $(this).find(".elementor-tab-content").stop().slideDown("slow");
+ // Slide off on others
+ $(this).siblings().find(".elementor-tab-title").removeClass("elementor-active");
+ $(this).siblings().find(".elementor-tab-content").removeClass("elementor-active");
+ $(this).siblings().find(".elementor-tab-content").stop().slideUp("slow");
+});
+```
+
+This code will reset the first child as active state.
+```
+// Reset to first child active
+$(".active-hover .elementor-accordion").on("mouseleave", function() {
+ $(this).find(".elementor-accordion-item:first-child .elementor-tab-title").addClass("elementor-active");
+ $(this).find(".elementor-accordion-item:first-child .elementor-tab-content").addClass("elementor-active");
+ $(this).find(".elementor-accordion-item:first-child .elementor-tab-content").stop().slideDown("slow");
+ // Slide off on others
+ $(this).find(".elementor-accordion-item:first-child").siblings().find(".elementor-tab-title").removeClass("elementor-active");
+ $(this).find(".elementor-accordion-item:first-child").siblings().find(".elementor-tab-content").removeClass("elementor-active");
+ $(this).find(".elementor-accordion-item:first-child").siblings().find(".elementor-tab-content").stop().slideUp("slow");
+});
+```
+
+# Functions
\ No newline at end of file
diff --git a/elementor-kit/content/page/28.json b/elementor-kit/content/page/28.json
new file mode 100644
index 00000000..db291f1c
--- /dev/null
+++ b/elementor-kit/content/page/28.json
@@ -0,0 +1,131 @@
+{
+ "content": [
+ {
+ "id": "94c6c5b",
+ "settings": {
+ "flex_direction": "column",
+ "flex_gap": {
+ "column": "",
+ "row": "",
+ "isLinked": true,
+ "unit": "px",
+ "size": null
+ }
+ },
+ "elements": [
+ {
+ "id": "74d9b259",
+ "settings": {
+ "editor": "Page title / H1
Page Headlines/ H2
Module Headlines/ H3
H4
H5
H6
Lead In Text
", + "__globals__": { + "typography_typography": "globals/typography?id=f261652" + } + }, + "elements": [], + "isInner": false, + "widgetType": "text-editor", + "elType": "widget" + }, + { + "id": "50222592", + "settings": { + "editor": "Paragraph Text
", + "__globals__": { + "typography_typography": "globals/typography?id=3ab9a6b" + } + }, + "elements": [], + "isInner": false, + "widgetType": "text-editor", + "elType": "widget" + }, + { + "id": "7ab7ba2c", + "settings": { + "text": "Button Text", + "typography_typography": "custom", + "typography_font_size_mobile": { + "unit": "px", + "size": 16, + "sizes": [] + }, + "typography_line_height_mobile": { + "unit": "em", + "size": 1.2, + "sizes": [] + }, + "__globals__": { "typography_typography": "" } + }, + "elements": [], + "isInner": false, + "widgetType": "button", + "elType": "widget" + } + ], + "isInner": false, + "elType": "container" + } + ], + "settings": { "template": "elementor_header_footer", "hide_title": "yes" }, + "metadata": [] +} diff --git a/elementor-kit/manifest.json b/elementor-kit/manifest.json new file mode 100644 index 00000000..3c94e456 --- /dev/null +++ b/elementor-kit/manifest.json @@ -0,0 +1,63 @@ +{ + "name": "", + "title": null, + "description": null, + "author": "cb-defaults", + "version": "2.0", + "elementor_version": "3.25.4", + "created": "2024-11-06 20:55:12", + "thumbnail": false, + "site": "https://cb-stage.com/default", + "site-settings": [ + "global-colors", + "global-typography", + "theme-style-typography", + "theme-style-buttons", + "theme-style-images", + "theme-style-form-fields", + "settings-background", + "settings-layout", + "settings-lightbox", + "settings-page-transitions", + "settings-custom-css", + "hello-settings-header", + "hello-settings-footer" + ], + "plugins": [ + { + "name": "Elementor", + "plugin": "elementor/elementor", + "pluginUri": "https://elementor.com/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash", + "version": "3.25.4" + }, + { + "name": "Classic Editor", + "plugin": "classic-editor/classic-editor", + "pluginUri": "https://wordpress.org/plugins/classic-editor/", + "version": "1.6.5" + }, + { + "name": "Elementor Pro", + "plugin": "elementor-pro/elementor-pro", + "pluginUri": "https://go.elementor.com/wp-dash-wp-plugins-author-uri/", + "version": "3.24.4" + } + ], + "templates": [], + "taxonomies": { "post": ["category"] }, + "content": { + "post": [], + "page": { + "28": { + "title": "Default Page", + "excerpt": "", + "doc_type": "wp-page", + "thumbnail": false, + "url": "https://cb-stage.com/default/default-page/", + "terms": [] + } + }, + "e-floating-buttons": [] + }, + "wp-content": { "post": ["1", "15"], "page": [], "nav_menu_item": [] } +} diff --git a/elementor-kit/site-settings.json b/elementor-kit/site-settings.json new file mode 100644 index 00000000..4a787fc9 --- /dev/null +++ b/elementor-kit/site-settings.json @@ -0,0 +1,267 @@ +{ + "content": [], + "settings": { + "template": "default", + "system_colors": [ + { "_id": "primary", "title": "Primary", "color": "#6EC1E4" }, + { "_id": "secondary", "title": "Secondary", "color": "#54595F" }, + { "_id": "text", "title": "Text", "color": "#7A7A7A" }, + { "_id": "accent", "title": "Accent", "color": "#61CE70" } + ], + "custom_colors": [ + { "_id": "361f22f", "title": "Black", "color": "#000000" }, + { "_id": "6e67bca", "title": "White", "color": "#FFFFFF" } + ], + "typography_enable_styleguide_preview": "yes", + "system_typography": [ + { + "_id": "primary", + "title": "Page Title / H1", + "typography_typography": "custom", + "typography_font_family": "Roboto", + "typography_font_size": { "unit": "px", "size": 60, "sizes": [] }, + "typography_line_height": { "unit": "em", "size": 1.6, "sizes": [] }, + "typography_font_size_tablet": { + "unit": "px", + "size": 50, + "sizes": [] + }, + "typography_font_size_mobile": { "unit": "px", "size": 40, "sizes": [] } + }, + { + "_id": "secondary", + "title": "Section Headlines / H2", + "typography_typography": "custom", + "typography_font_family": "Roboto Slab", + "typography_font_size": { "unit": "px", "size": 50, "sizes": [] }, + "typography_font_size_tablet": { + "unit": "px", + "size": 40, + "sizes": [] + }, + "typography_font_size_mobile": { + "unit": "px", + "size": 30, + "sizes": [] + }, + "typography_line_height_mobile": { + "unit": "em", + "size": 1.2, + "sizes": [] + }, + "typography_line_height": { "unit": "em", "size": 1.2, "sizes": [] } + }, + { + "_id": "text", + "title": "Module Headlines / H3", + "typography_typography": "custom", + "typography_font_family": "Roboto", + "typography_font_size": { "unit": "px", "size": 40, "sizes": [] }, + "typography_line_height": { "unit": "em", "size": 1.2, "sizes": [] }, + "typography_font_size_tablet": { + "unit": "px", + "size": 34, + "sizes": [] + }, + "typography_font_size_mobile": { "unit": "px", "size": 28, "sizes": [] } + }, + { + "_id": "accent", + "title": "H4", + "typography_typography": "custom", + "typography_font_family": "Roboto", + "typography_font_weight": "500", + "typography_font_size": { "unit": "px", "size": 34, "sizes": [] }, + "typography_line_height": { "unit": "em", "size": 1.2, "sizes": [] }, + "typography_font_size_tablet": { + "unit": "px", + "size": 28, + "sizes": [] + }, + "typography_font_size_mobile": { "unit": "px", "size": 24, "sizes": [] } + } + ], + "custom_typography": [ + { + "_id": "cb47f77", + "title": "H5", + "typography_typography": "custom", + "typography_font_size": { "unit": "px", "size": 28, "sizes": [] }, + "typography_font_size_tablet": { + "unit": "px", + "size": 24, + "sizes": [] + }, + "typography_font_size_mobile": { + "unit": "px", + "size": 20, + "sizes": [] + }, + "typography_line_height": { "unit": "em", "size": 1.2, "sizes": [] } + }, + { + "_id": "3e3c46a", + "title": "H6", + "typography_typography": "custom", + "typography_font_size": { "unit": "px", "size": 24, "sizes": [] }, + "typography_font_size_tablet": { + "unit": "px", + "size": 20, + "sizes": [] + }, + "typography_font_size_mobile": { + "unit": "px", + "size": 18, + "sizes": [] + }, + "typography_line_height": { "unit": "em", "size": 1.2, "sizes": [] } + }, + { + "_id": "f261652", + "title": "Lead In", + "typography_typography": "custom", + "typography_font_size": { "unit": "px", "size": 20, "sizes": [] }, + "typography_font_size_tablet": { + "unit": "px", + "size": 18, + "sizes": [] + }, + "typography_line_height": { "unit": "em", "size": 1.2, "sizes": [] } + }, + { + "_id": "98a2376", + "title": "Button Text", + "typography_typography": "custom", + "typography_font_size_mobile": { + "unit": "px", + "size": 16, + "sizes": [] + }, + "typography_line_height_mobile": { + "unit": "em", + "size": 1.2, + "sizes": [] + }, + "typography_font_size": { "unit": "px", "size": 16, "sizes": [] }, + "typography_line_height": { "unit": "em", "size": 1.2, "sizes": [] } + }, + { + "_id": "3ab9a6b", + "title": "Body Text / P / ULOL", + "typography_typography": "custom", + "typography_font_size": { "unit": "px", "size": 18, "sizes": [] }, + "typography_font_size_tablet": { + "unit": "px", + "size": 16, + "sizes": [] + }, + "typography_line_height": { "unit": "em", "size": 1.6, "sizes": [] } + } + ], + "default_generic_fonts": "Sans-serif", + "page_title_selector": "h1.entry-title", + "hello_footer_copyright_text": "All rights reserved", + "activeItemIndex": 1, + "__globals__": { + "body_typography_typography": "globals/typography?id=3ab9a6b", + "h1_typography_typography": "globals/typography?id=primary", + "h2_typography_typography": "globals/typography?id=secondary", + "h3_typography_typography": "globals/typography?id=text", + "h4_typography_typography": "globals/typography?id=accent", + "h5_typography_typography": "globals/typography?id=cb47f77", + "h6_typography_typography": "globals/typography?id=3e3c46a", + "button_typography_typography": "" + }, + "viewport_md": 769, + "viewport_lg": 1025, + "colors_enable_styleguide_preview": "yes", + "container_width": { "unit": "px", "size": 1442, "sizes": [] }, + "container_padding": { + "unit": "px", + "top": "150", + "right": "0", + "bottom": "150", + "left": "0", + "isLinked": false + }, + "container_padding_tablet": { + "unit": "px", + "top": "80", + "right": "0", + "bottom": "80", + "left": "0", + "isLinked": false + }, + "container_padding_mobile": { + "unit": "px", + "top": "60", + "right": "0", + "bottom": "60", + "left": "0", + "isLinked": false + }, + "viewport_mobile": 768, + "body_typography_typography": "custom", + "body_typography_font_size": { "unit": "px", "size": 18, "sizes": [] }, + "body_typography_line_height": { "unit": "em", "size": 1.6, "sizes": [] }, + "h1_typography_typography": "custom", + "h1_typography_font_family": "Roboto", + "h1_typography_font_size": { "unit": "px", "size": 60, "sizes": [] }, + "h1_typography_line_height": { "unit": "em", "size": 1.2, "sizes": [] }, + "h2_typography_typography": "custom", + "h2_typography_font_family": "Roboto Slab", + "h2_typography_font_size": { "unit": "px", "size": 50, "sizes": [] }, + "h3_typography_typography": "custom", + "h3_typography_font_family": "Roboto", + "h3_typography_font_size": { "unit": "px", "size": 40, "sizes": [] }, + "h3_typography_line_height": { "unit": "em", "size": 1.2, "sizes": [] }, + "h4_typography_typography": "custom", + "h4_typography_font_family": "Roboto", + "h4_typography_font_size": { "unit": "px", "size": 34, "sizes": [] }, + "h4_typography_font_weight": "500", + "h4_typography_line_height": { "unit": "em", "size": 1.2, "sizes": [] }, + "h5_typography_typography": "custom", + "h5_typography_font_size": { "unit": "px", "size": 28, "sizes": [] }, + "h5_typography_line_height": { "unit": "em", "size": 1.2, "sizes": [] }, + "h6_typography_typography": "custom", + "h6_typography_font_size": { "unit": "px", "size": 24, "sizes": [] }, + "h6_typography_line_height": { "unit": "em", "size": 1.2, "sizes": [] }, + "button_typography_typography": "custom", + "button_typography_font_size": { "unit": "px", "size": 16, "sizes": [] }, + "button_typography_font_weight": "400", + "button_typography_line_height": { "unit": "em", "size": 1.2, "sizes": [] }, + "body_typography_font_size_tablet": { + "unit": "px", + "size": 16, + "sizes": [] + }, + "h1_typography_font_size_tablet": { "unit": "px", "size": 50, "sizes": [] }, + "h1_typography_font_size_mobile": { "unit": "px", "size": 40, "sizes": [] }, + "h2_typography_font_size_tablet": { "unit": "px", "size": 40, "sizes": [] }, + "h2_typography_font_size_mobile": { "unit": "px", "size": 30, "sizes": [] }, + "h2_typography_line_height_mobile": { + "unit": "em", + "size": 1.2, + "sizes": [] + }, + "h3_typography_font_size_tablet": { "unit": "px", "size": 34, "sizes": [] }, + "h3_typography_font_size_mobile": { "unit": "px", "size": 28, "sizes": [] }, + "h4_typography_font_size_tablet": { "unit": "px", "size": 28, "sizes": [] }, + "h4_typography_font_size_mobile": { "unit": "px", "size": 24, "sizes": [] }, + "h5_typography_font_size_tablet": { "unit": "px", "size": 24, "sizes": [] }, + "h5_typography_font_size_mobile": { "unit": "px", "size": 20, "sizes": [] }, + "h6_typography_font_size_tablet": { "unit": "px", "size": 20, "sizes": [] }, + "h6_typography_font_size_mobile": { "unit": "px", "size": 18, "sizes": [] }, + "button_typography_font_size_mobile": { + "unit": "px", + "size": 16, + "sizes": [] + }, + "button_typography_line_height_mobile": { + "unit": "em", + "size": 1.2, + "sizes": [] + } + }, + "metadata": [] +} diff --git a/elementor-kit/taxonomies/category.json b/elementor-kit/taxonomies/category.json new file mode 100644 index 00000000..c45e9685 --- /dev/null +++ b/elementor-kit/taxonomies/category.json @@ -0,0 +1 @@ +[{"term_id":1,"name":"Uncategorized","slug":"uncategorized","taxonomy":"category","description":"","parent":0}] \ No newline at end of file diff --git a/elementor-kit/wp-content/nav_menu_item/nav_menu_item.xml b/elementor-kit/wp-content/nav_menu_item/nav_menu_item.xml new file mode 100644 index 00000000..6eef83fd --- /dev/null +++ b/elementor-kit/wp-content/nav_menu_item/nav_menu_item.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + +Welcome to WordPress. This is your first post. Edit or delete it, then start writing!
+]]>Welcome to WordPress. This is your first post. Edit or delete it, then start writing!
+]]>