Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into shopping-cart
diff --git a/erpnext/shopping_cart/web_template/__init__.py b/erpnext/shopping_cart/web_template/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/shopping_cart/web_template/__init__.py
diff --git a/erpnext/shopping_cart/web_template/hero_slider/__init__.py b/erpnext/shopping_cart/web_template/hero_slider/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/shopping_cart/web_template/hero_slider/__init__.py
diff --git a/erpnext/shopping_cart/web_template/hero_slider/hero_slider.html b/erpnext/shopping_cart/web_template/hero_slider/hero_slider.html
new file mode 100644
index 0000000..3f0419e
--- /dev/null
+++ b/erpnext/shopping_cart/web_template/hero_slider/hero_slider.html
@@ -0,0 +1,112 @@
+{%- macro slide(image, title, subtitle, action, label, index, align="Left", theme="Dark") -%}
+{%- set align_class = resolve_class({
+ 'text-right': align == 'Right',
+ 'text-centre': align == 'Center',
+ 'text-left': align == 'Left',
+}) -%}
+
+{%- set heading_class = resolve_class({
+ 'text-white': theme == 'Dark',
+ '': theme == 'Light',
+}) -%}
+<div class="carousel-item {{ 'active' if index=='1' else ''}}" style="height: 450px;">
+ <img class="d-block h-100 w-100" style="object-fit: cover;" src="{{ image }}" alt="{{ title }}">
+ {%- if title or subtitle -%}
+ <div class="carousel-body container d-flex {{ align_class }}">
+ <div class="carousel-content align-self-center">
+ {%- if title -%}<h1 class="{{ heading_class }}">{{ title }}</h1>{%- endif -%}
+ {%- if subtitle -%}<p class="text-muted mt-2">{{ subtitle }}</p>{%- endif -%}
+ {%- if action -%}
+ <a href="{{ action }}" class="btn btn-primary mt-3">
+ {{ label }}
+ </a>
+ {%- endif -%}
+ </div>
+ </div>
+ {%- endif -%}
+</div>
+{%- endmacro -%}
+
+<div id="{{ slider_name }}" class="section-carousel carousel slide" data-ride="carousel">
+ {%- if show_indicators -%}
+ <ol class="carousel-indicators">
+ {%- for index in ['1', '2', '3', '4', '5'] -%}
+ {%- if values['slide_' + index + '_image'] -%}
+ <li data-target="#{{ slider_name }}" data-slide-to="{{ frappe.utils.cint(index) - 1 }}" class="{{ 'active' if index=='1' else ''}}"></li>
+ {%- endif -%}
+ {%- endfor -%}
+ </ol>
+ {%- endif -%}
+ <div id="{{ slider_name }}423243" class="carousel-inner">
+ {%- for index in ['1', '2', '3', '4', '5'] -%}
+ {%- set image = values['slide_' + index + '_image'] -%}
+ {%- set title = values['slide_' + index + '_title'] -%}
+ {%- set subtitle = values['slide_' + index + '_subtitle'] -%}
+ {%- set primary_action = values['slide_' + index + '_primary_action'] -%}
+ {%- set primary_action_label = values['slide_' + index + '_primary_action_label'] -%}
+ {%- set align = values['slide_' + index + '_content_align'] -%}
+ {%- set theme = values['slide_' + index + '_theme'] -%}
+
+ {%- if image -%}
+ {{ slide(image, title, subtitle, primary_action, primary_action_label, index, align, theme) }}
+ {%- endif -%}
+
+ {%- endfor -%}
+ </div>
+ {%- if show_controls -%}
+ <a class="carousel-control-prev" href="#{{ slider_name }}" role="button" data-slide="prev">
+ <div class="carousel-control">
+ <svg class="mr-1" width="20" height="20" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <path d="M11.625 3.75L6.375 9L11.625 14.25" stroke="#4C5A67" stroke-linecap="round" stroke-linejoin="round"/>
+ </svg>
+ </div>
+ <span class="sr-only">Previous</span>
+ </a>
+ <a class="carousel-control-next" href="#{{ slider_name }}" role="button" data-slide="next">
+ <div class="carousel-control">
+ <svg class="ml-1" width="20" height="20" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <path d="M6.375 14.25L11.625 9L6.375 3.75" stroke="#4C5A67" stroke-linecap="round" stroke-linejoin="round"/>
+ </svg>
+ </div>
+ <span class="sr-only">Next</span>
+ </a>
+ {%- endif -%}
+</div>
+
+<script type="text/javascript">
+ $('.carousel').carousel({
+ interval: false,
+ pause: "hover",
+ wrap: true
+ })
+</script>
+
+<style>
+ .carousel-control {
+ height: 42px;
+ width: 42px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ background: white;
+ box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.08), 0px 1px 2px 1px rgba(0, 0, 0, 0.06);
+ border-radius: 100px;
+ }
+
+ .carousel-control-prev,
+ .carousel-control-next {
+ opacity: 1;
+ }
+
+ .carousel-body {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ }
+
+ .carousel-content {
+ max-width: 400px;
+ }
+</style>
\ No newline at end of file
diff --git a/erpnext/shopping_cart/web_template/hero_slider/hero_slider.json b/erpnext/shopping_cart/web_template/hero_slider/hero_slider.json
new file mode 100644
index 0000000..496fc79
--- /dev/null
+++ b/erpnext/shopping_cart/web_template/hero_slider/hero_slider.json
@@ -0,0 +1,334 @@
+{
+ "__unsaved": 1,
+ "creation": "2020-11-17 15:21:51.207221",
+ "docstatus": 0,
+ "doctype": "Web Template",
+ "fields": [
+ {
+ "fieldname": "slider_name",
+ "fieldtype": "Data",
+ "label": "Slider Name",
+ "reqd": 1
+ },
+ {
+ "default": "1",
+ "fieldname": "show_indicators",
+ "fieldtype": "Check",
+ "label": "Show Indicators",
+ "reqd": 0
+ },
+ {
+ "default": "1",
+ "fieldname": "show_controls",
+ "fieldtype": "Check",
+ "label": "Show Controls",
+ "reqd": 0
+ },
+ {
+ "fieldname": "slide_1",
+ "fieldtype": "Section Break",
+ "label": "Slide 1",
+ "reqd": 0
+ },
+ {
+ "fieldname": "slide_1_image",
+ "fieldtype": "Attach Image",
+ "label": "Image",
+ "reqd": 0
+ },
+ {
+ "fieldname": "slide_1_title",
+ "fieldtype": "Data",
+ "label": "Title",
+ "reqd": 0
+ },
+ {
+ "fieldname": "slide_1_subtitle",
+ "fieldtype": "Small Text",
+ "label": "Subtitle",
+ "reqd": 0
+ },
+ {
+ "fieldname": "slide_1_primary_action_label",
+ "fieldtype": "Data",
+ "label": "Primary Action Label",
+ "reqd": 0
+ },
+ {
+ "fieldname": "slide_1_primary_action",
+ "fieldtype": "Data",
+ "label": "Primary Action",
+ "reqd": 0
+ },
+ {
+ "__unsaved": 1,
+ "fieldname": "slide_1_content_align",
+ "fieldtype": "Select",
+ "label": "Content Align",
+ "options": "Left\nCentre\nRight",
+ "reqd": 0
+ },
+ {
+ "__unsaved": 1,
+ "fieldname": "slide_1_theme",
+ "fieldtype": "Select",
+ "label": "Slide Theme",
+ "options": "Dark\nLight",
+ "reqd": 0
+ },
+ {
+ "fieldname": "slide_2",
+ "fieldtype": "Section Break",
+ "label": "Slide 2",
+ "reqd": 0
+ },
+ {
+ "fieldname": "slide_2_image",
+ "fieldtype": "Attach Image",
+ "label": "Image ",
+ "reqd": 0
+ },
+ {
+ "fieldname": "slide_2_title",
+ "fieldtype": "Data",
+ "label": "Title ",
+ "reqd": 0
+ },
+ {
+ "fieldname": "slide_2_subtitle",
+ "fieldtype": "Small Text",
+ "label": "Subtitle ",
+ "reqd": 0
+ },
+ {
+ "fieldname": "slide_2_primary_action_label",
+ "fieldtype": "Data",
+ "label": "Primary Action Label ",
+ "reqd": 0
+ },
+ {
+ "fieldname": "slide_2_primary_action",
+ "fieldtype": "Data",
+ "label": "Primary Action ",
+ "reqd": 0
+ },
+ {
+ "__unsaved": 1,
+ "default": "Left",
+ "fieldname": "slide_2_content_align",
+ "fieldtype": "Select",
+ "label": "Content Align",
+ "options": "Left\nCentre\nRight",
+ "reqd": 0
+ },
+ {
+ "__unsaved": 1,
+ "fieldname": "slide_2_theme",
+ "fieldtype": "Select",
+ "label": "Slide Theme",
+ "options": "Dark\nLight",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "slide_3",
+ "fieldtype": "Section Break",
+ "label": "Slide 3",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "slide_3_image",
+ "fieldtype": "Attach Image",
+ "label": "Image",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "slide_3_title",
+ "fieldtype": "Data",
+ "label": "Title",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "slide_3_subtitle",
+ "fieldtype": "Small Text",
+ "label": "Subtitle",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "slide_3_primary_action_label",
+ "fieldtype": "Data",
+ "label": "Primary Action Label",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "slide_3_primary_action",
+ "fieldtype": "Data",
+ "label": "Primary Action",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "slide_3_content_align",
+ "fieldtype": "Select",
+ "label": "Content Align",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "slide_3_theme",
+ "fieldtype": "Select",
+ "label": "Slide Theme",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "slide_4",
+ "fieldtype": "Section Break",
+ "label": "Slide 4",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "slide_4_image",
+ "fieldtype": "Attach Image",
+ "label": "Image",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "slide_4_title",
+ "fieldtype": "Data",
+ "label": "Title",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "slide_4_subtitle",
+ "fieldtype": "Small Text",
+ "label": "Subtitle",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "slide_4_primary_action_label",
+ "fieldtype": "Data",
+ "label": "Primary Action Label",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "slide_4_primary_action",
+ "fieldtype": "Data",
+ "label": "Primary Action",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "slide_4_content_align",
+ "fieldtype": "Select",
+ "label": "Content Align",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "slide_4_theme",
+ "fieldtype": "Select",
+ "label": "Slide Theme",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "slide_5",
+ "fieldtype": "Section Break",
+ "label": "Slide 5",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "slide_5_image",
+ "fieldtype": "Attach Image",
+ "label": "Image",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "slide_5_title",
+ "fieldtype": "Data",
+ "label": "Title",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "slide_5_subtitle",
+ "fieldtype": "Small Text",
+ "label": "Subtitle",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "slide_5_primary_action_label",
+ "fieldtype": "Data",
+ "label": "Primary Action Label",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "slide_5_primary_action",
+ "fieldtype": "Data",
+ "label": "Primary Action",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "slide_5_content_align",
+ "fieldtype": "Select",
+ "label": "Content Align",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "slide_5_theme",
+ "fieldtype": "Select",
+ "label": "Slide Theme",
+ "reqd": 0
+ }
+ ],
+ "idx": 0,
+ "modified": "2020-11-18 17:09:31.323198",
+ "modified_by": "Administrator",
+ "module": "Shopping Cart",
+ "name": "Hero Slider",
+ "owner": "Administrator",
+ "standard": 1,
+ "template": "",
+ "type": "Section"
+}
\ No newline at end of file
diff --git a/erpnext/shopping_cart/web_template/item_card_group/__init__.py b/erpnext/shopping_cart/web_template/item_card_group/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/shopping_cart/web_template/item_card_group/__init__.py
diff --git a/erpnext/shopping_cart/web_template/item_card_group/item_card_group.html b/erpnext/shopping_cart/web_template/item_card_group/item_card_group.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/shopping_cart/web_template/item_card_group/item_card_group.html
diff --git a/erpnext/shopping_cart/web_template/item_card_group/item_card_group.json b/erpnext/shopping_cart/web_template/item_card_group/item_card_group.json
new file mode 100644
index 0000000..f1a70a9
--- /dev/null
+++ b/erpnext/shopping_cart/web_template/item_card_group/item_card_group.json
@@ -0,0 +1,312 @@
+{
+ "__unsaved": 1,
+ "creation": "2020-11-17 15:35:05.285322",
+ "docstatus": 0,
+ "doctype": "Web Template",
+ "fields": [
+ {
+ "fieldname": "title",
+ "fieldtype": "Data",
+ "label": "Title",
+ "reqd": 1
+ },
+ {
+ "fieldname": "subtitle",
+ "fieldtype": "Data",
+ "label": "Subtitle",
+ "reqd": 0
+ },
+ {
+ "fieldname": "card_1",
+ "fieldtype": "Section Break",
+ "label": "Card 1",
+ "reqd": 0
+ },
+ {
+ "fieldname": "card_1_item",
+ "fieldtype": "Link",
+ "label": "Item",
+ "options": "Item",
+ "reqd": 0
+ },
+ {
+ "fieldname": "card_1_featured",
+ "fieldtype": "Check",
+ "label": "Featured",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_2",
+ "fieldtype": "Section Break",
+ "label": "Card 2",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_2_item",
+ "fieldtype": "Link",
+ "label": "Item",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_2_featured",
+ "fieldtype": "Check",
+ "label": "Featured",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_3",
+ "fieldtype": "Section Break",
+ "label": "Card 3",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_3_item",
+ "fieldtype": "Link",
+ "label": "Item",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_3_featured",
+ "fieldtype": "Check",
+ "label": "Featured",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_4",
+ "fieldtype": "Section Break",
+ "label": "Card 4",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_4_item",
+ "fieldtype": "Link",
+ "label": "Item",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_4_featured",
+ "fieldtype": "Check",
+ "label": "Featured",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_5",
+ "fieldtype": "Section Break",
+ "label": "Card 5",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_5_item",
+ "fieldtype": "Link",
+ "label": "Item",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_5_featured",
+ "fieldtype": "Check",
+ "label": "Featured",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_6",
+ "fieldtype": "Section Break",
+ "label": "Card 6",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_6_item",
+ "fieldtype": "Link",
+ "label": "Item",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_6_featured",
+ "fieldtype": "Check",
+ "label": "Featured",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_7",
+ "fieldtype": "Section Break",
+ "label": "Card 7",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_7_item",
+ "fieldtype": "Link",
+ "label": "Item",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_7_featured",
+ "fieldtype": "Check",
+ "label": "Featured",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_8",
+ "fieldtype": "Section Break",
+ "label": "Card 8",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_8_item",
+ "fieldtype": "Link",
+ "label": "Item",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_8_featured",
+ "fieldtype": "Check",
+ "label": "Featured",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_9",
+ "fieldtype": "Section Break",
+ "label": "Card 9",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_9_item",
+ "fieldtype": "Link",
+ "label": "Item",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_9_featured",
+ "fieldtype": "Check",
+ "label": "Featured",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_10",
+ "fieldtype": "Section Break",
+ "label": "Card 10",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_10_item",
+ "fieldtype": "Link",
+ "label": "Item",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_10_featured",
+ "fieldtype": "Check",
+ "label": "Featured",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_11",
+ "fieldtype": "Section Break",
+ "label": "Card 11",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_11_item",
+ "fieldtype": "Link",
+ "label": "Item",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_11_featured",
+ "fieldtype": "Check",
+ "label": "Featured",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_12",
+ "fieldtype": "Section Break",
+ "label": "Card 12",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_12_item",
+ "fieldtype": "Link",
+ "label": "Item",
+ "reqd": 0
+ },
+ {
+ "__islocal": 1,
+ "__unsaved": 1,
+ "fieldname": "card_12_featured",
+ "fieldtype": "Check",
+ "label": "Featured",
+ "reqd": 0
+ }
+ ],
+ "idx": 0,
+ "modified": "2020-11-17 16:37:46.325181",
+ "modified_by": "Administrator",
+ "module": "Shopping Cart",
+ "name": "Item Card Group",
+ "owner": "Administrator",
+ "standard": 1,
+ "template": "",
+ "type": "Section"
+}
\ No newline at end of file
diff --git a/erpnext/shopping_cart/web_template/product_card/__init__.py b/erpnext/shopping_cart/web_template/product_card/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/shopping_cart/web_template/product_card/__init__.py
diff --git a/erpnext/shopping_cart/web_template/product_card/product_card.html b/erpnext/shopping_cart/web_template/product_card/product_card.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/shopping_cart/web_template/product_card/product_card.html
diff --git a/erpnext/shopping_cart/web_template/product_card/product_card.json b/erpnext/shopping_cart/web_template/product_card/product_card.json
new file mode 100644
index 0000000..1059c1b
--- /dev/null
+++ b/erpnext/shopping_cart/web_template/product_card/product_card.json
@@ -0,0 +1,33 @@
+{
+ "__unsaved": 1,
+ "creation": "2020-11-17 15:28:47.809342",
+ "docstatus": 0,
+ "doctype": "Web Template",
+ "fields": [
+ {
+ "__unsaved": 1,
+ "fieldname": "item",
+ "fieldtype": "Link",
+ "label": "Item",
+ "options": "Item",
+ "reqd": 0
+ },
+ {
+ "__unsaved": 1,
+ "fieldname": "featured",
+ "fieldtype": "Check",
+ "label": "Featured",
+ "options": "",
+ "reqd": 0
+ }
+ ],
+ "idx": 0,
+ "modified": "2020-11-17 15:33:34.982515",
+ "modified_by": "Administrator",
+ "module": "Shopping Cart",
+ "name": "Product Card",
+ "owner": "Administrator",
+ "standard": 1,
+ "template": "",
+ "type": "Component"
+}
\ No newline at end of file
diff --git a/erpnext/shopping_cart/web_template/product_category_cards/__init__.py b/erpnext/shopping_cart/web_template/product_category_cards/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/shopping_cart/web_template/product_category_cards/__init__.py
diff --git a/erpnext/shopping_cart/web_template/product_category_cards/product_category_cards.html b/erpnext/shopping_cart/web_template/product_category_cards/product_category_cards.html
new file mode 100644
index 0000000..88ba7fd
--- /dev/null
+++ b/erpnext/shopping_cart/web_template/product_category_cards/product_category_cards.html
@@ -0,0 +1,53 @@
+{%- macro card(title, image, url, text_primary=False) -%}
+{%- set align_class = resolve_class({
+ 'text-right': text_primary,
+ 'text-centre': align == 'Center',
+ 'text-left': align == 'Left',
+}) -%}
+<div class="card h-100">
+ {% if image %}
+ <img class="card-img-top" src="{{ image }}" alt="{{ title }}">
+ {% endif %}
+ <div class="card-body text-center text-muted small">
+ {{ title or '' }}
+ </div>
+ <a href="{{ url or '#' }}" class="stretched-link"></a>
+</div>
+{%- endmacro -%}
+
+<div class="section-with-cards">
+ {%- if title -%}
+ <h2 class="section-title">{{ title }}</h2>
+ {%- endif -%}
+ {%- if subtitle -%}
+ <p class="section-description">{{ subtitle }}</p>
+ {%- endif -%}
+ <!-- {%- set card_size = card_size or 'Small' -%} -->
+ <div class="{{ resolve_class({'mt-6': title}) }}">
+ <div class="card-grid">
+ {%- for index in ['1', '2', '3', '4', '5', '6', '7', '8'] -%}
+ {%- set category = values['category_' + index] -%}
+ {%- if category -%}
+ {%- set category = frappe.get_doc("Item Group", category) -%}
+ {{ card(category.name, category.image, category.route) }}
+ {%- endif -%}
+ {%- endfor -%}
+ </div>
+ </div>
+</div>
+
+<style>
+ .card-grid {
+ display: grid;
+ grid-gap: 15px;
+ grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));;
+ }
+
+ .card {
+ border: none;
+ }
+
+ .card:hover {
+ box-shadow: 0px 16px 45px 6px rgba(0, 0, 0, 0.08), 0px 8px 10px -10px rgba(0, 0, 0, 0.04);
+ }
+</style>
diff --git a/erpnext/shopping_cart/web_template/product_category_cards/product_category_cards.json b/erpnext/shopping_cart/web_template/product_category_cards/product_category_cards.json
new file mode 100644
index 0000000..ba5f63b
--- /dev/null
+++ b/erpnext/shopping_cart/web_template/product_category_cards/product_category_cards.json
@@ -0,0 +1,85 @@
+{
+ "__unsaved": 1,
+ "creation": "2020-11-17 15:25:50.855934",
+ "docstatus": 0,
+ "doctype": "Web Template",
+ "fields": [
+ {
+ "fieldname": "title",
+ "fieldtype": "Data",
+ "label": "Title",
+ "reqd": 1
+ },
+ {
+ "fieldname": "subtitle",
+ "fieldtype": "Data",
+ "label": "Subtitle",
+ "reqd": 0
+ },
+ {
+ "fieldname": "category_1",
+ "fieldtype": "Link",
+ "label": "Item Group",
+ "options": "Item Group",
+ "reqd": 0
+ },
+ {
+ "fieldname": "category_2",
+ "fieldtype": "Link",
+ "label": "Item Group",
+ "options": "Item Group",
+ "reqd": 0
+ },
+ {
+ "fieldname": "category_3",
+ "fieldtype": "Link",
+ "label": "Item Group",
+ "options": "Item Group",
+ "reqd": 0
+ },
+ {
+ "fieldname": "category_4",
+ "fieldtype": "Link",
+ "label": "Item Group",
+ "options": "Item Group",
+ "reqd": 0
+ },
+ {
+ "fieldname": "category_5",
+ "fieldtype": "Link",
+ "label": "Item Group",
+ "options": "Item Group",
+ "reqd": 0
+ },
+ {
+ "fieldname": "category_6",
+ "fieldtype": "Link",
+ "label": "Item Group",
+ "options": "Item Group",
+ "reqd": 0
+ },
+ {
+ "fieldname": "category_7",
+ "fieldtype": "Link",
+ "label": "Item Group",
+ "options": "Item Group",
+ "reqd": 0
+ },
+ {
+ "fieldname": "category_8",
+ "fieldtype": "Link",
+ "label": "Item Group",
+ "options": "Item Group",
+ "reqd": 0
+ }
+ ],
+ "idx": 0,
+ "modified": "2020-11-18 17:26:28.726260",
+ "modified_by": "Administrator",
+ "module": "Shopping Cart",
+ "name": "Product Category Cards",
+ "owner": "Administrator",
+ "standard": 1,
+ "template": "",
+ "type": "Section"
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js
index 9e09411..2d5ab5a 100644
--- a/erpnext/stock/doctype/item/item.js
+++ b/erpnext/stock/doctype/item/item.js
@@ -81,7 +81,7 @@
}, __('Create'));
}
- frm.page.set_inner_btn_group_as_primary(__('Create'));
+ // frm.page.set_inner_btn_group_as_primary(__('Create'));
}
if (frm.doc.variant_of) {
frm.set_intro(__('This Item is a Variant of {0} (Template).',