diff --git a/theme_eco_refine/README.rst b/theme_eco_refine/README.rst new file mode 100755 index 000000000..0e9d36775 --- /dev/null +++ b/theme_eco_refine/README.rst @@ -0,0 +1,47 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +Theme Eco Refine +================ +* Theme Eco Refine module provide attractive and unique front end theme mainly suitable for eCommerce website + +Installation +============ +- www.odoo.com/documentation/16.0/setup/install.html +- Install our custom addon + +License +------- +GNU AFFERO GENERAL PUBLIC LICENSE Version 3 (AGPL v3) +( https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: + (V16) Vishnu P, Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com + +Further information +=================== +HTML Description: ``__ + diff --git a/theme_eco_refine/__init__.py b/theme_eco_refine/__init__.py new file mode 100755 index 000000000..52885d9e9 --- /dev/null +++ b/theme_eco_refine/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Vishnu P(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import controllers +from . import models diff --git a/theme_eco_refine/__manifest__.py b/theme_eco_refine/__manifest__.py new file mode 100755 index 000000000..b87ab5e00 --- /dev/null +++ b/theme_eco_refine/__manifest__.py @@ -0,0 +1,78 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Vishnu P(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': 'Theme Eco Refine', + 'version': '16.0.1.0.0', + 'category': 'Theme/eCommerce', + 'summary': 'Theme Eco Refine', + 'description': 'Theme Eco Refine module provide attractive and unique ' + 'front end theme mainly suitable for eCommerce website', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + "depends": ['base', 'web', 'website', 'website_livechat', + 'website_sale_wishlist', 'website_blog', ], + 'data': [ + 'data/theme_eco_refine_menus.xml', + 'views/product_template_views.xml', + 'views/website_blog_templates.xml', + 'views/templates.xml', + 'static/src/xml/homepage_templates.xml', + 'views/snippets.xml', + 'views/about_us_templates.xml' + ], + 'assets': { + 'web.assets_frontend': [ + 'https://code.jquery.com/jquery-3.2.1.slim.min.js', + 'https://cdn.jsdelivr.net/npm/popper.js@1.12.9/dist/umd/popper.min.js', + 'https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/js/bootstrap.min.js', + 'theme_eco_refine/static/src/css/contact_us.css', + 'theme_eco_refine/static/src/css/product.css', + 'theme_eco_refine/static/src/css/home.css', + 'theme_eco_refine/static/src/css/blog.css', + 'theme_eco_refine/static/src/js/product_specification.js', + 'theme_eco_refine/static/src/css/about_us.css', + 'theme_eco_refine/static/src/js/about_us.js', + 'theme_eco_refine/static/src/js/owl.carousel.js', + 'theme_eco_refine/static/src/js/owl.carousel.min.js', + 'theme_eco_refine/static/src/css/owl.carousel.css', + 'theme_eco_refine/static/src/js/collection_snippet.js', + 'theme_eco_refine/static/src/js/refurbished_carousel_snippet.js', + 'theme_eco_refine/static/src/js/best_seller_snippet.js', + 'theme_eco_refine/static/src/xml/best_seller_snippet_templates.xml', + 'theme_eco_refine/static/src/js/new_arrival_snippet.js', + 'theme_eco_refine/static/src/xml/new_arrival_snippet_templates.xml', + 'theme_eco_refine/static/src/js/customer_response.js', + 'theme_eco_refine/static/src/js/top_rated_products_snippet.js', + 'theme_eco_refine/static/src/xml/top_rated_product_snippet_templates.xml', + ], + }, + 'images': [ + 'static/description/banner.png', + 'static/description/theme_screenshot.jpg', + ], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, + } diff --git a/theme_eco_refine/controllers/__init__.py b/theme_eco_refine/controllers/__init__.py new file mode 100755 index 000000000..b0e14bed8 --- /dev/null +++ b/theme_eco_refine/controllers/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Author: Vishnu P(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import about_us +from . import dynamic_snippets +from . import theme_eco_refine diff --git a/theme_eco_refine/controllers/about_us.py b/theme_eco_refine/controllers/about_us.py new file mode 100755 index 000000000..b31d9bd75 --- /dev/null +++ b/theme_eco_refine/controllers/about_us.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Author: Vishnu P(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +""" About us page controller """ +from odoo import http + + +class EcoRefine(http.Controller): + """Class used to define function which renders appropriate template.""" + @http.route('/about_us', type='http', website=True, auth='public') + def eco_refine_about_us(self): + """Renders template about_us page.""" + return http.request.render('theme_eco_refine.about_us', {}) diff --git a/theme_eco_refine/controllers/dynamic_snippets.py b/theme_eco_refine/controllers/dynamic_snippets.py new file mode 100755 index 000000000..522722b9b --- /dev/null +++ b/theme_eco_refine/controllers/dynamic_snippets.py @@ -0,0 +1,132 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Vishnu P(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +import time +from odoo import http +from odoo.http import request + + +class DynamicSnippets(http.Controller): + """This class is for the getting values for dynamic product snippets + """ + @http.route('/top_selling_products', type='json', auth='public') + def top_selling(self): + """Function for getting the current website,top sold products and + its categories. + Return + products-most sold products + unique_categories-categories of all products + current_website-the current website for checking products or + """ + current_website = request.env['website'].sudo().get_current_website().id + public_categ_id = request.env[ + 'product.public.category'].sudo().search_read([], ['name', + 'website_id']) + products = [] + public_categories = [] + for category in public_categ_id: + products_search_read = request.env['product.template'].with_user( + 1).search_read( + [('is_published', '=', True), + ('public_categ_ids.id', '=', category['id'])], + ['name', 'image_1920', 'public_categ_ids', 'website_id', + 'sales_count', 'list_price'], order='sales_count') + for product in products_search_read: + if product['sales_count'] != 0: + products.append(product) + public_categories.append(category) + unique_categories = [dict(categories) for categories in + {tuple(sorted(record.items())) for record in + public_categories}] + products = sorted(products, key=lambda i: i['sales_count'], + reverse=True) + unique_id = "pc-%d" % int(time.time() * 1000) + return products, unique_categories, current_website, unique_id + + @http.route('/new_arrival_products', type='json', auth='public') + def products_new_arrivals(self): + """Function for getting the current website,new arrival products and + its categories. + Return + products-most sold products + unique_categories-categories of all products + current_website-the current website for checking products or + """ + current_website = request.env[ + 'website'].sudo().get_current_website().id + public_categ_id = request.env[ + 'product.public.category'].sudo().search_read([], ['name', + 'website_id']) + products = [] + public_categories = [] + for category in public_categ_id: + products_search_read = request.env['product.template'].with_user( + 1).search_read( + [('is_published', '=', True), + ('public_categ_ids.id', '=', category['id'])], + ['name', 'public_categ_ids', 'website_id', + 'sales_count', 'image_1920', 'list_price', 'create_date'], + order='create_date desc') + for product in products_search_read: + products.append(product) + public_categories.append(category) + unique_id = "uc-%d" % int(time.time() * 1000) + unique_categories = [dict(categories) for categories in + {tuple(sorted(record.items())) for record in + public_categories}] + products = sorted(products, key=lambda i: i['create_date'], + reverse=True) + return products, unique_categories, current_website, unique_id + + @http.route('/top_rated_products', type='json', auth='public') + def top_rated_products(self): + """Function for getting the current website,rated products and + its categories. + Return + products-most sold products + unique_categories-categories of all products + current_website-the current website for checking products or + """ + current_website = request.env[ + 'website'].sudo().get_current_website().id + public_categ_id = request.env[ + 'product.public.category'].sudo().search_read([], ['name', + 'website_id']) + rated_products = request.env['rating.rating'].sudo().search_read( + [('res_model', '=', 'product.template')], + ['res_id', 'res_name', ], order='rating desc') + products = [] + public_categories = [] + for category in rated_products: + products_search_read = request.env['product.template'].with_user( + 1).search_read( + [('is_published', '=', True), + ('id', '=', category['res_id'])], + ['name', 'public_categ_ids', 'website_id', + 'sales_count', 'image_1920', 'list_price', 'create_date'],) + for product in products_search_read: + if not product in products: + products.append(product) + public_categories.append(category) + unique_categories = [dict(categories) for categories in + {tuple(sorted(record.items())) for record in + public_categories}] + return products, unique_categories, current_website, public_categ_id diff --git a/theme_eco_refine/controllers/theme_eco_refine.py b/theme_eco_refine/controllers/theme_eco_refine.py new file mode 100755 index 000000000..a2178ad5e --- /dev/null +++ b/theme_eco_refine/controllers/theme_eco_refine.py @@ -0,0 +1,204 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Vishnu P(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +import babel.dates +import itertools +import pytz +from odoo.http import request +from odoo.tools import lazy +from odoo import http, fields +from werkzeug.exceptions import NotFound +from collections import OrderedDict +from odoo.tools import sql +from odoo.tools.misc import get_lang +from odoo.addons.website.controllers.main import QueryURL +from odoo.addons.http_routing.models.ir_http import slug, unslug +from odoo.addons.website_sale.controllers.main import TableCompute, WebsiteSale + + +class WebsiteShop(WebsiteSale): + """Shop Controller + super the controller to set 3 columns of products in + website shop instead of 4 + """ + @http.route(['/shop/config/website'], type='json', auth='user') + def _change_website_config(self, **options): + """ + Function for shop configuration + """ + if not request.env.user.has_group( + 'website.group_website_restricted_editor'): + raise NotFound() + current_website = request.env['website'].get_current_website() + # Restrict options we can write to. + writable_fields = { + 'shop_ppg', 'shop_ppr', 'shop_default_sort', + 'product_page_image_layout', 'product_page_image_width', + 'product_page_grid_columns', 'product_page_image_spacing' + } + # Default ppg to 1. + if 'ppg' in options and not options['ppg']: + options['ppg'] = 1 + if 'product_page_grid_columns' in options: + options['product_page_grid_columns'] = int( + options['product_page_grid_columns']) + write_vals = {k: v for k, v in options.items() if k in writable_fields} + if write_vals: + current_website.write(write_vals) + current_website.select = True + + @http.route() + def shop(self, page=0, category=None, search='', min_price=0.0, + max_price=0.0, ppg=False, **post): + """Function for website shop""" + current_website = request.env['website'].get_current_website() + if not current_website.select: + ppg = 12 + ppr = 3 + res = super(WebsiteShop, self).shop(page=page, category=category, + search=search, + min_price=min_price, + max_price=max_price, ppg=ppg, + **post) + products = res.qcontext['products'] + res.qcontext.update({ + 'bins': lazy( + lambda: TableCompute().process(products, ppg, ppr)), + 'ppr': ppr, + }) + return res + else: + ppg = current_website.shop_ppg + ppr = current_website.shop_ppr + res = super(WebsiteShop, self).shop(page=page, category=category, + search=search, + min_price=min_price, + max_price=max_price, ppg=ppg, + **post) + products = res.qcontext['products'] + res.qcontext.update({ + 'bins': lazy( + lambda: TableCompute().process(products, ppg, ppr)), + 'ppr': ppr, + }) + current_website.select = True + return res + + +class WebsiteBlog(http.Controller): + """ + Class for Website blog, super the controller to get the previous blog id + """ + def nav_list(self, blog=None): + dom = blog and [('blog_id', '=', blog.id)] or [] + if not request.env.user.has_group('website.group_website_designer'): + dom += [('post_date', '<=', fields.Datetime.now())] + groups = request.env['blog.post']._read_group_raw( + dom, + ['name', 'post_date'], + groupby=["post_date"], orderby="post_date desc") + for group in groups: + (r, label) = group['post_date'] + start, end = r.split('/') + group['post_date'] = label + group['date_begin'] = start + group['date_end'] = end + locale = get_lang(request.env).code + start = pytz.UTC.localize(fields.Datetime.from_string(start)) + tzinfo = pytz.timezone(request.context.get('tz', 'utc') or 'utc') + group['month'] = babel.dates.format_datetime(start, format='MMMM', + tzinfo=tzinfo, + locale=locale) + group['year'] = babel.dates.format_datetime(start, format='yyyy', + tzinfo=tzinfo, + locale=locale) + return OrderedDict((year, [m for m in months]) for year, months in + itertools.groupby(groups, lambda g: g['year'])) + + @http.route([ + '''/blog// + + + + + About us + /about_us + + 59 + + + diff --git a/theme_eco_refine/doc/RELEASE_NOTES.md b/theme_eco_refine/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..60c175e4e --- /dev/null +++ b/theme_eco_refine/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 27.09.2023 +#### Version 16.0.1.0.0 +#### ADD +- Initial commit for Theme Eco Refine diff --git a/theme_eco_refine/models/__init__.py b/theme_eco_refine/models/__init__.py new file mode 100755 index 000000000..d19fd5204 --- /dev/null +++ b/theme_eco_refine/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Vishnu P(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +""" Import models""" +from . import product_template +from . import website diff --git a/theme_eco_refine/models/product_template.py b/theme_eco_refine/models/product_template.py new file mode 100755 index 000000000..8bc9706b9 --- /dev/null +++ b/theme_eco_refine/models/product_template.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Vishnu P(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +""" Inherit product template add product specs and details""" +from odoo import fields, models + + +class ProductTemplate(models.Model): + """Inherit model product template and fields for + product specification and product details""" + _inherit = 'product.template' + + product_spec = fields.Text( + string='Product Specification', translate=True, + help="The Specification of the Product.") + product_detail = fields.Text( + string='Product Detail', translate=True, + help="The Details of the Product ") diff --git a/theme_eco_refine/models/website.py b/theme_eco_refine/models/website.py new file mode 100755 index 000000000..55af8771d --- /dev/null +++ b/theme_eco_refine/models/website.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Vishnu P(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +""" Inherit model website""" +from odoo import fields, models + + +class Website(models.Model): + """ Inherit website to add boolean field to set + 3 product columns in shop instead of 4""" + _inherit = 'website' + + select = fields.Boolean(default=False, string='Select', + help='Set default 3 columns of products in shop') diff --git a/theme_eco_refine/static/description/banner.png b/theme_eco_refine/static/description/banner.png new file mode 100644 index 000000000..80d3fa4ec Binary files /dev/null and b/theme_eco_refine/static/description/banner.png differ diff --git a/theme_eco_refine/static/description/icon.png b/theme_eco_refine/static/description/icon.png new file mode 100644 index 000000000..39ebc10dd Binary files /dev/null and b/theme_eco_refine/static/description/icon.png differ diff --git a/theme_eco_refine/static/description/images/About-us-mobile-temp.png b/theme_eco_refine/static/description/images/About-us-mobile-temp.png new file mode 100644 index 000000000..24da73800 Binary files /dev/null and b/theme_eco_refine/static/description/images/About-us-mobile-temp.png differ diff --git a/theme_eco_refine/static/description/images/Edu.png b/theme_eco_refine/static/description/images/Edu.png new file mode 100644 index 000000000..158b36a16 Binary files /dev/null and b/theme_eco_refine/static/description/images/Edu.png differ diff --git a/theme_eco_refine/static/description/images/FAQ.png b/theme_eco_refine/static/description/images/FAQ.png new file mode 100644 index 000000000..547db3e04 Binary files /dev/null and b/theme_eco_refine/static/description/images/FAQ.png differ diff --git a/theme_eco_refine/static/description/images/POS.png b/theme_eco_refine/static/description/images/POS.png new file mode 100644 index 000000000..3c7f1cfe9 Binary files /dev/null and b/theme_eco_refine/static/description/images/POS.png differ diff --git a/theme_eco_refine/static/description/images/Production.png b/theme_eco_refine/static/description/images/Production.png new file mode 100644 index 000000000..e88dcd0d6 Binary files /dev/null and b/theme_eco_refine/static/description/images/Production.png differ diff --git a/theme_eco_refine/static/description/images/Shop-responsive.png b/theme_eco_refine/static/description/images/Shop-responsive.png new file mode 100644 index 000000000..6fa44537a Binary files /dev/null and b/theme_eco_refine/static/description/images/Shop-responsive.png differ diff --git a/theme_eco_refine/static/description/images/Top_rated_products.png b/theme_eco_refine/static/description/images/Top_rated_products.png new file mode 100644 index 000000000..6820df620 Binary files /dev/null and b/theme_eco_refine/static/description/images/Top_rated_products.png differ diff --git a/theme_eco_refine/static/description/images/about_us_1.png b/theme_eco_refine/static/description/images/about_us_1.png new file mode 100644 index 000000000..773a14ea9 Binary files /dev/null and b/theme_eco_refine/static/description/images/about_us_1.png differ diff --git a/theme_eco_refine/static/description/images/about_us_2.png b/theme_eco_refine/static/description/images/about_us_2.png new file mode 100644 index 000000000..298250337 Binary files /dev/null and b/theme_eco_refine/static/description/images/about_us_2.png differ diff --git a/theme_eco_refine/static/description/images/arrow-black.png b/theme_eco_refine/static/description/images/arrow-black.png new file mode 100644 index 000000000..3fd6da801 Binary files /dev/null and b/theme_eco_refine/static/description/images/arrow-black.png differ diff --git a/theme_eco_refine/static/description/images/banner-img.png b/theme_eco_refine/static/description/images/banner-img.png new file mode 100644 index 000000000..42454d15b Binary files /dev/null and b/theme_eco_refine/static/description/images/banner-img.png differ diff --git a/theme_eco_refine/static/description/images/banner_1.png b/theme_eco_refine/static/description/images/banner_1.png new file mode 100644 index 000000000..176ce6628 Binary files /dev/null and b/theme_eco_refine/static/description/images/banner_1.png differ diff --git a/theme_eco_refine/static/description/images/banner_2.png b/theme_eco_refine/static/description/images/banner_2.png new file mode 100644 index 000000000..0ee9609d0 Binary files /dev/null and b/theme_eco_refine/static/description/images/banner_2.png differ diff --git a/theme_eco_refine/static/description/images/best_seller.png b/theme_eco_refine/static/description/images/best_seller.png new file mode 100644 index 000000000..0cce72420 Binary files /dev/null and b/theme_eco_refine/static/description/images/best_seller.png differ diff --git a/theme_eco_refine/static/description/images/blog-responsive-design.png b/theme_eco_refine/static/description/images/blog-responsive-design.png new file mode 100644 index 000000000..ba13a6590 Binary files /dev/null and b/theme_eco_refine/static/description/images/blog-responsive-design.png differ diff --git a/theme_eco_refine/static/description/images/blog.png b/theme_eco_refine/static/description/images/blog.png new file mode 100644 index 000000000..b038c3375 Binary files /dev/null and b/theme_eco_refine/static/description/images/blog.png differ diff --git a/theme_eco_refine/static/description/images/collections.png b/theme_eco_refine/static/description/images/collections.png new file mode 100644 index 000000000..466109ad6 Binary files /dev/null and b/theme_eco_refine/static/description/images/collections.png differ diff --git a/theme_eco_refine/static/description/images/contact_us.png b/theme_eco_refine/static/description/images/contact_us.png new file mode 100644 index 000000000..d91dfb056 Binary files /dev/null and b/theme_eco_refine/static/description/images/contact_us.png differ diff --git a/theme_eco_refine/static/description/images/customer_response.png b/theme_eco_refine/static/description/images/customer_response.png new file mode 100644 index 000000000..7404dbd64 Binary files /dev/null and b/theme_eco_refine/static/description/images/customer_response.png differ diff --git a/theme_eco_refine/static/description/images/home-mobile.png b/theme_eco_refine/static/description/images/home-mobile.png new file mode 100644 index 000000000..d66ac582d Binary files /dev/null and b/theme_eco_refine/static/description/images/home-mobile.png differ diff --git a/theme_eco_refine/static/description/images/home_2.png b/theme_eco_refine/static/description/images/home_2.png new file mode 100644 index 000000000..223afa14d Binary files /dev/null and b/theme_eco_refine/static/description/images/home_2.png differ diff --git a/theme_eco_refine/static/description/images/icon-Compatibility-with-plugins.png b/theme_eco_refine/static/description/images/icon-Compatibility-with-plugins.png new file mode 100644 index 000000000..2c0c4015e Binary files /dev/null and b/theme_eco_refine/static/description/images/icon-Compatibility-with-plugins.png differ diff --git a/theme_eco_refine/static/description/images/icon-Fast-loading-times.png b/theme_eco_refine/static/description/images/icon-Fast-loading-times.png new file mode 100644 index 000000000..d758dea65 Binary files /dev/null and b/theme_eco_refine/static/description/images/icon-Fast-loading-times.png differ diff --git a/theme_eco_refine/static/description/images/icon-One-Click-Installation.png b/theme_eco_refine/static/description/images/icon-One-Click-Installation.png new file mode 100644 index 000000000..189cc7cbb Binary files /dev/null and b/theme_eco_refine/static/description/images/icon-One-Click-Installation.png differ diff --git a/theme_eco_refine/static/description/images/icon-Responsive-design.png b/theme_eco_refine/static/description/images/icon-Responsive-design.png new file mode 100644 index 000000000..963329a0a Binary files /dev/null and b/theme_eco_refine/static/description/images/icon-Responsive-design.png differ diff --git a/theme_eco_refine/static/description/images/icon-Up-to-date-development.png b/theme_eco_refine/static/description/images/icon-Up-to-date-development.png new file mode 100644 index 000000000..892a490e8 Binary files /dev/null and b/theme_eco_refine/static/description/images/icon-Up-to-date-development.png differ diff --git a/theme_eco_refine/static/description/images/icon-design.png b/theme_eco_refine/static/description/images/icon-design.png new file mode 100644 index 000000000..bd578f6d1 Binary files /dev/null and b/theme_eco_refine/static/description/images/icon-design.png differ diff --git a/theme_eco_refine/static/description/images/logo-cybro.png b/theme_eco_refine/static/description/images/logo-cybro.png new file mode 100644 index 000000000..ecf9b0134 Binary files /dev/null and b/theme_eco_refine/static/description/images/logo-cybro.png differ diff --git a/theme_eco_refine/static/description/images/new_arrival.png b/theme_eco_refine/static/description/images/new_arrival.png new file mode 100644 index 000000000..2c619c5b1 Binary files /dev/null and b/theme_eco_refine/static/description/images/new_arrival.png differ diff --git a/theme_eco_refine/static/description/images/odoo-consultency.png b/theme_eco_refine/static/description/images/odoo-consultency.png new file mode 100644 index 000000000..bf2d21531 Binary files /dev/null and b/theme_eco_refine/static/description/images/odoo-consultency.png differ diff --git a/theme_eco_refine/static/description/images/odoo-customization.png b/theme_eco_refine/static/description/images/odoo-customization.png new file mode 100644 index 000000000..a51a84de4 Binary files /dev/null and b/theme_eco_refine/static/description/images/odoo-customization.png differ diff --git a/theme_eco_refine/static/description/images/odoo-developer.png b/theme_eco_refine/static/description/images/odoo-developer.png new file mode 100644 index 000000000..b2272be9e Binary files /dev/null and b/theme_eco_refine/static/description/images/odoo-developer.png differ diff --git a/theme_eco_refine/static/description/images/odoo-implement.png b/theme_eco_refine/static/description/images/odoo-implement.png new file mode 100644 index 000000000..ab975c139 Binary files /dev/null and b/theme_eco_refine/static/description/images/odoo-implement.png differ diff --git a/theme_eco_refine/static/description/images/odoo-intergration.png b/theme_eco_refine/static/description/images/odoo-intergration.png new file mode 100644 index 000000000..82b73a193 Binary files /dev/null and b/theme_eco_refine/static/description/images/odoo-intergration.png differ diff --git a/theme_eco_refine/static/description/images/odoo-licencing.png b/theme_eco_refine/static/description/images/odoo-licencing.png new file mode 100644 index 000000000..fe24f14c4 Binary files /dev/null and b/theme_eco_refine/static/description/images/odoo-licencing.png differ diff --git a/theme_eco_refine/static/description/images/odoo-logo.png b/theme_eco_refine/static/description/images/odoo-logo.png new file mode 100644 index 000000000..36960c38b Binary files /dev/null and b/theme_eco_refine/static/description/images/odoo-logo.png differ diff --git a/theme_eco_refine/static/description/images/odoo-migration.png b/theme_eco_refine/static/description/images/odoo-migration.png new file mode 100644 index 000000000..03ac43d05 Binary files /dev/null and b/theme_eco_refine/static/description/images/odoo-migration.png differ diff --git a/theme_eco_refine/static/description/images/odoo-support.png b/theme_eco_refine/static/description/images/odoo-support.png new file mode 100644 index 000000000..6d481032c Binary files /dev/null and b/theme_eco_refine/static/description/images/odoo-support.png differ diff --git a/theme_eco_refine/static/description/images/screen-shot-01.png b/theme_eco_refine/static/description/images/screen-shot-01.png new file mode 100644 index 000000000..b08ce4069 Binary files /dev/null and b/theme_eco_refine/static/description/images/screen-shot-01.png differ diff --git a/theme_eco_refine/static/description/images/shop.png b/theme_eco_refine/static/description/images/shop.png new file mode 100644 index 000000000..4819500ab Binary files /dev/null and b/theme_eco_refine/static/description/images/shop.png differ diff --git a/theme_eco_refine/static/description/images/single_product.png b/theme_eco_refine/static/description/images/single_product.png new file mode 100644 index 000000000..903672d2d Binary files /dev/null and b/theme_eco_refine/static/description/images/single_product.png differ diff --git a/theme_eco_refine/static/description/images/trading.png b/theme_eco_refine/static/description/images/trading.png new file mode 100644 index 000000000..9d99bc55b Binary files /dev/null and b/theme_eco_refine/static/description/images/trading.png differ diff --git a/theme_eco_refine/static/description/index.html b/theme_eco_refine/static/description/index.html new file mode 100644 index 000000000..4f1911b9c --- /dev/null +++ b/theme_eco_refine/static/description/index.html @@ -0,0 +1,1428 @@ + + + + odoo + + + + + + + + + + + +
+ +
+ + +
+ + +
+ +
+ +
+ +
+ + +
+ + + + + + + + +
+ + +
+ + +
+ +
+ + + +
+ + +
+ + +
+ + +
+ + +
+ + + + +
+ +
+ +
+ +
+ + + +
+ + +
+ + + + +
+ + +
+ +
+ +
+ +

+ ECO REFINE

+
+
+ +
+ +
+ +
    +
  • Website Design
  • +
  • UI/UX
  • +
  • Snippets
  • + + + + +
+ + +
+ + +
+ + +
+ + +
+ + + +
+ +
+ +
+
+ +

Theme
+ + Eco Refine
+ + +

+ + +
+ + +
+ +

Theme Eco Refine was created by Cybrosys Technology + Solutions. This theme makes the website more unique and attractive through its style and + custom-designed snippets, mainly suitable for eCommerce websites.

+ +

Provides Structural snippets like Collections, + Subscribe, Choose , Cards, Banner and Dynamic content snippets like Asked Questions, Best Seller + Products, Most Rated Products, New Arrivals

+ + +
+ +
+ +
+ + + + +
+ + +
+ + +
+ + +
+ + +
+ + + +
+ +
+ +
+ +
+ +

Key features

+
+ +
+ + +
+ +
+ +
+ + + Design + +
+

Unique and Attractive custom-designed + snippets.

+ +
+ + +
+
+ +
+ +
+ + + Fast loading times + +
+

This theme loads all of its features + more quickly than other designs. +

+ +
+ + +
+ + +
+ +
+ +
+ + + Responsive design + +
+

Different resolution devices can be + used by users to watch websites. +

+ +
+ + +
+ + +
+ + +
+ +
+ + + One Click Installation + +
+

This mode is significantly easier than + others because Odoo makes One Click Installation feasible. +

+ +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+ +
+ +

Main + page

+
+
+ +
+
+ +
    +
  • Home
  • +
  • Shop
  • +
  • Blog
  • +
  • About us
  • +
  • Contact us
  • + + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+ + +
+ +
+ + + + +
+ + +
+ + +
+ +
+ + + + +
+ + +
+ + +
+ +
+ +
+ + + +
+ + +
+ +
+ +
+ +

Mobile Responsive Design

+
+
+ +
+
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+ + + + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+ +
+ +

About us page

+
+
+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+ + + + +
+ + +
+ + +
+ +
+ + + + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+ +
+ +

Mobile Responsive Design

+
+
+ +
+ +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+ +
+ +
+ + + + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+ +
+ +

Shop

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + +
+ + +
+ + +
+ + +
+ +
+ +
+ +
+ + + + +
+ + +
+ + +
+ + +
+ + +
+ +
+ + +
+ +
+ +
+ +

Mobile Responsive Design

+
+
+ +
+ +
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+ +
+ +
+ + +
+ + + + +
+ + +
+ + +
+ + +
+ +
+ + +
+ + +
+ +
+ +
+ +

Blog Page

+
+
+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + +
+ +
+ +
+ +
+ +
+ + +
+ + + + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+ +
+

Mobile Responsive Design

+
+
+ +
+ +
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+ +
+ + +
+ + +
+ + + + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+ +
+ +

Contact us Page

+
+
+ +
+ + + + + + + + + + + + + + + +
+ + +
+ + +
+ + +
+ +
+ +
+ + +
+ + +
+ + + + +
+ + +
+ + +
+ + +
+ + +
+ + +
+
+
+
+

Structural Snippets

+
+
+
+
+
    +
  • Collections
  • +
  • Customer Response +
  • +
  • Frequently Asked Questions
  • +
  • + Banner +
  • +
+
+
+
+
+ +
+
+
+
+

Collections

+
+
+
+
+
+
+
+
+ +
+
+
+
+ + +
+
+
+
+

Customer Response

+
+
+
+
+
+
+
+
+ +
+
+
+
+ + +
+
+
+
+

Frequently Asked Questions

+
+
+
+
+
+
+
+
+ +
+
+
+
+ + +
+
+
+
+

Banner

+
+
+
+
+
+
+
+
+ +
+ +
+ +
+
+
+
+ + +
+
+
+
+

Dynamic Content Snippets

+
+
+
+
+
    +
  • Best Seller +
  • +
  • Top Rated Products
  • +
  • New Arrivals
  • + +
+
+
+
+
+ +
+
+
+
+

Best Seller

+
+
+
+
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+

Top Rated Products

+
+
+
+
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+

New Arrivals

+
+
+
+
+
+
+
+
+ +
+
+
+
+ + +
+ + +
+ +
+ +
+

Our Services


+
View services offered + by + us +
+ + +
+ + +
+ +
+ + +

Odoo
Customization

+ +
+ + +
+ + +
+ +
+ + +

Odoo
Implementation

+ +
+ + +
+ +
+ +
+ + +

Odoo
Support

+ +
+ + +
+ +
+ +
+ + +

Hire
Odoo Developer

+ +
+ + +
+ + +
+ +
+ + +

Odoo
Integration

+ +
+ + +
+ +
+ +
+ + +

Odoo
Migration

+ +
+ + +
+
+ +
+ + +

Odoo
Consultancy

+ +
+ + +
+ + +
+ +
+ + +

Odoo
Implementation

+ +
+ + +
+ +
+ +
+ + +

Odoo
Licensing + Consultancy

+ +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+ +
+

Our Industries


+
Get Insight in our + odoo + knowledge and our marked foot print in industries +
+ + +
+ + +
+ +
+ + +

Trading

+

Easily procure and sell + your products

+
+ + +
+ + +
+ +
+ + +

E-commerce & Website

+

Mobile friendly, awe- + inspiring product pages

+ +
+ + +
+ +
+ +
+ + +

POS

+

Easy configuration and + convivial experience

+ +
+ + +
+ +
+ +
+ + +

Education

+

A platform for educational + management

+ +
+ + +
+ + +
+ +
+ + +

Manufacturing

+

Plan, track and schedule + your operations

+
+ + +
+ +
+ +
+ + +

Manufacturing

+

Plan, track and schedule + your operations

+
+ + +
+
+ +
+ + +

Service Management

+

Keep track of services + and invoice

+
+ + +
+ + +
+ +
+ + +

Resturant

+

Run your bar or restaurant + methodically

+
+ + +
+ +
+ +
+ + +

Hotel management

+

An all-inclusive hotel + management application

+
+ + +
+ + +
+ + +
+ + +
+ + +
+ + + + + + + diff --git a/theme_eco_refine/static/description/theme_screenshot.jpg b/theme_eco_refine/static/description/theme_screenshot.jpg new file mode 100644 index 000000000..1a8b4a2a2 Binary files /dev/null and b/theme_eco_refine/static/description/theme_screenshot.jpg differ diff --git a/theme_eco_refine/static/src/css/about_us.css b/theme_eco_refine/static/src/css/about_us.css new file mode 100755 index 000000000..edc8b74f2 --- /dev/null +++ b/theme_eco_refine/static/src/css/about_us.css @@ -0,0 +1,711 @@ +.ref-abt-bg { + background: (linear-gradient(180deg, rgba(20, 108, 148, 0.6) 0%, #FFFFFF 100%), url('../images/about-hero-banner.png')); + background-size: cover; +} +.ref-about-container { + display: flex; + align-items: center; +} +.ref-about-container:last-child { + margin-bottom: 5rem; +} +.ref-about-content { + padding: 10px; + align-items: center; +} +.rf-about-img { + width: 450px; +} +.ref-about-content img { + width: 100%; + height: auto; +} +.ref-about-content_txt { + color: $dark-grey; + font-weight: 500; + font-size: 18px; + margin-top: 2rem; + line-height: 32px; +} +.ref-about-content { + h2 { + font-weight: 600; + line-height: 2.2rem; + } +} +.ref-feature__container { + display: grid; + grid-template-columns: repeat(3, 1fr); + grid-gap: 30px; + padding: 50px 0px; +} +.ref-feature__container-box { + padding: 30px; + border-radius: 4px; + cursor: pointer; +} +.ref-feature__container-box:hover { + background: $primary-color; +} +.ref-feature__container-box:hover span { + color: #fff; +} +.ref-feature__container-box:hover .ref-feature-box_img img { + filter: invert(100%); +} +.ref-feature__container-box:hover p { + color: #A9A9A9; +} +.ref-feature__container-box span { + font-weight: 600; + display: block; +} +.ref-feature-box_img { + width: 36px; + height: 36px; + margin-bottom: 0.6rem; +} +.ref-feature-box_img img { + width: 100%; + height: auto; +} +.ref-feature__container-box p { + color: $dark-grey; + line-height: 32px; + margin-top: 0.8rem; +} +#ref-about-history { + padding: 50px 0; +} +.ref-abt-button { + width: 20px; + height: 20px; + background-color: $primary-color; + border-radius: 50%; + margin: 30px; + border: 3px solid #fff; + box-shadow: (0px 0px 9px rgba(0, 0, 0, 0.25)); +} +.button-text { + display: block; + text-align: center; + position: absolute; + left: 0; + width: 100%; + padding: 5px 0; + color: $dark-grey; + font-size: 12px; +} +.owl-carousel-abt .owl-item { + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + margin-bottom: 200px; +} +.ref-abt-button:before { + content: ""; + position: absolute; + left: 0; + top: 50%; + width: 100%; + height: 6px; + background-color: #0D5272; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); + z-index: -1; +} +.button-text { + display: block; + text-align: center; + margin-top: 15px; + color: $dark-grey; + font-weight: 600; + font-size: 16px; +} +.ref-abt-button:hover .ref-abt-button__content { + display: block; + opacity: 1; +} +.ref-abt-button.active .ref-abt-button__content { + display: block; + opacity: 1; +} +.ref-abt_container { + position: relative; +} +.custom-nav-owl { + position: absolute; + width: 100%; + display: flex; + justify-content: space-between; + top: 28px; +} +.re-abt-nav i { + font-size: 12px; +} +.ref-abt-button__content { + p { + color: $dark-grey; + font-size: 1rem; + } +} + +.ref-abt_mob { + display: none; + flex-direction: column; + justify-content: space-between; + height: 600px; + margin: 50px 0; +} +.ref-abt_mob .ref-mob-btn:before { + content: ''; + width: 50%; + background-color: $primary-color; + height: 150px; + position: absolute; + left: 4px; + border-radius: 50px; + z-index: -1; +} +.ref-mob-btn:hover .ref-abt-button__mobcontent{ + display: block; + opacity: 1; +} +.ref-mob-btn:hover .button-mob-text { + display: none; +} +.ref-abt-button__mobcontent { + width: 500px; + margin-left: 24px; + display: none; + opacity: 0; + transition: opacity 0.3s ease-in-out; +} +.ref-abt-button__mobcontent.show { + display: block; + opacity: 1; +} +.button-mob-text { + display: block; + width: max-content; + color: $dark-grey; + font-weight: 500; + font-size: 1rem; + margin-left: 24px; +} +.hidden { + display: none; +} + +//media@query..... +@media(max-width:$breakpoint-lg) { + .owl-carousel-abt .owl-item { + margin-bottom: 240px; + } +} +@media(max-width:$breakpoint-md) { + .rf-about-img { + width: 360px; + } + .owl-carousel-abt .owl-item { + margin-bottom: 260px; + } + .ref-abt-button__content { + p { + color: $dark-grey; + font-size: 0.9rem; + + } + } +} +@media(max-width:$breakpoint-sm) { + #ref-about-history { + padding-bottom: 100px; + } + .ref-about-container { + flex-direction: column; + } + .ref-about-container:last-child { + flex-direction: column-reverse; + } + .ref-about-content { + flex-basis: 100%; + } + .ref-feature__container { + grid-template-columns: repeat(2, 1fr); + } + .ref-abt_mob { + height: 525px; + } + .ref-abt_mob { + display: flex; + } + .ref-abt_container { + display: none; + } +} +@media(max-width:$breakpoint-xs) { + .ref-about-content h2 { + font-size: 1.3rem; + } + .ref-about-content_txt { + font-size: 16px; + margin-top: 0rem; + line-height: 30px; + } + .ref-about-content img { + width: 100%; + height: 180px; +} + .ref-feature__container { + -ms-grid-columns: 1fr 30px 1fr; + grid-template-columns: repeat(1, 1fr); + } + .ref-abt-button__mobcontent { + width: 300px; + font-size: 12px; + } + .ref-feature__container { + grid-gap: 0px; + } + .ref-abt_mob { + height: 500px; + margin-bottom: 100px; + } +}.ref-arrival-content { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; +} +.ref-centerhead__underline { + position: relative; + padding: 0px; + margin: 1rem 0; +} +.ref-centerhead__underline::after { + content: ""; + position: absolute; + width: 80%; + height: 3px; + background-color: #000; + left: 10%; + bottom: 0; + border-radius: 50px; +} +.ref-abt-button { + width: 20px; + height: 20px; + background-color: $primary-color; + border-radius: 50%; + margin: 30px; + border: 3px solid #fff; + box-shadow: (0px 0px 9px rgba(0, 0, 0, 0.25)); +} +.ref-abt-button { + width: 20px; + height: 20px; + background-color: #0D5272; + border-radius: 50%; + margin: 30px; + border: 3px solid #fff; + -webkit-box-shadow: 0px 0px 9px rgb(0 0 0 / 25%); + box-shadow: 0px 0px 9px rgb(0 0 0 / 25%); +} +.re-abt-nav { + width: 22px; + height: 22px; + border-radius: 50px; + background: #0D5272; + border: none; + outline: none; + color: #fff; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + cursor: pointer; + z-index: 888; +} +.ref-abt_mob .ref-mob-btn { + position: relative; + width: 20px; + height: 20px; + background-color: #0D5272; + border-radius: 50%; + cursor: pointer; + border: 3px solid #fff; + -webkit-box-shadow: 0px 0px 9px rgb(0 0 0 / 25%); + box-shadow: 0px 0px 9px rgb(0 0 0 / 25%); +} +.ref-abt-button__content { + display: none; + position: absolute; + top: 57px; + left: 50%; + -webkit-transform: translateX(-50%); + transform: translateX(-50%); + background-color: #EAF8FF; + padding: 20px; + width: 100%; + text-align: center; + opacity: 0; + -webkit-transition: opacity 0.3s ease-in-out; + transition: opacity 0.3s ease-in-out; +} +.ref-abt-button.active .ref-abt-button__content { + display: block; + opacity: 1; +} +.re-abt-nav i { + font-size: 12px; +} +.fa-solid, .fas { + font-weight: 900; +} +.ref-about-container { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} +.ref-about-container:last-child { + margin-bottom: 5rem; +} +.ref-about-content { + padding: 10px; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} +.rf-about-img { + width: 450px; +} +.ref-about-content img { + width: 100%; + height: auto; +} +.ref-about-content_txt { + color: #6F6969; + font-weight: 500; + font-size: 18px; + margin-top: 2rem; + line-height: 32px; +} +.ref-about-content h2 { + font-weight: 600; + line-height: 2.2rem; +} +.ref-feature__container { + display: -ms-grid; + display: grid; + -ms-grid-columns: 1fr 30px 1fr 30px 1fr; + grid-template-columns: repeat(3, 1fr); + grid-gap: 30px; + padding: 50px 0px; +} +.ref-feature__container-box { + padding: 30px; + border-radius: 4px; + cursor: pointer; +} +.ref-feature__container-box:hover { + background: #0D5272; +} +.ref-feature__container-box:hover span { + color: #fff; +} +.ref-feature__container-box:hover .ref-feature-box_img img { + -webkit-filter: invert(100%); + filter: invert(100%); +} +.ref-feature__container-box:hover p { + color: #A9A9A9; +} +.ref-feature__container-box span { + font-weight: 600; + display: block; +} +.ref-feature-box_img { + width: 36px; + height: 36px; + margin-bottom: 0.6rem; +} +.ref-feature-box_img img { + width: 100%; + height: auto; +} +.ref-feature__container-box p { + color: #6F6969; + line-height: 32px; + margin-top: 0.8rem; +} +#ref-about-history { + padding: 50px 0; +} +.ref-abt-button { + width: 20px; + height: 20px; + background-color: #0D5272; + border-radius: 50%; + margin: 30px; + border: 3px solid #fff; + -webkit-box-shadow: 0px 0px 9px rgba(0, 0, 0, 0.25); + box-shadow: 0px 0px 9px rgba(0, 0, 0, 0.25); +} +.button-text { + display: block; + text-align: center; + position: absolute; + left: 0; + width: 100%; + padding: 5px 0; + color: #6F6969; + font-size: 12px; +} +.owl-carousel-abt .owl-item { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + cursor: pointer; + margin-bottom: 200px; +} + +.ref-abt-button:before { + content: ""; + position: absolute; + left: 0; + top: 50%; + width: 100%; + height: 6px; + background-color: #0D5272; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); + z-index: -1; +} +.button-text { + display: block; + text-align: center; + margin-top: 15px; + color: #6F6969; + font-weight: 600; + font-size: 16px; +} +.ref-abt-button__content { + display: none; + position: absolute; + top: 57px; + left: 50%; + -webkit-transform: translateX(-50%); + transform: translateX(-50%); + background-color: #EAF8FF; + padding: 20px; + width: 100%; + text-align: center; + opacity: 0; + -webkit-transition: opacity 0.3s ease-in-out; + transition: opacity 0.3s ease-in-out; +} +.ref-abt-button:hover .ref-abt-button__content { + display: block; + opacity: 1; +} +.ref-abt-button.active .ref-abt-button__content { + display: block; + opacity: 1; +} +.ref-abt_container { + position: relative; +} +.custom-nav-owl { + position: absolute; + width: 100%; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; + top: 28px; +} +.re-abt-nav { + width: 22px; + height: 22px; + border-radius: 50px; + background: #0D5272; + border: none; + outline: none; + color: #fff; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + cursor: pointer; + z-index: 888; +} +.re-abt-nav i { + font-size: 12px; +} +.ref-abt-button__content p { + color: #6F6969; + font-size: 1rem; +} +.ref-abt_mob { + display: none; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; + height: 600px; + margin: 50px 0; +} +.ref-abt_mob .ref-mob-btn { + position: relative; + width: 20px; + height: 20px; + background-color: #0D5272; + border-radius: 50%; + cursor: pointer; + border: 3px solid #fff; + -webkit-box-shadow: 0px 0px 9px rgba(0, 0, 0, 0.25); + box-shadow: 0px 0px 9px rgba(0, 0, 0, 0.25); +} +.ref-light-section { + background-color: #EAF8FF; + padding: 50px 0px; +} +.ref-abt_mob .ref-mob-btn:before { + content: ""; + width: 50%; + background-color: #0D5272; + height: 150px; + position: absolute; + left: 4px; + border-radius: 50px; + z-index: -1; +} +.ref-mob-btn:hover .ref-abt-button__mobcontent { + display: block; + opacity: 1; +} +.ref-mob-btn:hover .button-mob-text { + display: none; +} +.ref-abt-button__mobcontent { + width: 500px; + margin-left: 24px; + display: none; + opacity: 0; + -webkit-transition: opacity 0.3s ease-in-out; + transition: opacity 0.3s ease-in-out; +} +.ref-abt-button__mobcontent.show { + display: block; + opacity: 1; +} +.button-mob-text { + display: block; + width: -webkit-max-content; + width: -moz-max-content; + width: max-content; + color: #6F6969; + font-weight: 500; + font-size: 1rem; + margin-left: 24px; +} +.hidden { + display: none; +} +@media (max-width: 1199.98px) { + .owl-carousel-abt .owl-item { + margin-bottom: 240px; + } +} +@media (max-width: 991.98px) { + .rf-about-img { + width: 360px; + } + .owl-carousel-abt .owl-item { + margin-bottom: 260px; + } + .ref-abt-button__content p { + color: #6F6969; + font-size: 0.9rem; + } +} +@media (max-width: 767.98px) { + #ref-about-history { + padding-bottom: 100px; + } + .ref-about-container { + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + } + .ref-about-container:last-child { + -webkit-box-orient: vertical; + -webkit-box-direction: reverse; + -ms-flex-direction: column-reverse; + flex-direction: column-reverse; + } + .ref-about-content { + -ms-flex-preferred-size: 100%; + flex-basis: 100%; + } + .ref-feature__container { + -ms-grid-columns: 1fr 30px 1fr; + grid-template-columns: repeat(2, 1fr); + } + .ref-abt_mob { + height: 525px; + } + .ref-abt_mob { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + } + .ref-abt_container { + display: none; + } +} +.nav-link active{ + content: ""; + position: absolute; + bottom: 0; + left: 0; + width: 40%; + height: 3px; + font-weight: 600; + background-color: #0D5272; + -webkit-transition: width 0.3s ease-in-out; + transition: width 0.3s ease-in-out; + border-radius: 50px; +} +.ref-feature__container-box:hover span { + color: #fff !important; +} diff --git a/theme_eco_refine/static/src/css/blog.css b/theme_eco_refine/static/src/css/blog.css new file mode 100755 index 000000000..aa308c3dc --- /dev/null +++ b/theme_eco_refine/static/src/css/blog.css @@ -0,0 +1,281 @@ +.ref-blog-bg { + background: -webkit-gradient(linear, left top, left bottom, from(rgba(20, 108, 148, 0.6)), to(#FFFFFF)), url('/theme_eco_refine/static/src/img/blog-bg.png'); + background: linear-gradient(180deg, rgba(20, 108, 148, 0.6) 0%, #FFFFFF 100%), url('/theme_eco_refine/static/src/img/blog-bg.png'); + background-size: cover; +} +#o_wblog_blog_top .o_wblog_post_page_cover .o_record_cover_component{ + display:none; +} +#o_wblog_blog_top{ + margin-top: -50px; +} +#o_wblog_blog_top .o_wblog_post_title{ + display: none; +} +.navbar-light .navbar-nav .nav-link.disabled { + color: rgb(33 77 93); +} +.input-group .oe_search_button{ + background: #0d5272; + width: 60px; +} +.navbar-light .navbar-nav .show > .nav-link, .navbar-light .navbar-nav .nav-link.active { + color: rgb(27 80 97 / 90%); +} +.o_blog_post_title{ + font-weight: 600; +} +.text-reset .mt-2 { + color: #0d5272; +} +.o_wblog_post_short_tag_section .badge{ + border: 1px solid #0d5272 !important; +} +.justify-content-between a { + color: #0d5272; +} +.row .col-md-6{ + padding-bottom: 3rem !important; +} +.pb-4 { + padding-bottom: 3.5rem !important; +} +.px-2 { + padding-right: 0.5rem !important; + padding-left: 1.5rem !important; +} +.ref-wrapper { + max-width: 1200px; + margin-left: auto; + margin-right: auto; + padding-left: 20px; + padding-right: 20px; + width: 100%; +} +.ref-blog-container { + padding: 0px 0px; +} +.ref-blog-contain { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; + margin-bottom: 60px; + gap: 15px; +} +.ref-blog-img_container { + overflow: hidden; + position: relative; + display: inline-block; + -webkit-transition: all 0.3s ease; + transition: all 0.3s ease; + cursor: pointer; +} +.ref-blog-detail { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; +} +.ref-blog--sub-head { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + margin-bottom: 0.5rem; +} +.ref-date-single_blog { + padding-right: 1rem; + border-right: 1px solid #0D5272; +} +.ref-date { + margin: 0px 0px 16px 0px; + color: #0D5272; + font-weight: 500; +} +.ref-author { + padding-left: 1rem; + font-weight: 500; + color: #0D5272; +} +.ref-section_head { + font-size: 28px; + color: black; + font-weight: 600; + padding: 1rem 0; +} +.ref-section_head { + font-size: 28px; + color: black; + font-weight: 600; + padding: 1rem 0; +} +.ref-blog-detail a { + -0.7rem 1.5rem; +} +.ref-blog-img_container img { + width: 100%; + -o-object-fit: cover; + object-fit: cover; + height: -webkit-fill-available; +} +.text-nowrap{ + font-size: 1.3em; + color: #0d5272; +} +.o_wblog_post_cover_nocard .o_record_cover_component { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + background-size: cover; + background-position: center; + background-repeat: no-repeat; + height: 452px; + width: 453px; +} +.website_blog #o_wblog_posts_loop.o_wblog_list_view .o_wblog_post_cover_nocard .o_record_cover_container { + padding-top: 65% !important; +} +#o_wblog_posts_loop{ + margin-left: -140px; +} +.o_wblog_post_cover_nocard{ + width: 452px; +} +.website_blog .o_wblog_read_text { + font-size: 20px !important; + line-height: 45px !important; + font-weight: 300 !important; + width: 680px !important; +} +.mx-n2 { + margin-right: -0.5rem !important; + margin-left: -1.5rem !important; +} +.pt-2 { + padding-top: 1.5rem !important; +} +.o_wblog_post_short_tag_section .badge { + border: 1px solid #0d5272 !important; + height: 25px; + width: 115px; + font-size: 15px; +} +.ref-blog-detail .btn-primary{ + margin-bottom: 18px; + padding: 0.5rem 1.5rem; + background-color: #ffff; + color: #0d5272; + border-radius: 0px; + border-width: 3px; + border-color: #0d5272; +} +.pb-4 { + padding-bottom: 0rem !important; +} +#o_wblog_posts_loop .row .mb-5{ + display:none; +} +.rounded { + border-radius: 0rem !important; + border-top-left-radius: 0rem; + border-top-right-radius: 0rem; + border-bottom-right-radius: 0rem; + border-bottom-left-radius: 0rem; +} +.website_blog .o_wblog_post_page_cover.o_record_has_cover .o_wblog_post_title { + color: #733636!important; +} +#o_wblog_post_top .blog_header { + display: none; +} +#o_wblog_post_name{ + font-size: 50px!important; + font-weight: 500!important; + line-height: 65px!important; + color:#0d5272!important; +} +#o_wblog_post_content .text-decoration-none .o_record_cover_container{ + padding-top: 90%; + width: 850px; +} +#o_wblog_post_content .o_record_cover_component{ + height: 700px; + width: 850px; +} +.website_blog .o_wblog_read_text .lead { + font-size: 28px; + line-height: 34px; + margin-bottom: 40px; + width: 900PX; +} +.website_blog .o_wblog_read_text p, .website_blog .o_wblog_read_text ul, .website_blog .o_wblog_read_text ol { + margin-bottom: 1.55em; + font-size: 20px; + margin-top: 1rem; + line-height: 38px; + width: 880px; +} +.website_blog .o_wblog_post_title #o_wblog_post_subtitle { + font-weight: 300!important; + font-size: 1.5rem!important; +} +.o_wblog_post_content_field .mt-2{ + width: 860px; +} +#o_wblog_next_container .o_record_cover_container .o_record_cover_component{ + width: 100%; + height: 350px; + margin-top: -62px; + +} +#o_wblog_next_container .o_record_cover_container .o_record_cover_filter{ + width: 100%; + margin-top: -61px; + height: 350px; +} +.website_blog #o_wblog_next_container .o_wblog_next_loader { + transform: translateZ(-5px)!important; +} +.ref-single-blog-navigation { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; + margin-top: 20px; + margin-bottom: 50px; + width: 900px; + color:black; +} +#rf-blog-prev-btn, #rf-blog-next-btn { + padding: 0.8rem 0; + cursor: pointer; + background: none; + border: none; + font-weight: 600; + font-size: 18px; + color:black; +} +#o_wblog_posts_loop .blog_post .o_record_cover_component{ + height: 200px; +} +#o_wblog_post_content .o_wblog_post_title{ + margin-top: 125px; +} +#o_wblog_index_content{ + margin-left: 230px; +} +.oe_search_button .oe_search_found{ + display:none !important; +} diff --git a/theme_eco_refine/static/src/css/contact_us.css b/theme_eco_refine/static/src/css/contact_us.css new file mode 100755 index 000000000..2a011b19a --- /dev/null +++ b/theme_eco_refine/static/src/css/contact_us.css @@ -0,0 +1,562 @@ +.ref-hero-sub-bg { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + width: 100%; + height: 350px; + background: -webkit-gradient(linear, left top, left bottom, from(rgba(20, 108, 148, 0.6)), to(#FFFFFF)), url("/theme_eco_refine/static/src/img/contact-hero.png"); + background: linear-gradient(180deg, rgba(20, 108, 148, 0.6) 0%, #FFFFFF 100%), url("/theme_eco_refine/static/src/img/contact-hero.png"); + background-position: center; + background-size: cover; + background-repeat: no-repeat; +} +.ref-contact_container { + text-align: center; +} +.ref-contact-info { + display: flex; + justify-content: center; + gap: 100px; + align-items: center; +} +.ref-contact_container img { + padding: 30px; +} +.ref-contact-msg { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + margin: 50px 0px; + -webkit-box-orient: vertical; + webkit-box-direction: normal; + -webkit-box-direction: normal; + -webkit-box-align: center; +} +.ref-contact-form { + display: flex; + flex-direction: column; + text-align: center; + justify-content: center; +} +.ref-contant-form_input { + background: #FFFFFF; + border: 2px solid #0d5272; + border-radius: 4px; + padding: 0.8rem 0.6rem; + margin-bottom: 1.5rem; + width: 450px; +} +.form-control { + background: #FFFFFF; + border: 2px solid #0d5272; + border-radius: 4px; + padding: 0.8rem 0.6rem; + margin-bottom: 1.5rem; + width: 410px; + margin-left: 0px; +} +@media(max-width:1399px) { + .form-control { + background: #FFFFFF; + border: 1px solid #000000; + border-radius: 4px; + padding: 1.8rem 0.6rem; + margin-bottom: 1.5rem; + width: 450px; + margin-left: 330px; +} + } +@media(max-width:1200px) { + .form-control { + background: #FFFFFF; + border: 1px solid #000000; + border-radius: 4px; + padding: 1.8rem 0.6rem; + margin-bottom: 1.5rem; + width: 450px; + margin-left: 240px; +} + } +@media(max-width:992px) { + .form-control { + background: #FFFFFF; + border: 1px solid #000000; + border-radius: 4px; + padding: 1.8rem 0.6rem; + margin-bottom: 1.5rem; + width: 450px; + margin-left: 120px; +} + } +@media(max-width:768px) { + +.s_newsletter_subscribe_form .input-group > .form-control, .input-group > .form-select { + position: relative !important; + -webkit-box-flex: 1 !important; + -webkit-flex: 1 1 auto !important; + flex: 1 1 auto !important; + width: 1% !important; + min-width: 230px !important; + margin-left: 262px !important; + height: 40px !important; + border-width: 2px !important; + border-color: #0d5272 !important; +} + .form-control { + background: #FFFFFF; + border: 1px solid #000000; + border-radius: 4px; + padding: 1.8rem 0.6rem; + margin-bottom: 1.5rem; + width: 450px; + margin-left: 20px; +} + } +@media(max-width:$breakpoint-sm) { + .ref-hero-sub-bg { + height: 280px; + } + .ref-contact-info { + gap: 60px; + flex-wrap: wrap; + } +} +@media(max-width:$breakpoint-xs) { + .ref-contact_container { + h4 { + font-size: 1rem; + } + } + .ref-contact_container { + p { + font-size: 12px; + } + } + .ref-contact-info { + gap: 24px; + } + .ref-contant-form_input { + width:100%; + } + .ref-contact-form { + width: 90%; + } + .ref-contact_container img { + padding: 20px; + width: 70px; + } +} +element.style { +} +.ref-head--primary { + color: #0D5272; +} +.ref-section_head { + font-size: 28px; + color: black; + font-weight: 600; + padding: 1rem 0; +} +element.style { +} +@media (max-width: 991.98px) +.ref-hero-sub-bg_heading { + font-size: 42px; + width: 60%; +} +.ref-hero-sub-bg_heading { + font-weight: 600; + font-size: 42px; + width: 50%; + text-align: center; + line-height: 72px; +} +.btn-primary { + padding: 0.5rem 1.5rem; + width: -webkit-fit-content; + width: -moz-fit-content; + width: fit-content; + color: #fff; + background-color: #0D5272; + border-radius: 4px; +} +.ref-head--primary { + color: #0D5272; +} +#ref-footer { + background-color: #000; + padding: 100px 0px 50px 0px; +} +.ref-foot-row { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; + width: 100%; +} +@media (max-width: 1199.98px) +.ref-wrapper { + max-width: 999px; + margin-left: auto; + margin-right: auto; + padding-left: 20px; + padding-right: 20px; + width: 100%; +} + +element.style { +} +@media (max-width: 1199.98px) +.ref-wrapper { + max-width: 999px; + margin-left: auto; + margin-right: auto; + padding-left: 20px; + padding-right: 20px; + width: 100%; +} +.ref-wrapper { + max-width: 1200px; + margin-left: auto; + margin-right: auto; + padding-left: 20px; + padding-right: 20px; + width: 100%; +} +#ref-footer .ref-logo { + color: #fff; +} +.ref-foot-para { + color: #A9A9A9; + line-height: 36px; +} +.column { + -ms-flex-preferred-size: 20%; + flex-basis: 22%!important; +} +.ref-footer-section { + margin-bottom: 50px; +} +.ref-logo { + font-weight: 700; + font-size: 36px; + color: #000000; +} +.ref-foot_head { + color: #fff; + font-size: 22px; + line-height: 36px; +} +#ref-footer ul { + list-style: none; +} +#ref-footer li { + margin-right: 1rem; +} +a:not([href]):not([tabindex]) { + color: inherit; + text-decoration: none; +} +element.style { +} +.subscription-form { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + margin-top: 20px; + position: relative; +} +.subscription-form input[type=email] { + width: 450px; + border-radius: 6px; + padding: 12px; + margin: 50px 0px 0px 0px; +} +.subscription-form button { + background-color: #0D5272; + color: #fff; + border: none; + position: absolute; + right: 0; + margin: 6px; + top: 50px; + cursor: pointer; +} +.ref-button { + padding: 0.5rem 1.5rem; + width: -webkit-fit-content; + width: -moz-fit-content; + width: fit-content; + color: #fff; + background-color: #0D5272; + border-radius: 4px; +} +[type=reset], [type=submit], button, html [type=button] { + -webkit-appearance: button; +} +@media (max-width: 1199.98px) +.ref-wrapper { + max-width: 999px; + margin-left: auto; + margin-right: auto; + padding-left: 20px; + padding-right: 20px; + width: 100%; +} +.ref-wrapper { + max-width: 1200px; + margin-left: auto; + margin-right: auto; + padding-left: 20px; + padding-right: 20px; + width: 100%; +} +.ref-foot-cpy-rt { + width: 100%; + text-align: center; + color: #6F6969; + font-size: 12px; + border-top: 1px solid rgba(255, 255, 255, 0.3); + padding-top: 2rem; +} +.o_footer_copyright{ + display:none; +} +@media (max-width: 1199.98px) +.ref-wrapper { + max-width: 999px; + margin-left: auto; + margin-right: auto; + padding-left: 20px; + padding-right: 20px; + width: 100%; +} +.ref-searchbox { + position: relative; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + WIDTH: 10px; +} +.ref-searchbox input { + padding: 6px 40px 6px 6px; + border-radius: 4px; + width: 400px; + border: 1px solid rgba(0, 0, 0, 0.3); +} +.ref-searchbox button { + position: absolute; + top: 0; + right: 0; + width: 35px; + height: 100%; + background-color: #0D5272; + color: #fff; + border: none; + border-radius: 0 4px 4px 0; + cursor: pointer; +} +.ref-searchbox input { + padding: 6px 40px 6px 6px; + border-radius: 4px; + width: 420px; + border: 1px solid rgba(0, 0, 0, 0.3); + margin-left: 290px; +} +@media (max-width: 1199.98px) +.ref-wrapper { + max-width: 999px; + margin-left: auto; + margin-right: auto; + padding-left: 20px; + padding-right: 20px; + width: 100%; +} +.ref-head { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; + padding: 1rem 0px; +} +.ref-header__icons { + display: -webkit-box; + display: -ms-flexbox; + margin-left: 410px; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + gap: 1rem; +} +.ref-header--icon img { + width: 22px; + height: 22px; +} +@media(max-width:1500px) { + .ref-header__icons { + margin-left: 350px; + display: flex; + -webkit-box-align: center; + align-items: center; + -webkit-box-pack: center; + justify-content: center; + gap: 1rem; +} + } + @media(max-width:1400px) { + .ref-header__icons { + margin-left: 211px; + display: flex; + -webkit-box-align: center; + align-items: center; + -webkit-box-pack: center; + justify-content: center; + gap: 1rem; + margin-right: 90px; +} + } + @media(max-width:1284px) { + .ref-header__icons { + margin-left: 180px; + display: flex; + -webkit-box-align: center; + align-items: center; + -webkit-box-pack: center; + justify-content: center; + gap: 1rem; +} +.ref-logo { + font-weight: 700; + font-size: 36px; + color: #000000; + margin-left: 50px; +} + } +@media(max-width:1170px) { + .ref-header__icons { + margin-left: 200px; + display: flex; + -webkit-box-align: center; + align-items: center; + -webkit-box-pack: center; + justify-content: center; + gap: 1rem; +} + } +@media(max-width:1100px) { + .ref-header__icons { + margin-left: 250px; + display: flex; + -webkit-box-align: center; + align-items: center; + -webkit-box-pack: center; + justify-content: center; + gap: 1rem; +} + } + @media(max-width:1000px) { + .ref-searchbox input { + padding: 6px 40px 6px 6px; + border-radius: 4px; + width: 420px; + border: 1px solid rgba(0, 0, 0, 0.3); + margin-left: 132px; +} + } + @media(max-width:920px) { + .ref-searchbox input { + padding: 6px 40px 6px 6px; + border-radius: 4px; + width: 420px; + border: 1px solid rgba(0, 0, 0, 0.3); + margin-left: 82px; +} + } + @media(max-width:780px) { + .ref-logo { + font-weight: 700; + font-size: 36px; + color: #000000; + margin-left: 16px; +} +.ref-searchbox input { + padding: 6px 40px 6px 6px; + border-radius: 4px; + width: 420px; + border: 1px solid rgba(0, 0, 0, 0.3); + margin-left: 15px; +} +.ref-header__icons { + margin-left: 50px; + display: flex; + -webkit-box-align: center; + align-items: center; + -webkit-box-pack: center; + justify-content: center; + gap: 1rem; +} + } +.navbar-nav { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + gap: 38px; + padding: 24px 0px; + margin-bottom: 0px; + flex-direction: row-reverse; +} +.navbar-nav .nav-link { + padding-right: 0; + padding-left: 0; + margin-right: -25px; + color: #0d5272; +} +.oe_website_login_container .input-group { + margin-left: -250px; + margin-top: 25px; +} +#contact6 { + width: 445px; + margin-left: 415px +} +#contact5 { + width: 445px; + margin-left: 415px +} diff --git a/theme_eco_refine/static/src/css/home.css b/theme_eco_refine/static/src/css/home.css new file mode 100755 index 000000000..5a1a1a5d8 --- /dev/null +++ b/theme_eco_refine/static/src/css/home.css @@ -0,0 +1,1236 @@ +.ref-hero-bg { + background-color: #f0f0f0; + background-image: url("/theme_eco_refine/static/src/img/refurbished-img.jpg"); + background-position: center; + background-size: cover; + height: 590px; + width: 100%; +} +.ref-hero-carousel { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + height: 100%; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; +} +.ref-hero__mainhead { + font-size: 48px; + font-weight: 700; + width: 58%; + color: black; +} +.ref-hero__mainhead .tech { + color: #0D5272 !important; +} +.carousel-indicators .active { + background-color: #0D5272; +} +.carousel-indicators li { + position: relative; + -webkit-box-flex: 0; + -ms-flex: 0 1 auto; + flex: 0 1 auto; + width: 0.8rem; + height: 0.8rem; + border-radius: 50px; + margin-right: 3px; + margin-left: 3px; + text-indent: -999px; + background-color: #6F6969; + cursor: pointer; +} +.ref-search-input-box input:focus { + outline: none; +} +.ref-hero__subhead { + font-weight: 500; + font-size: 26px; + color: #6F6969; +} +.o_homepage_editor_welcome_message { + padding-top: 0px; + padding-bottom: 128px; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Ubuntu, "Liberation Sans", Arial, "Odoo Unicode Support Noto", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + max-width: 100%; +} +.ref-hero-section{ + margin-top: -126px; + width: 102%; + margin-left: -14px; +} +.ref-logo { + font-weight: 700; + font-size: 36px; + color: #000000; +} +.ref-head { + display: flex; + align-items: center; + justify-content: space-between; + padding: 1rem 0px; +} +.ref-searchbox { + position: relative; + display: flex; + align-items: center; +} +.ref-searchbox { + input { + padding: 6px 40px 6px 6px; + border-radius: 4px; + width: 400px; + border: 1px solid rgba(0, 0, 0, 0.3); + } +} +.ref-searchbox { + button { + position: absolute; + top: 0; + right: 0; + width: 35px; + height: 100%; + background-color: $primary-color; + color: #fff; + border: none; + border-radius: 0 4px 4px 0; + cursor: pointer; + } +} +.ref-searchbox { + button { + display: flex; + align-items: center; + justify-content: center; + } +} +.ref-header__icons { + display: flex; + align-items: center; + justify-content: center; + gap: 1rem; +} +.ref-header--icon { + width: 22px; + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; +} +.ref-header--icon img { + width: 100%; + height: auto; +} +.ref-border { + border-bottom: 1px solid rgba(0, 0, 0, 0.3); +} +.ref-nav-menu { + list-style: none; + display: flex; + align-items: center; + justify-content: center; + gap: 38px; + padding: 24px 0px; + margin-bottom: 0px; +} +.ref-nav-menu { + li { + a { + font-weight: 500; + font-size: 18px; + line-height: 24px; + color: #000000; + text-decoration: none; + position: relative; + } + } +} +.ref-nav-menu { + li { + a.active { + font-weight: 600; + } + } +} +.ref-nav-menu { + li { + a.active::after { + content: ""; + position: absolute; + bottom: 0; + left: 0; + width: 40%; + height: 3px; + font-weight: 600; + background-color: $primary-color; + transition: width 0.3s ease-in-out; + border-radius: 50px; + } + } +} +.ref-nav-menu { + li { + a:after { + content: ""; + position: absolute; + bottom: 0; + left: 0; + width: 0; + height: 3px; + font-weight: 600; + background-color: $primary-color; + transition: width 0.8s cubic-bezier(0.5, 0, 0.75, 0.9); + border-radius: 50px; + } + } +} +.ref-nav-menu { + li { + a:hover::after { + width: 40%; + } + } +} +.ref-hero-carousel { + display: flex; + height: 100%; + justify-content: center; + flex-direction: column; +} +.ref-hero__mainhead { + font-size: 48px; + font-weight: 700; + width: 58%; + color: black; +} +.ref-hero__mainhead .tech { + color: $primary-color !important; +} +.carousel-indicators .active { + background-color: $primary-color; +} +.carousel-indicators li { + position: relative; + -webkit-box-flex: 0; + -ms-flex: 0 1 auto; + flex: 0 1 auto; + width: 0.8rem; + height: 0.8rem; + border-radius: 50px; + margin-right: 3px; + margin-left: 3px; + text-indent: -999px; + background-color: $dark-grey; + cursor: pointer; +} +.ref-search-input-box input:focus { + outline: none; +} +.ref-hero__subhead { + font-weight: 500; + font-size: 26px; + color: $dark-grey; +} +.ref-collection--container { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + gap: 20px; +} +.ref-collection__item { + flex-basis: calc(20% - 20px); + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; +} +.ref-collection__item--box { + width: 120px; + height: 120px; + background-color: #0d5272; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; +} +.ref-collection__item--box img { + filter: invert(0%); + transition: filter 0.3s ease; +} +.ref-collection__item:hover .ref-collection__item--box, +.ref-collection__item.selected .ref-collection__item--box { + box-shadow: 0px 0px 9px $primary-color; + background-color: $primary-color; + color: white; +} +.ref-collection__item:hover .ref-collection__item--box img, +.ref-collection__item.selected .ref-collection__item--box img { + filter: invert(100%); +} +.ref-product--container { + display: flex; + justify-content: space-between; +} +.ref-product-detail-box { + flex-basis: 20%; +} +.ref-product__box { + position: relative; +} +.ref-product__box img { + height: auto; + transition: filter 0.3s ease; +} +.product-box-overlay_container { + background-color: rgba(20, 108, 148, 0.16); + opacity: 0; + width: 100%; + height: 100%; + position: absolute; + left: 0; + top: 0; +} +.ref-product__box:hover .product-box-overlay_container { + opacity: 1; +} +.ref-product__box { + .overlay { + position: absolute; + bottom: 0; + left: 0; + width: 100%; + padding: 10px; + opacity: 0; + transition: opacity 0.3s ease; + display: flex; + justify-content: center; + align-items: center; + gap: 1rem; + } +} +.product-box:hover img { + filter: brightness(70%); +} +.ref-product__box:hover .overlay { + opacity: 1; +} +.overlay-icon-container { + width: 32px; + height: 32px; + background-color: $primary-color; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; +} +.product-detail { + text-align: center; +} +.ref-banner-section { + background-image: linear-gradient(85.66deg, rgba(13, 82, 114, 0.46) 10.47%, rgba(42, 203, 225, 0.0552) 46.94%, rgba(224, 34, 34, 0.4554) 94.18%), url("/theme_eco_refine/static/src/img/shopping-banner-img.png"); + background-position: center; + background-size: cover; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + height: 460px; +} +.ref-border_btn { + text-decoration: none; + color: #000; + padding: 0.5rem 1.5rem; + border: 2px solid #000; + width: -webkit-fit-content; + width: -moz-fit-content; + width: fit-content; +} +.ref-banner-section { + padding: 100px 0px; + width: 142%; + margin-left: -270px; +} +.ref-banner-section span { + text-align: center; + width: 50%; + font-size: 45px; + margin-bottom: 0.5rem; + font-weight: 600; +} +.ref-banner-section p { + width: 48%; + text-align: center; + line-height: 28px; +} +.ref-banner-section a { + font-weight: 500; + -webkit-transition: 0.3s ease-in-out; + transition: 0.3s ease-in-out; +} +.ref-arrival-section { + text-align: center; +} +.ref-banner-section a:hover { + font-size: 18px; +} +.ref-arrival-content { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; +} +.ref-banner_sm--container { + flex-basis: 48%; + background-image: url('/theme_eco_refine/static/src/img/shopping-banner2.png'); + background-position: center; + background-size: cover; + padding: 50px; + display: flex; + align-items: flex-end; + flex-direction: column; +} +.banner-box { + /* display: flex; + justify-content: space-between; + align-items: center;*/ + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} +.banner-lft { + width: 73%; +} +.banner-bg-sm { + background-image: url('/theme_eco_refine/static/src/img/shopping-cart-fil.png'); + align-items: flex-start; +} +.ref-banner_text { + color: #fff; + padding-bottom: 1rem; + font-weight: 500; +} +.overlay img { + width: 16px !important; +} +.owl-theme .owl-dots { + display: none; +} +.ref-testimonial-section { + margin: 100px 0; + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; +} +.ref-testimonial__head { + text-align: center; + color: #6F6969; + font-weight: 600; +} +.ref-testimonial__content { + background: #0d5272; + display: flex; + align-items: center; + justify-content: center; + padding: 50px; + padding-top: 105px; + gap: 100px; + position: relative; +} +.ref-testimonial-text { + p { + font-weight: 600; + font-size: 24px; + line-height: 42px; + color: #A9A9A9; + position: relative; + } +} +.ref-testimonial-text p::before { + content: ""; + position: absolute; + background: url('/theme_eco_refine/static/src/img/quotes-before.svg'); + top: -84px; + left: 0; + width: 69px; + height: 54px; +} +.ref-testimonial-text p::after { + content: ""; + position: absolute; + background: url(../images/quotes-after.svg); + bottom: -84px; + right: 0; + width: 69px; + height: 54px; +} +.ref-testimonial-text { + span { + font-weight: 600; + font-size: 30px; + line-height: 45px; + color: #FFFFFF; + position: relative; + } +} +.ref-testimonial__content img { + width: fit-content !important; +} +.panel-default>.panel-heading a[aria-expanded="true"]:after { + content: url("/theme_eco_refine/static/src/img/cross.svg"); + float: right; + transform: rotate(180deg); +} +.panel-default>.panel-heading a[aria-expanded="false"]:after { + content: url("/theme_eco_refine/static/src/img/plus.svg"); + float: right; + transform: rotate(90deg); +} +.custom-nav, +.custom-nav img { + display: flex; +} +.owl-carousel .owl-item img { + display: flex; +} +.custom-nav { + position: absolute; + bottom: 0; + right: 0; + margin: 0 50px 50px; +} +.custom-nav { + .custom-nav__prev, + .custom-nav__next { + cursor: pointer; + margin: 2px; + } +} +.ref-faq-section__content { + margin: 30px 0px 0px 0px; +} +.custom-nav__prev, +.custom-nav__next { + filter: invert(100%); + color: white; +} +.ref-faq-question { + font-weight: 500; + font-size: 22px; + line-height: 48px; +} +.ref-header-menubar { + cursor: pointer; +} +.ref-fag-index { + color: rgba(0, 51, 102, 0.16); + font-weight: 700; + padding-right: 2px; + font-size: 22px; +} +.ref-faq-question:hover { + color: $primary-color; +} +.ref-faq-panel { + font-weight: 400; + font-size: 18px; + line-height: 36px; + width: 90%; + color: $dark-grey; + margin-bottom: 20px; + margin-left: 32px; +} +#ref-footer { + background-color: #000; + padding: 100px 0px 50px 0px; +} +#ref-footer { + .ref-logo { + color: #fff; + } +} +.ref-foot_head { + color: #fff; + font-size: 22px; + line-height: 36px; +} +#ref-footer { + ul { + list-style: none; + } +} +#ref-footer { + li { + margin-right: 1rem; + } +} +.ref-footer-section { + margin-bottom: 50px; +} +.subscription-form { + display: flex; + flex-wrap: wrap; + justify-content: center; + align-items: center; + margin-top: 20px; + position: relative; +} +.subscription-form input[type="email"] { + width: 450px; + border-radius: 6px; + padding: 12px; + margin: 50px 0px 0px 0px; +} +.ref-foot-row { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + width: 100%; +} +.subscription-form button { + background-color: $primary-color; + color: #fff; + border: none; + position: absolute; + right: 0; + margin: 6px; + top: 50px; + cursor: pointer; +} +.column { + flex-basis: 20%; +} +.subscription-form button a { + color: #fff; +} +.ref-foot-para { + color: #A9A9A9; + line-height: 36px; +} +.ref-foot-cpy-rt { + width: 100%; + text-align: center; + color: $dark-grey; + font-size: 12px; + border-top: 1px solid rgba(255, 255, 255, 0.3); + padding-top: 2rem; +} +.ref-menubar-header { + display: none; +} +.menu-list { + display: none; +} +button:focus { + outline: none; +} +.ref-login-container .ref-signup-btn:hover{ + color: #fff; +} +@media(max-width:$breakpoint-lg) { + .ref-wrapper { + max-width: 999px; + margin-left: auto; + margin-right: auto; + padding-left: 20px; + padding-right: 20px; + width: 100%; + } + .ref-hero__mainhead { + width: 70%; + } +} +@media(max-width:$breakpoint-md) { + .ref-collection--container { + justify-content: center; + } + .ref-collection__item { + flex-basis: calc(30% - 20px); + } + .ref-testimonial-text p { + font-size: 18px; + line-height: 36px; + } + .ref-testimonial-text span { + font-size: 26px; + line-height: 40px; + } + .ref-testimonial__content { + gap: 30px; + } + .ref-banner-section span { + width: 78%; + font-size: 40px; + } + .ref-banner-section p { + width: 60%; + line-height: 28px; + } + .ref-banner_sm--containner { + padding: 30px; + } + .ref-banner_text { + font-size: 1.6rem; + line-height: 42px; + } +} +@media(max-width:$breakpoint-sm) { + .ref-hero__mainhead { + font-size: 38px; + width: 71%; + } + .ref-collection__item--box { + width: 100px; + height: 100px; + } + .ref-collection__item--box img { + width: 50px; + height: auto; + } + .ref-header { + display: none; + } + .ref-menubar-header { + display: block; + position: relative; + } + .ref-logo { + font-size: 22px; + } + .ref-header__logo { + display: flex; + align-items: center; + gap: 12px; + } + .ref-menubar-nav { + background: #FFFFFF; + width: 100%; + height: 100%; + } + .menu-list { + display: block; + position: fixed; + top: 0; + left: -100%; + width: 100%; + height: 100%; + background-color: $secondary-color; + z-index: 9999; + transition: left 0.3s ease-in-out; + } + .menu-list.open { + left: 0; + } + .menu-list ul { + list-style: none; + padding: 0; + margin: 0; + width: 100%; + height: 100%; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + } + .menu-list ul li { + padding: 10px; + color: $primary-color; + font-size: 18px; + font-weight: 500; + } + .close-icon { + margin: 1rem 0; + display: flex; + justify-content: space-between; + align-items: center; + cursor: pointer; + } + .ref-search-input-box { + position: absolute; + top: 82px; + z-index: 2000; + right: 16%; + padding: 1rem; + background: #fff; + border-radius: 4px; + display: none; + box-shadow: 0 4px 9px rgba(0, 0, 0, 0.2); + } + .ref-search-input-box input { + border: none; + border-bottom: 1px solid black; + } + .ref-head { + border-bottom: 1px solid rgba(0, 0, 0, 0.3); + } + .ref-search:hover .ref-search-input-box { + display: flex; + } + .banner-box { + flex-wrap: wrap; + gap: 30px; + } + .ref-banner_sm--containner { + flex-basis: 100%; + } + .ref-product--container { + flex-wrap: wrap; + } + .ref-product-detail-box { + flex-basis: 48%; + } + .column { + flex-basis: 48%; + } + .ref-faq-question { + font-size: 18px; + line-height: 42px; + } + .ref-testimonial__content img { + width: 100% !important; + } + .ref-testimonial-text p { + font-size: 16px; + line-height: 32px; + } + .ref-testimonial-text span { + font-size: 22px; + line-height: 20px; + } + .ref-testimonial__content { + gap: 24px; + } + .ref-testimonial__content { + padding: 30px; + } + .ref-testimonial-text p::before { + display: none; + } + .ref-testimonial-text p::after { + display: none; + } + .custom-nav { + margin: 27px; + } + .product-detail { + + margin-top: 12px; + } + .custom-nav img { + width: 50px !important; + } +} +@media(max-width:$breakpoint-xs) { + .ref-hero-bg { + height: 40vh; + + } + .subscription-form button { + font-size: 12px; + } + .subscription-form input[type=email] { + width: 300px; + font-size: 12px; + } + .ref-banner-section span { + width: 95%; + font-size: 24px; + } + .ref-banner-section p { + width: 95%; + } + .ref-banner-section { + padding: 60px 0px; + } + .ref-collection__item { + flex-basis: calc(50% - 20px); + } + .ref-hero__mainhead { + font-size: 24px; + width: 100%; + } + .ref-hero__subhead { + font-size: 14px; + } + .ref-banner_text { + font-size: 1.2rem; + line-height: 24px; + } + .ref-faq-panel { + font-size: 12px; + line-height: 32px; + } + .ref-faq-question { + font-size: 14px; + line-height: 32px; + } + .ref-fag-index { + font-size: 18px; + } + .ref-testimonial__content { + padding: 20px; + } + .ref-testimonial-text p { + font-size: 14px; + line-height: 26px; + } + .ref-testimonial-text span { + font-size: 18px; + line-height: 15px; + } + .custom-nav { + margin: 16px; + } + .ref-testimonial__content { + flex-direction: column; + } + .ref-testimonial__content img { + width: 140px !important; + } + .custom-nav img { + width: 50px !important; + } + .ref-testimonial-section { + margin: 50px 0; + } + .ref-search-input-box input { + font-size: 14px; + } +} +#top_products_carousel { + margin-top: 30px; +} +#new_arrival_carousel { + margin-top: 30px; +} +.sign_and_buy_snippet{ + margin-top: 15px; +} +.ref-head--primary { + color: #0D5272!important; + text-decoration:none!important +} +.ref-testimonial-text p { + font-weight: 600; + font-size: 24px; + line-height: 42px; + color: #A9A9A9; + position: relative; +} +.ref-testimonial-text span { + font-weight: 600; + font-size: 30px; + line-height: 45px; + color: #FFFFFF; + position: relative; +} +.ref-testimonial-text p::after { + content: ""; + position: absolute; + background: url('/theme_eco_refine/static/src/img/quotes-after.svg'); + bottom: -84px; + right: 0; + width: 69px; + height: 54px; +} +.custom-nav { + position: absolute; + bottom: 0; + right: 0; + margin: 0 50px 20px; +} +.ref-light-section { + background-color: #EAF8FF; + padding: 50px 0px; + width: 100%; + +} +#top_menu_collapse .o_wsale_my_wish{ + display:none; +} +#top_menu_collapse .o_wsale_my_cart{ + display:none; +} +#top_menu_collapse .o_no_autohide_item{ + display:none; +} +.ref-header{ + background-color:#fff; +} +.multirange-wrapper small span{ color:#000 !important; } +@media only screen and (max-width: 574px) and (min-width: 515px) {.subscription-form button{ right:62px !important; }} +@media (max-width: 576px) { + + .carousel-control-next{ right: -10px !important; + top: -89px; } + +.carousel .carousel-control-prev{ left: 130px !important; + top: -89px; } + + .o_carousel_product_card{ margin-left:12px; } + + +.css_quantity .quantity{ min-width:100% !important; } +.o_add_wishlist_dyn{ margin-left:0px !important; width:100% !important; margin-top: 10px; } +#add_to_cart_wrap{ width:100% !important; } +#add_to_cart{ margin-left:0px !important; margin-right:0px !important; } +.ref-contant-form_input{ width:auto !important; } +.s_col_no_resize div{ display:flex; justify-content:center; } +.s_col_no_resize #contact6{ + margin-left: 0px !important; + width: 229px !important; +} +.s_col_no_resize #contact5 { + margin-left: 0px !important; + width: 229px !important; +} +.ref-contact-info{ display:block !important; } +.ref-abt-button__mobcontent{ width:320px !important; font-size:13px; } +.website_blog nav ul{ + display: block !important; + float: left; + width: 100%; + padding-bottom:0px; + + } + .website_blog nav ul li:nth-child(1) { + margin-left:0px; +} + .website_blog nav ul li{ float:left; margin-left:35px; } +#wrapwrap .website_blog .search-query { + min-width:83% !important; + margin-left:312px !important; +} +.ref-wrapper{ + padding-left:0px !important; + padding-right:0px !important; +} +#ref-footer .ref-header__logo .ref-logo { + margin-left: 18px !important; +} +.ref-wrapper .ref-searchbox{ + left: -89px !important; +} +.ref-banner-section span{ + width:90% !important; +} +.ref-banner-section p{ + width:90% !important; +} +.ref-wrapper .ref-searchbox .search-query { + min-width: 170px !important; + margin-left: 274px !important; +} +.banner-box{ + display:block !important; +} +.banner-bg-sm{ + margin-top:10px; +} +.ref-testimonial-photo{ + display:none; +} +.ref-light-section{ + padding: 50px 25px !important; +} +.ref-foot-row{ + display:block !important; +} +.ref-foot-para { + width: 70%; + padding-left: 18px; +} +.subscription-form button{ + right:0px; +} +.navbar-light .navbar-nav .nav-link{ + font-size:15px; +} +} +@media (max-width: 768px) { +.o_container_small{ max-width:100% !important; } +.o_container_small{ max-width:100% !important; } +#o_wblog_post_content .text-decoration-none .o_record_cover_container{ width:100% !important; } +#o_wblog_post_content .o_record_cover_component{ width:100% !important; } +.o_wblog_post_content_field .mt-2{ width:100% !important; } +.website_blog .o_wblog_read_text .lead{ width:100% !important; } +.website_blog .o_wblog_read_text p{ width:100% !important; } +.website_blog .o_wblog_read_text ol{ width:100% !important; } + .website_blog #o_wblog_post_main .o_wblog_read_text{ width:100% !important; } +.s_col_no_resize div{ display:flex; justify-content:center; } +.s_col_no_resize #contact6{ + margin-left: 0px !important; + width:450px; +} +.s_col_no_resize #contact5 { + margin-left: 0px !important; + width:450px; +} +.ref-contact-info{ display:block !important; } +.website_blog nav ul{ + display:block !important; + float: left; + width: 100%; + padding-bottom:0px; + + } + .website_blog nav ul li:nth-child(1) { + margin-left:0px; +} + .website_blog nav ul li{ float:left; margin-left:35px; } +.website_blog .container { max-width:100% !important; } + .ref-searchbox{ + position: relative; + top: 67px; + left: -178px !important; + z-index: 9; + } + .ref-searchbox .search-query{ + min-width: 170px; + margin-left: 193px; + } + .ref-logo{ + margin-left:16px !important; + } +#o_wblog_index_content { + margin-left: 140px !important; +} +} +@media (max-width: 992px) { +#add_to_cart { + margin-top: 11px; + margin-left: 2px; + margin-right: 22px; +} +.o_add_wishlist_dyn{ margin-left:254px; } +.s_col_no_resize div{ display:flex; justify-content:center; } +.s_col_no_resize #contact6{ + margin-left: 0px !important; + width:450px; +} +.s_col_no_resize #contact5 { + margin-left: 0px !important; + width:450px; +} +.ref-contact-info{ display:block !important; } +.website_blog .o_searchbar_form .search-query{ min-width: 239px !important; + margin-left:378px !important; } +.multirange-wrapper small span{ color:#000 !important; } +.ref-banner-section{ + width:auto !important; + margin-left:0px !important; + height:auto !important; +} +.ref-testimonial-photo{ + display:none; +} +.home_sign_up_snippet{ + max-width:100% !important; + } + .sign_and_buy_snippet{ + max-width:100% !important; + } + .ref-searchbox{ + position: relative; + top: 67px; + left: -228px; + z-index: 9; + } + .ref-searchbox .search-query{ + min-width: 170px; + margin-left: 193px; + } + .navbar-nav { + flex-direction: row !important; + } + .ref-logo{ + margin-left:0px; + } + .accordion-item{ + padding:0px !important; + } + .o_searchbar_form .oe_search_box{ + min-width: 292px !important; + margin-left: 314px !important; + } + } +@media (max-width: 1200px) { +.s_col_no_resize div{ display:flex; justify-content:center; } +.s_col_no_resize #contact6{ + margin-left: 0px !important; + width:450px; +} +.s_col_no_resize #contact5 { + margin-left: 0px !important; + width:450px; +} +.ref-contact-info{ display:block !important; } + .multirange-wrapper small span{ color:#000 !important; } + .js_attributes a small b{ color:#000 !important; } + #ref-footer .ref-logo{ margin-left:0px !important; } + } + .js_attributes a small b{ color:#000 !important; } + #contact6, #contact5{ margin-left:330px !important; } +.s_col_no_resize div{ display:flex; justify-content:center; } +.s_col_no_resize #contact6{ + margin-left: 0px !important; + width:450px; +} +.s_col_no_resize #contact5 { + margin-left: 0px !important; + width:450px; +} +.ref-contact-info{ display:block !important; } +.s_newsletter_subscribe_form .input-group{ + margin-left: -260px; + margin-top: 25px; +} +.js_subscribed_btn{ + padding-top:20px; +} +.js_subscribe_btn{ + padding-top:18px; +} +.o_header_affixed { + display: block; + position: absolute; + top: 0; + left: 0; + bottom: auto; + right: 0; + /* position: fixed; */ +} +.product_list .top_rate_product{ + float: left; + margin-left: 27px; + width: 295px; + margin-top: 39px; +} +.carousel-item{ + min-height :500px !important; +} \ No newline at end of file diff --git a/theme_eco_refine/static/src/css/owl.carousel.css b/theme_eco_refine/static/src/css/owl.carousel.css new file mode 100755 index 000000000..40237bc65 --- /dev/null +++ b/theme_eco_refine/static/src/css/owl.carousel.css @@ -0,0 +1,186 @@ +/** + * Owl Carousel v2.3.4 + * Copyright 2013-2018 David Deutsch + * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE + */ +/* + * Owl Carousel - Core + */ +.owl-carousel { + display: none; + width: 100%; + -webkit-tap-highlight-color: transparent; + /* position relative and z-index fix webkit rendering fonts issue */ + position: relative; + z-index: 1; } + .owl-carousel .owl-stage { + position: relative; + -ms-touch-action: pan-Y; + touch-action: manipulation; + -moz-backface-visibility: hidden; + /* fix firefox animation glitch */ } + .owl-carousel .owl-stage:after { + content: "."; + display: block; + clear: both; + visibility: hidden; + line-height: 0; + height: 0; } + .owl-carousel .owl-stage-outer { + position: relative; + overflow: hidden; + /* fix for flashing background */ + -webkit-transform: translate3d(0px, 0px, 0px); } + .owl-carousel .owl-wrapper, + .owl-carousel .owl-item { + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + -ms-backface-visibility: hidden; + -webkit-transform: translate3d(0, 0, 0); + -moz-transform: translate3d(0, 0, 0); + -ms-transform: translate3d(0, 0, 0); } + .owl-carousel .owl-item { + position: relative; + min-height: 1px; + float: left; + -webkit-backface-visibility: hidden; + -webkit-tap-highlight-color: transparent; + -webkit-touch-callout: none; } + .owl-carousel .owl-item img { + display: block; + width: 100%; } + .owl-carousel .owl-nav.disabled, + .owl-carousel .owl-dots.disabled { + display: none; } + .owl-carousel .owl-nav .owl-prev, + .owl-carousel .owl-nav .owl-next, + .owl-carousel .owl-dot { + cursor: pointer; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } + .owl-carousel .owl-nav button.owl-prev, + .owl-carousel .owl-nav button.owl-next, + .owl-carousel button.owl-dot { + background: none; + color: inherit; + border: none; + padding: 0 !important; + font: inherit; } + .owl-carousel.owl-loaded { + display: block; } + .owl-carousel.owl-loading { + opacity: 0; + display: block; } + .owl-carousel.owl-hidden { + opacity: 0; } + .owl-carousel.owl-refresh .owl-item { + visibility: hidden; } + .owl-carousel.owl-drag .owl-item { + -ms-touch-action: pan-y; + touch-action: pan-y; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } + .owl-carousel.owl-grab { + cursor: move; + cursor: grab; } + .owl-carousel.owl-rtl { + direction: rtl; } + .owl-carousel.owl-rtl .owl-item { + float: right; } + +/* No Js */ +.no-js .owl-carousel { + display: block; } + +/* + * Owl Carousel - Animate Plugin + */ +.owl-carousel .animated { + animation-duration: 1000ms; + animation-fill-mode: both; } + +.owl-carousel .owl-animated-in { + z-index: 0; } + +.owl-carousel .owl-animated-out { + z-index: 1; } + +.owl-carousel .fadeOut { + animation-name: fadeOut; } + +@keyframes fadeOut { + 0% { + opacity: 1; } + 100% { + opacity: 0; } } + +/* + * Owl Carousel - Auto Height Plugin + */ +.owl-height { + transition: height 500ms ease-in-out; } + +/* + * Owl Carousel - Lazy Load Plugin + */ +.owl-carousel .owl-item { + /** + This is introduced due to a bug in IE11 where lazy loading combined with autoheight plugin causes a wrong + calculation of the height of the owl-item that breaks page layouts + */ } + .owl-carousel .owl-item .owl-lazy { + opacity: 0; + transition: opacity 400ms ease; } + .owl-carousel .owl-item .owl-lazy[src^=""], .owl-carousel .owl-item .owl-lazy:not([src]) { + max-height: 0; } + .owl-carousel .owl-item img.owl-lazy { + transform-style: preserve-3d; } + +/* + * Owl Carousel - Video Plugin + */ +.owl-carousel .owl-video-wrapper { + position: relative; + height: 100%; + background: #000; } + +.owl-carousel .owl-video-play-icon { + position: absolute; + height: 80px; + width: 80px; + left: 50%; + top: 50%; + margin-left: -40px; + margin-top: -40px; + background: url("owl.video.play.png") no-repeat; + cursor: pointer; + z-index: 1; + -webkit-backface-visibility: hidden; + transition: transform 100ms ease; } + +.owl-carousel .owl-video-play-icon:hover { + -ms-transform: scale(1.3, 1.3); + transform: scale(1.3, 1.3); } + +.owl-carousel .owl-video-playing .owl-video-tn, +.owl-carousel .owl-video-playing .owl-video-play-icon { + display: none; } + +.owl-carousel .owl-video-tn { + opacity: 0; + height: 100%; + background-position: center center; + background-repeat: no-repeat; + background-size: contain; + transition: opacity 400ms ease; } + +.owl-carousel .owl-video-frame { + position: relative; + z-index: 1; + height: 100%; + width: 100%; } diff --git a/theme_eco_refine/static/src/css/product.css b/theme_eco_refine/static/src/css/product.css new file mode 100755 index 000000000..bfb34af07 --- /dev/null +++ b/theme_eco_refine/static/src/css/product.css @@ -0,0 +1,546 @@ +.ref-prdt-bg { + background: -webkit-gradient(linear, left top, left bottom, from(rgba(20, 108, 148, 0.6)), to(#FFFFFF)), url(/theme_eco_refine/static/src/img/product-page-herobanner.png); + background: linear-gradient(180deg, rgba(20, 108, 148, 0.6) 0%, #FFFFFF 100%), url(/theme_eco_refine/static/src/img/product-page-herobanner.png); + background-size: cover; +} +.oi oi-search{ + margin-left: -7px; +} +.input-group > .form-control, .input-group > .form-select { + position: relative; + -webkit-box-flex: 1; + -webkit-flex: 1 1 auto; + flex: 1 1 auto; + width: 1%; + min-width: 350px; + margin-left: 250px; + height: 40px; + border-width: 2px; + border-color: #0d5272; +} +.oe_search_button{ + height: 40px; +} + @media(max-width:1399px) { + .oe_search_button{ + height: 59px; +} +} +.input-group { + margin-left: 0px; + margin-top: 25px; +} + @media(max-width:1254px) { + .input-group { + margin-left: -300px; + margin-top: 25px; +} + } + @media(max-width:1100px) { + .input-group { + margin-left: -360px; + margin-top: 25px; +} + } + @media(max-width:991px) { + #add_to_cart { + margin-top: 11px; + margin-left: 28px; +}, +.o_add_wishlist_dyn{ + margin-left: 240px; +} + } + @media(max-width:780px) { + .input-group { + margin-left: -410px; + margin-top: 25px; +} + } + .ref-product-main-header__section { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; +} +.ref-section_head { + font-size: 28px; + color: black; + font-weight: 600; + padding: 1rem 0; +} +.o_wsale_products_grid_before_rail { + width: 85%; + padding: 0.7rem 0; +} +.ref-filter__settings-row { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + border-bottom: 1.2px solid #0D5272; +} +.ref-filter-head { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + gap: 8px; +} +.ref-sm-head { + font-weight: 500; + font-size: 20px; + line-height: 32px; +} +@media (max-width: 991.98px) +.ref-sm-head { + font-size: 18px; + line-height: 38px; +} +.ref-filter_rest-btn { + background: none; + border: none; + color: #0D5272; + font-weight: 500; + font-size: 1rem; + cursor: pointer; +} +.accordion-item { + border-bottom: 1.2px solid #0D5272; + padding: 0.8rem 0; +} +.accordion-item { + border-bottom: 1.2px solid #0D5272; + padding: 0.8rem 0; +} +.mb-3{ + line-height: 20px; + font-weight: 600; + padding: 0.5rem 0; +} +.form-check-input:checked { + background-color: #0d5272; + border-color: #0d5272; +} +.oe_search_button { + background-color: #0d5272; +} +.oi-search{ + color:white; +} +.dropdown-toggle{ + color:#0d5272; +} +.oe_product_cart .oe_product_image .oe_product_image_link { + padding-top: calc(160% / (var(--o-wsale-card-thumb-aspect-ratio, 1))); +} +@media (min-width: 992px) +#products_grid:not(.o_wsale_layout_list) td.oe_product { + padding-bottom: 23.5px; + padding-left: 20px; +} +.text-primary { + color: #121313 !important; +} +.h6 { + font-size: 1rem; + color: #195c79; +} +.o_wsale_products_item_title{ + font-size: 20px; +} +.page-item.active .page-link { + z-index: 3; + color: #FFF; + background-color: #181818; + border-color: #35979c; +} +.o_wsale_products_grid_before_rail { + width: 85%; + padding: 0.7rem 0; + OVERFLOW: hidden; +} +.js_quantity{ + max-width: 4rem; + margin-bottom: 0px; +} +.css_quantity{ + margin-left: 0; + background: whitesmoke; +} +.oe_website_sale h1[itemprop="name"], .oe_website_sale .h1[itemprop="name"] { + font-size: 2rem; + font-weight: 700; +} +.oe_price{ + white-space: nowrap; + color: #0d5272; + font-size: 40px; + font-weight: 600; +} +.text-danger { + color: #6f6969 !important; + font-size: unset; + font-weight: 600; +} +.list-inline-item{ + margin: 0; + border-radius: 36px; + width: auto ; + border: 2px solid #0D5272; +} +.list-inline-item:active{ + margin: 0; + background: #0d5272; + color: white; + border-radius: 36px; + width: auto ; +} +.col-form-label{ + margin-left:7px; +} +.variant_custom_value{ + margin-left:0px; + border-color: #0d5272; + border-block-width: 2px; +} +.quantity{ + margin-bottom: 0; +} +.js_check_product{ + padding: 0.5rem 1.5rem; + width: -webkit-fit-content; + width: -moz-fit-content; + width: 208px; + color: #fcffff; + background-color: #0d5272; + border-radius: 8px; +} +.fa-minus { + color: #0d5272; + margin-top: 15px; +} +.fa-plus{ + color: #0d5272; + margin-top: 15px; +} +.o_add_wishlist_dyn{ + padding: 0.4rem 1.5rem; + width: -webkit-fit-content; + width: -moz-fit-content; + width: 208px; + color: #fcffff; + background-color: #0d5272; + border-radius: 4px; + font-size: 21px; + font-weight: 600; + margin-left: 230px; + margin-top: -55px; + margin-bottom: 10px; +} +.btn-secondary { + color: #FFFFFF; + background-color: #0d5272; + border-color: #030303; +} +#login,#password{ + margin-left:0px; + width: 410px; + border-width: 2px; + border-color: #0d5272; +} +#db{ + height: 65px; + border-width: 2px; + border-color: #0d5272; +} +.input-group .btn-secondary { + height: 65px; +} +.oe_login_buttons .btn-primary{ + width: 415px; + border-color: #141515; + border-width: 2px; + background: #0d5272; +} +.btn-primary { + padding: 0.5rem 1.5rem; + width: -webkit-fit-content; + width: -moz-fit-content; + width: fit-content; + color: #ffffff; + background-color: #0d5272; + border-radius: 4px; +} +.mb32{ + color: #ffffff !important; +} +.float-end{ + color: #ffffff !important; +} + +.justify-content-between .btn-link{ + color: #0d5272; +} +.me-sm-2{ + display:none; +} +.justify-content-between a { + color: #f1f4f6; +} +.navbar-light .navbar-nav .nav-link { + color: rgb(25 70 76); +} +.o_pricelist_dropdown .dropdown-toggle{ + color: #0d5272; +} +.o_sortby_dropdown .dropdown-toggle{ + color:#0d5272; +} +.d-flex .btn-light { + color: #0d5272; + background-color: #f7f7f7; + border-color: #f7f7f7; +} +small, .small { + font-size: 0.875em; + color: white; +} +.input-group .oe_search_button{ + width:100px; +} +.input-group .form-control{ + height: 64px; +} +.input-group > :not(:first-child):not(.dropdown-menu):not(.o_dropdown_menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) { + margin-left: -1px; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + height: 64px; +} +.o_header_standard .o_dropdown_menu{ + display:none; +} +.modal-header{ + color:#0d5275; +} +.css_attribute_select{ + border-width: 2px; + border-color: #0d5272; +} +.navbar-light .navbar-nav .nav-link { + color: rgb(34 36 36 / 87%); + font-size: large; + font-weight: 600; +} +.progress-wizard .progress-wizard-step.active .progress-wizard-steplabel { + color: #0d5272; + font-weight: bolder; +} +.progress-wizard-step.active .progress-wizard-dot { + animation: fadeIn 1s ease 0s 1 normal none running; + background: #0d5272; + box-shadow: 0 0 0 0.1875rem white, 0 0 0 0.25rem rgb(53 151 156 / 50%); +} +.progress-wizard .progress-wizard-step.active .progress-wizard-dot { + animation: fadeIn 1s ease 0s 1 normal none running; + background: #0d5272; + box-shadow: 0 0 0 0.1875rem white, 0 0 0 0.25rem rgb(53 151 156 / 50%); +} +.td-product_name a { + color: #0d5272; +} +.o_legacy_dialog .fa { + color:#fcfeff; +} + +.js_cart_summary{ + border-width: 2px; + border-color: #0d5272; + width: 460px; +} +.card-body .d-xl-block, .show_coupon, .fa-trash-o{ + color: #0d5272; +} +.alert-info { + color: #ffffff; + background-color: #0d5272; + border-color: #030303; +} +.table-bordered > :not(caption) > * { + border-width: 2px 2px; + border-color: #0d5272; +} +.text-start a{ + color:#0d5272; +} +.tab-container { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; +} +.tab { + display: -webkit-box; + display: -ms-flexbox; + display: flex; +} +.tab-content.active { + display: block; +} +.tab-content { + display: none; + padding: 1rem 0; + font-weight: 400; + font-size: 18px; + line-height: 33px; + color: #6F6969; +} +.tab-content { + display: none; + padding: 1rem 0; + font-weight: 400; + font-size: 18px; + line-height: 33px; + color: #6F6969; +} +.tab-link .active { + border-bottom: 3px solid #0D5272; +} +.tab-container button { + background: none; + border: none; + border-bottom: 1px solid #6F6969; + outline: none; +} +.tab-link { + -webkit-box-flex: 1; + -ms-flex-positive: 1; + flex-grow: 1; + padding: 10px; + background-color: transparent; + cursor: pointer; + font-weight: 600; + font-size: 20px; +} +.tab-content { + display: none; + padding: 1rem 0; + font-weight: 400; + font-size: 18px; + line-height: 33px; + color: #6F6969; +} +.tab-link.active { + border-bottom: 3px solid #0D5272; +} +@media (max-width: 991.98px) +.tab-content p { + font-size: 14px; + line-height: 28px; +} +.s_searchbar_input .input-group { + margin-top: 25px; +} +.search-query{ + margin-left:0px !important; +} +@media (max-width: 1299px) +{ + .s_searchbar_input .input-group { + margin-left: -315px; + margin-top: 25px; +} +} +.card { + overflow: hidden; + border-width: 2px; + border-color: #0d5272; +} +.coupon_form .form-control{ + position: relative; + -webkit-box-flex: 1; + -webkit-flex: 1 1 auto; + flex: 1 1 auto; + width: 1%; + min-width: 311px; + margin-left: 0; + height: 40px; + border-width: 2px; + border-color: #0d5272; +} +.coupon_form .input-group{ + margin-left: -1px; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + height: 40px; +} +.o_image_64_cover { + width: 80px; + height: 130px; + object-fit: cover; +} +#o-carousel-product .o_carousel_product_indicators .carousel-indicators li { + width: 64px; + height: 64px; + text-indent: unset; + transition: none; + border: 0px solid #CED4DA; + height: 130px; + width: 80px; +} +.o_carousel_product_indicators .carousel{ + justify-content: center; +} +.ref-head__underline { + position: relative; + padding: 0px; + margin: 1rem 0; +} +.ref-head__underline::after { + content: ""; + position: absolute; + width: 80%; + height: 3px; + background-color: #0D5272; + left: 0; + bottom: 0; + border-radius: 50px; +} +.product_price .small{ + font-size: 0.875em; + color: rgb(13, 82, 114); +} +.dropdown-item:not(.disabled):not(:disabled):not(.o_wysiwyg_loader), .dropdown-item:not(.disabled):not(:disabled):not(.o_wysiwyg_loader) label { + cursor: pointer; + COLOR: #0d5272; +} +.o_carousel_product_card_body .h6 { + font-size: 20px; + color: #000000; + font-weight: 600; +} +.o_carousel_product_card_body .mt-2 { + color: #0d5272; + font-size: 25px; +} +.coupon_form .a-submit { + height: 40px !important; +} + +small, .small { + font-size: 0.875em; + color: #0d5272; +} diff --git a/theme_eco_refine/static/src/img/Arrow 1.svg b/theme_eco_refine/static/src/img/Arrow 1.svg new file mode 100755 index 000000000..29b1829c3 --- /dev/null +++ b/theme_eco_refine/static/src/img/Arrow 1.svg @@ -0,0 +1,3 @@ + + + diff --git a/theme_eco_refine/static/src/img/Arrow 2.svg b/theme_eco_refine/static/src/img/Arrow 2.svg new file mode 100755 index 000000000..7f5df273a --- /dev/null +++ b/theme_eco_refine/static/src/img/Arrow 2.svg @@ -0,0 +1,3 @@ + + + diff --git a/theme_eco_refine/static/src/img/Iphone 1.png b/theme_eco_refine/static/src/img/Iphone 1.png new file mode 100755 index 000000000..b0c1d94cf Binary files /dev/null and b/theme_eco_refine/static/src/img/Iphone 1.png differ diff --git a/theme_eco_refine/static/src/img/Laptop.svg b/theme_eco_refine/static/src/img/Laptop.svg new file mode 100755 index 000000000..46aa93129 --- /dev/null +++ b/theme_eco_refine/static/src/img/Laptop.svg @@ -0,0 +1,4 @@ + + + + diff --git a/theme_eco_refine/static/src/img/Quality Product.svg b/theme_eco_refine/static/src/img/Quality Product.svg new file mode 100755 index 000000000..c554dd41f --- /dev/null +++ b/theme_eco_refine/static/src/img/Quality Product.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/theme_eco_refine/static/src/img/Vector (3).svg b/theme_eco_refine/static/src/img/Vector (3).svg new file mode 100755 index 000000000..25c19d1a9 --- /dev/null +++ b/theme_eco_refine/static/src/img/Vector (3).svg @@ -0,0 +1,3 @@ + + + diff --git a/theme_eco_refine/static/src/img/about-hero-banner.png b/theme_eco_refine/static/src/img/about-hero-banner.png new file mode 100755 index 000000000..cc82d0921 Binary files /dev/null and b/theme_eco_refine/static/src/img/about-hero-banner.png differ diff --git a/theme_eco_refine/static/src/img/blog-bg.png b/theme_eco_refine/static/src/img/blog-bg.png new file mode 100755 index 000000000..7b143bc05 Binary files /dev/null and b/theme_eco_refine/static/src/img/blog-bg.png differ diff --git a/theme_eco_refine/static/src/img/camera 1.svg b/theme_eco_refine/static/src/img/camera 1.svg new file mode 100755 index 000000000..4dc26e34c --- /dev/null +++ b/theme_eco_refine/static/src/img/camera 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/theme_eco_refine/static/src/img/cart-icon.svg b/theme_eco_refine/static/src/img/cart-icon.svg new file mode 100755 index 000000000..8c30309d4 --- /dev/null +++ b/theme_eco_refine/static/src/img/cart-icon.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/theme_eco_refine/static/src/img/community.svg b/theme_eco_refine/static/src/img/community.svg new file mode 100755 index 000000000..9809db141 --- /dev/null +++ b/theme_eco_refine/static/src/img/community.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/theme_eco_refine/static/src/img/contact-hero.png b/theme_eco_refine/static/src/img/contact-hero.png new file mode 100755 index 000000000..67a3a1d2b Binary files /dev/null and b/theme_eco_refine/static/src/img/contact-hero.png differ diff --git a/theme_eco_refine/static/src/img/cross.svg b/theme_eco_refine/static/src/img/cross.svg new file mode 100755 index 000000000..5b0b8c925 --- /dev/null +++ b/theme_eco_refine/static/src/img/cross.svg @@ -0,0 +1,3 @@ + + + diff --git a/theme_eco_refine/static/src/img/email.svg b/theme_eco_refine/static/src/img/email.svg new file mode 100755 index 000000000..3ce9dd423 --- /dev/null +++ b/theme_eco_refine/static/src/img/email.svg @@ -0,0 +1,4 @@ + + + + diff --git a/theme_eco_refine/static/src/img/exchange.svg b/theme_eco_refine/static/src/img/exchange.svg new file mode 100755 index 000000000..187d1a343 --- /dev/null +++ b/theme_eco_refine/static/src/img/exchange.svg @@ -0,0 +1,4 @@ + + + + diff --git a/theme_eco_refine/static/src/img/facebook.svg b/theme_eco_refine/static/src/img/facebook.svg new file mode 100755 index 000000000..2dd6ce059 --- /dev/null +++ b/theme_eco_refine/static/src/img/facebook.svg @@ -0,0 +1,3 @@ + + + diff --git a/theme_eco_refine/static/src/img/filter.svg b/theme_eco_refine/static/src/img/filter.svg new file mode 100755 index 000000000..fb015ae81 --- /dev/null +++ b/theme_eco_refine/static/src/img/filter.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/theme_eco_refine/static/src/img/goal-gd9f02c7b0_1920 1.png b/theme_eco_refine/static/src/img/goal-gd9f02c7b0_1920 1.png new file mode 100755 index 000000000..5fc860884 Binary files /dev/null and b/theme_eco_refine/static/src/img/goal-gd9f02c7b0_1920 1.png differ diff --git a/theme_eco_refine/static/src/img/guarantee (3) 1.svg b/theme_eco_refine/static/src/img/guarantee (3) 1.svg new file mode 100755 index 000000000..97f2402a8 --- /dev/null +++ b/theme_eco_refine/static/src/img/guarantee (3) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/theme_eco_refine/static/src/img/headphone 1.svg b/theme_eco_refine/static/src/img/headphone 1.svg new file mode 100755 index 000000000..869e13d12 --- /dev/null +++ b/theme_eco_refine/static/src/img/headphone 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/theme_eco_refine/static/src/img/instagram.svg b/theme_eco_refine/static/src/img/instagram.svg new file mode 100755 index 000000000..606c79b41 --- /dev/null +++ b/theme_eco_refine/static/src/img/instagram.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/theme_eco_refine/static/src/img/levitating-music-headphones-display 1.png b/theme_eco_refine/static/src/img/levitating-music-headphones-display 1.png new file mode 100755 index 000000000..cef2c768c Binary files /dev/null and b/theme_eco_refine/static/src/img/levitating-music-headphones-display 1.png differ diff --git a/theme_eco_refine/static/src/img/like.svg b/theme_eco_refine/static/src/img/like.svg new file mode 100755 index 000000000..6305f40b6 --- /dev/null +++ b/theme_eco_refine/static/src/img/like.svg @@ -0,0 +1,3 @@ + + + diff --git a/theme_eco_refine/static/src/img/location.svg b/theme_eco_refine/static/src/img/location.svg new file mode 100755 index 000000000..8140e3191 --- /dev/null +++ b/theme_eco_refine/static/src/img/location.svg @@ -0,0 +1,3 @@ + + + diff --git a/theme_eco_refine/static/src/img/login.svg b/theme_eco_refine/static/src/img/login.svg new file mode 100755 index 000000000..2293e0609 --- /dev/null +++ b/theme_eco_refine/static/src/img/login.svg @@ -0,0 +1,4 @@ + + + + diff --git a/theme_eco_refine/static/src/img/phone.svg b/theme_eco_refine/static/src/img/phone.svg new file mode 100755 index 000000000..b6943d93d --- /dev/null +++ b/theme_eco_refine/static/src/img/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/theme_eco_refine/static/src/img/plus.svg b/theme_eco_refine/static/src/img/plus.svg new file mode 100755 index 000000000..83c3b059c --- /dev/null +++ b/theme_eco_refine/static/src/img/plus.svg @@ -0,0 +1,3 @@ + + + diff --git a/theme_eco_refine/static/src/img/pricing.svg b/theme_eco_refine/static/src/img/pricing.svg new file mode 100755 index 000000000..9f5175118 --- /dev/null +++ b/theme_eco_refine/static/src/img/pricing.svg @@ -0,0 +1,3 @@ + + + diff --git a/theme_eco_refine/static/src/img/product-cart.svg b/theme_eco_refine/static/src/img/product-cart.svg new file mode 100755 index 000000000..1b8941d64 --- /dev/null +++ b/theme_eco_refine/static/src/img/product-cart.svg @@ -0,0 +1,3 @@ + + + diff --git a/theme_eco_refine/static/src/img/product-like.svg b/theme_eco_refine/static/src/img/product-like.svg new file mode 100755 index 000000000..29ce9e4b7 --- /dev/null +++ b/theme_eco_refine/static/src/img/product-like.svg @@ -0,0 +1,3 @@ + + + diff --git a/theme_eco_refine/static/src/img/product-page-herobanner.png b/theme_eco_refine/static/src/img/product-page-herobanner.png new file mode 100755 index 000000000..dba6a95a7 Binary files /dev/null and b/theme_eco_refine/static/src/img/product-page-herobanner.png differ diff --git a/theme_eco_refine/static/src/img/product-view.svg b/theme_eco_refine/static/src/img/product-view.svg new file mode 100755 index 000000000..a261e8cb8 --- /dev/null +++ b/theme_eco_refine/static/src/img/product-view.svg @@ -0,0 +1,3 @@ + + + diff --git a/theme_eco_refine/static/src/img/quotes-after.svg b/theme_eco_refine/static/src/img/quotes-after.svg new file mode 100755 index 000000000..cb96c1c6f --- /dev/null +++ b/theme_eco_refine/static/src/img/quotes-after.svg @@ -0,0 +1,3 @@ + + + diff --git a/theme_eco_refine/static/src/img/quotes-before.svg b/theme_eco_refine/static/src/img/quotes-before.svg new file mode 100755 index 000000000..892d19412 --- /dev/null +++ b/theme_eco_refine/static/src/img/quotes-before.svg @@ -0,0 +1,3 @@ + + + diff --git a/theme_eco_refine/static/src/img/refurbished-img.jpg b/theme_eco_refine/static/src/img/refurbished-img.jpg new file mode 100755 index 000000000..34379e7c0 Binary files /dev/null and b/theme_eco_refine/static/src/img/refurbished-img.jpg differ diff --git a/theme_eco_refine/static/src/img/return.svg b/theme_eco_refine/static/src/img/return.svg new file mode 100755 index 000000000..55d669353 --- /dev/null +++ b/theme_eco_refine/static/src/img/return.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/theme_eco_refine/static/src/img/shopping-banner-img.png b/theme_eco_refine/static/src/img/shopping-banner-img.png new file mode 100755 index 000000000..fc1b4da1e Binary files /dev/null and b/theme_eco_refine/static/src/img/shopping-banner-img.png differ diff --git a/theme_eco_refine/static/src/img/shopping-banner2.png b/theme_eco_refine/static/src/img/shopping-banner2.png new file mode 100755 index 000000000..182d06ad0 Binary files /dev/null and b/theme_eco_refine/static/src/img/shopping-banner2.png differ diff --git a/theme_eco_refine/static/src/img/shopping-cart-fil.png b/theme_eco_refine/static/src/img/shopping-cart-fil.png new file mode 100755 index 000000000..a1f888a59 Binary files /dev/null and b/theme_eco_refine/static/src/img/shopping-cart-fil.png differ diff --git a/theme_eco_refine/static/src/img/smart-watch 1.svg b/theme_eco_refine/static/src/img/smart-watch 1.svg new file mode 100755 index 000000000..05301656f --- /dev/null +++ b/theme_eco_refine/static/src/img/smart-watch 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/theme_eco_refine/static/src/img/smartphone 1.svg b/theme_eco_refine/static/src/img/smartphone 1.svg new file mode 100755 index 000000000..140944838 --- /dev/null +++ b/theme_eco_refine/static/src/img/smartphone 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/theme_eco_refine/static/src/img/smartwatch-screen-digital-device (1) 1.png b/theme_eco_refine/static/src/img/smartwatch-screen-digital-device (1) 1.png new file mode 100755 index 000000000..014018d66 Binary files /dev/null and b/theme_eco_refine/static/src/img/smartwatch-screen-digital-device (1) 1.png differ diff --git a/theme_eco_refine/static/src/img/snippet/Best-Seller.jpg b/theme_eco_refine/static/src/img/snippet/Best-Seller.jpg new file mode 100644 index 000000000..4cead665f Binary files /dev/null and b/theme_eco_refine/static/src/img/snippet/Best-Seller.jpg differ diff --git a/theme_eco_refine/static/src/img/snippet/Customer-Response.jpg b/theme_eco_refine/static/src/img/snippet/Customer-Response.jpg new file mode 100644 index 000000000..a5db134f6 Binary files /dev/null and b/theme_eco_refine/static/src/img/snippet/Customer-Response.jpg differ diff --git a/theme_eco_refine/static/src/img/snippet/FAQ.jpg b/theme_eco_refine/static/src/img/snippet/FAQ.jpg new file mode 100644 index 000000000..d50d6e7f6 Binary files /dev/null and b/theme_eco_refine/static/src/img/snippet/FAQ.jpg differ diff --git a/theme_eco_refine/static/src/img/snippet/New-Arrival.jpg b/theme_eco_refine/static/src/img/snippet/New-Arrival.jpg new file mode 100644 index 000000000..52d8a6eb4 Binary files /dev/null and b/theme_eco_refine/static/src/img/snippet/New-Arrival.jpg differ diff --git a/theme_eco_refine/static/src/img/snippet/Our-collection.jpg b/theme_eco_refine/static/src/img/snippet/Our-collection.jpg new file mode 100644 index 000000000..0347c9feb Binary files /dev/null and b/theme_eco_refine/static/src/img/snippet/Our-collection.jpg differ diff --git a/theme_eco_refine/static/src/img/snippet/Refurbished-Carousel.jpg b/theme_eco_refine/static/src/img/snippet/Refurbished-Carousel.jpg new file mode 100644 index 000000000..96ef31f41 Binary files /dev/null and b/theme_eco_refine/static/src/img/snippet/Refurbished-Carousel.jpg differ diff --git a/theme_eco_refine/static/src/img/snippet/Sign-up-snippet.jpg b/theme_eco_refine/static/src/img/snippet/Sign-up-snippet.jpg new file mode 100644 index 000000000..668df9153 Binary files /dev/null and b/theme_eco_refine/static/src/img/snippet/Sign-up-snippet.jpg differ diff --git a/theme_eco_refine/static/src/img/snippet/Sign_up_and_Buy.jpg b/theme_eco_refine/static/src/img/snippet/Sign_up_and_Buy.jpg new file mode 100644 index 000000000..bf1bd51fc Binary files /dev/null and b/theme_eco_refine/static/src/img/snippet/Sign_up_and_Buy.jpg differ diff --git a/theme_eco_refine/static/src/img/snippet/Top-Rated-Product.jpg b/theme_eco_refine/static/src/img/snippet/Top-Rated-Product.jpg new file mode 100644 index 000000000..122cd4e45 Binary files /dev/null and b/theme_eco_refine/static/src/img/snippet/Top-Rated-Product.jpg differ diff --git a/theme_eco_refine/static/src/img/testimonial-person-1.png b/theme_eco_refine/static/src/img/testimonial-person-1.png new file mode 100755 index 000000000..9621f64a0 Binary files /dev/null and b/theme_eco_refine/static/src/img/testimonial-person-1.png differ diff --git a/theme_eco_refine/static/src/img/twitter.svg b/theme_eco_refine/static/src/img/twitter.svg new file mode 100755 index 000000000..7eaccfe43 --- /dev/null +++ b/theme_eco_refine/static/src/img/twitter.svg @@ -0,0 +1,3 @@ + + + diff --git a/theme_eco_refine/static/src/img/workplace-business-modern-male-accessories-laptop-white 1 (1).png b/theme_eco_refine/static/src/img/workplace-business-modern-male-accessories-laptop-white 1 (1).png new file mode 100755 index 000000000..0ef339609 Binary files /dev/null and b/theme_eco_refine/static/src/img/workplace-business-modern-male-accessories-laptop-white 1 (1).png differ diff --git a/theme_eco_refine/static/src/js/about_us.js b/theme_eco_refine/static/src/js/about_us.js new file mode 100755 index 000000000..893d28bf6 --- /dev/null +++ b/theme_eco_refine/static/src/js/about_us.js @@ -0,0 +1,82 @@ +odoo.define('theme_eco_refine.about_us', function (require) { + 'use strict'; + var publicWidget = require('web.public.widget'); + publicWidget.registry.refurb_theme_about_us = publicWidget.Widget.extend({ + templates: 'theme_eco_refine.about_us', + selector: '.ref-wrapper', + events: { + 'click .ref-abt-button': 'toggleDiv', + 'click .ref-mob-btn': 'toggleContent', + 'click .custom-nav_prev': 'togglePrevious', + 'click .custom-nav_next': 'toggleNext', + }, + start: function() { + var self = this; + return this._super.apply(this, arguments).then(function() { + var defaultIndex = 2; + var defaultContentElement = self.$('.ref-abt_mob .ref-mob-btn:nth-child(' + (defaultIndex + 1) + ') .ref-abt-button__mobcontent'); + if (defaultContentElement.length) { + defaultContentElement.addClass('show'); + } + var buttons = self.$el.find('.ref-abt-button'); + if (buttons.length > 0) { + self.$(buttons[1]).addClass('active'); + self.$(buttons[3]).addClass('active'); + } + self.$(".owl-carousel-abt").owlCarousel(); + }); + }, + toggleDiv: function (ev) { + if (ev.target.classList.contains('ref-abt-button')){ + // function for show and hide corresponding div according to click on Our Journy + const buttons = this.$el[0].querySelectorAll('.ref-abt-button'); + const about = ev.target.querySelector('.ref-abt-button__content'); + buttons.forEach((btn) => { + btn.classList.remove('active'); + btn.querySelector('.ref-abt-button__content').style.display = 'none'; + }); + ev.target.classList.add('active'); + about.style.display = 'block'; + } + }, + toggleContent: function (ev){ + let index; + if(this.$(ev.target).hasClass('div0')){ + index = 0 + }else if(this.$(ev.target).hasClass('div1')){ + index = 1 + }else if(this.$(ev.target).hasClass('div2')){ + index = 2 + }else if(this.$(ev.target).hasClass('div3')){ + index = 3 + }else { + index = 4 + } + const contentElements = this.$el[0].querySelectorAll('.ref-abt-button__mobcontent'); + contentElements.forEach(function (contentElement, i) { + if (i === index) { + contentElement.classList.add('show'); + } else { + contentElement.classList.remove('show'); + } + }); + const buttonTextElements = this.$el[0].querySelectorAll('.button-mob-text'); + buttonTextElements.forEach(function (buttonTextElement, i) { + if (i === index) { + buttonTextElement.classList.toggle('hidden'); + } else { + buttonTextElement.classList.remove('hidden'); + } + }); + }, + togglePrevious:function(){ + // Function for Previous button of Our Journey + self.$(".owl-carousel-abt").trigger("prev.owl.carousel"); + }, + toggleNext:function(){ + // Function for Next button of Our Journey + self.$(".owl-carousel-abt").trigger("next.owl.carousel"); + }, + }); + return publicWidget.registry.refurb_theme_about_us; +}); diff --git a/theme_eco_refine/static/src/js/best_seller_snippet.js b/theme_eco_refine/static/src/js/best_seller_snippet.js new file mode 100755 index 000000000..ad1f85785 --- /dev/null +++ b/theme_eco_refine/static/src/js/best_seller_snippet.js @@ -0,0 +1,95 @@ +odoo.define('theme_eco_refine.top_selling_products', function (require) { + "use strict"; + var PublicWidget = require('web.public.widget'); + var ajax = require('web.ajax'); + var core = require('web.core'); + var Qweb = core.qweb; + var TopSellingProducts = PublicWidget.Widget.extend({ + selector: '.best_seller_product_snippet', + willStart: async function () { + var self = this; + await ajax.jsonRpc('/top_selling_products', 'call', {}).then(function (data) { + self.products = data[0]; + self.categories = data[1]; + self.website_id = data[2]; + self.unique_id = data[3]; + }); + }, + start: function () { + var self = this; + var products = this.products; + var categories = this.categories; + var current_website_id = this.website_id; + var unique_id = this.unique_id; + var products_list = []; + var best_seller = []; + $(document).ready(function () { + $(".top_selling").owlCarousel({ + items: 4, + loop: true, + margin: 20, + stagePadding: 0, + smartSpeed: 450, + autoplay: false, + autoPlaySpeed: 3000, + autoPlayTimeout: 1000, + autoplayHoverPause: true, + dots: false, + responsive: { + 0: { + items: 1, + nav: true + }, + 400: { + items: 2, + nav: false + }, + 1000: { + items: 4, + nav: true, + loop: true, + margin: 0 + } + }, + nav: true, + navText: [ + "", + "", + ], + }); + }); + for (var i = 0; i < products.length; i += 4) { + best_seller.push(products.slice(i, i + 4)); + } + if (best_seller.length > 1) { + best_seller[0].is_active = true; + best_seller.push('chunk'); + } + products_list.push({ + 'category': categories[0], + 'products': best_seller, + 'unique_id':unique_id, + }); + self.$('#top_products_carousel').html( + Qweb.render('theme_eco_refine.products_category_wise', { + products: products, + categories: categories, + current_website_id: current_website_id, + products_list: products_list + }) + ); + self.$('.top_selling').each(function () { + if (self.$(this).children().length === 0) { + self.$(this).remove(); + } + }); + self.$('.top').each(function () { + if (self.$(this).children().length === 0) { + self.$(this).remove(); + } + }); + } + }); + PublicWidget.registry.products_category_wise_snippet = TopSellingProducts; + return TopSellingProducts; +}); diff --git a/theme_eco_refine/static/src/js/collection_snippet.js b/theme_eco_refine/static/src/js/collection_snippet.js new file mode 100755 index 000000000..18574ac6c --- /dev/null +++ b/theme_eco_refine/static/src/js/collection_snippet.js @@ -0,0 +1,21 @@ +odoo.define('theme_eco_refine.collection_snippet', function (require) { + var publicWidget = require('web.public.widget'); + publicWidget.registry.collection_snippet = publicWidget.Widget.extend({ + selector: '.ref-collection--container', + start: function () { + var self = this; + return this._super.apply(this, arguments).then(function () { + self.$('.ref-collection__item').each(function (index) { + if (index === 0) { + self.$(this).addClass('selected'); + } + self.$(this).on('click', function () { + self.$('.ref-collection__item').removeClass('selected'); + self.$(this).addClass('selected'); + }); + }); + }); + }, + }); + return publicWidget.registry.collection_snippet; +}); diff --git a/theme_eco_refine/static/src/js/customer_response.js b/theme_eco_refine/static/src/js/customer_response.js new file mode 100755 index 000000000..5a07523ae --- /dev/null +++ b/theme_eco_refine/static/src/js/customer_response.js @@ -0,0 +1,35 @@ +odoo.define('theme_eco_refine.customer_response_snippet', function (require) { + 'use strict'; + // Function for customer response snippet + self.$('.owl-carousel1').owlCarousel({ + loop: true, + margin: 10, + navText: ["Prev", "Next"], + nav: false, + autoplay: true, + responsive: { + 0: { + items: 2 + }, + 600: { + items: 3 + }, + 1000: { + items: 5 + } + } + }); + self.$(".owl-carousel2").owlCarousel({ + items: 1, + loop: true, + nav: false, + dots: false, + }); + // Custom navigation + self.$(".custom-nav__prev").click(function () { + $(".owl-carousel2").trigger("prev.owl.carousel"); + }); + self.$(".custom-nav__next").click(function () { + $(".owl-carousel2").trigger("next.owl.carousel"); + }); +}); diff --git a/theme_eco_refine/static/src/js/new_arrival_snippet.js b/theme_eco_refine/static/src/js/new_arrival_snippet.js new file mode 100755 index 000000000..9d603f715 --- /dev/null +++ b/theme_eco_refine/static/src/js/new_arrival_snippet.js @@ -0,0 +1,98 @@ +odoo.define('theme_eco_refine.new_arrival_products', function(require) { + "use strict"; + var PublicWidget = require('web.public.widget'); + var ajax = require('web.ajax'); + var core = require('web.core'); + var Qweb = core.qweb; + var NewArrivalProducts = PublicWidget.Widget.extend({ + selector: '.product_new_arrival_snippet', + willStart: function() { + var self = this; + return ajax.jsonRpc('/new_arrival_products', 'call', {}).then(function(data) { + self.products = data[0]; + self.categories = data[1]; + self.website_id = data[2]; + self.unique_id = data[3] + }); + }, + /** + * Render the widget with the fetched data. + */ + start: function() { + var self = this; + var products = this.products; + var categories = this.categories; + var current_website_id = this.website_id; + var unique_id = this.unique_id; + var products_list = []; + var best_seller = []; + $(document).ready(function () { + $(".top_selling").owlCarousel({ + items: 4, + loop: true, + margin: 20, + stagePadding: 0, + smartSpeed: 450, + autoplay: false, + autoPlaySpeed: 3000, + autoPlayTimeout: 1000, + autoplayHoverPause: true, + dots: false, + responsive: { + 0: { + items: 1, + nav: true + }, + 400: { + items: 2, + nav: false + }, + 1000: { + items: 4, + nav: true, + loop: true, + margin: 0 + } + }, + nav: true, + navText: [ + "", + "", + ], + }); + }); + for (var i = 0; i < products.length; i += 4) { + best_seller.push(products.slice(i, i + 4)); + } + if (best_seller.length > 1) { + best_seller[0].is_active = true; + best_seller.push('chunk'); + } + products_list.push({ + 'category': categories[0], + 'products': best_seller, + 'unique_id':unique_id, + }); + self.$el.find('#new_arrival_carousel').html( + Qweb.render('theme_eco_refine.new_product_arrival', { + products: products, + categories: categories[1], + current_website_id: current_website_id, + products_list: products_list + }) + ); + self.$('.top_selling').each(function() { + if (self.$(this).children().length === 0) { + self.$(this).remove(); + } + }); + self.$('.top').each(function() { + if (self.$(this).children().length === 0) { + self.$(this).remove(); + } + }); + } + }); + PublicWidget.registry.product_new_arrival_snippet = NewArrivalProducts; + return NewArrivalProducts; +}); diff --git a/theme_eco_refine/static/src/js/owl.carousel.js b/theme_eco_refine/static/src/js/owl.carousel.js new file mode 100755 index 000000000..025c77965 --- /dev/null +++ b/theme_eco_refine/static/src/js/owl.carousel.js @@ -0,0 +1,3010 @@ +/** + * Owl Carousel v2.3.4 + * Copyright 2013-2018 David Deutsch + * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE + */ +/** + * Owl carousel + * @version 2.3.4 + * @author Bartosz Wojciechowski + * @author David Deutsch + * @license The MIT License (MIT) + * @todo Lazy Load Icon + * @todo prevent animationend bubling + * @todo itemsScaleUp + * @todo Test Zepto + * @todo stagePadding calculate wrong active classes + */ +;(function($, window, document, undefined) { + /** + * Creates a carousel. + * @class The Owl Carousel. + * @public + * @param {HTMLElement|jQuery} element - The element to create the carousel for. + * @param {Object} [options] - The options + */ + function Owl(element, options) { + /** + * Current settings for the carousel. + * @public + */ + this.settings = null; + /** + * Current options set by the caller including defaults. + * @public + */ + this.options = $.extend({}, Owl.Defaults, options); + /** + * Plugin element. + * @public + */ + this.$element = $(element); + /** + * Proxied event handlers. + * @protected + */ + this._handlers = {}; + /** + * References to the running plugins of this carousel. + * @protected + */ + this._plugins = {}; + /** + * Currently suppressed events to prevent them from being retriggered. + * @protected + */ + this._supress = {}; + /** + * Absolute current position. + * @protected + */ + this._current = null; + /** + * Animation speed in milliseconds. + * @protected + */ + this._speed = null; + /** + * Coordinates of all items in pixel. + * @todo The name of this member is missleading. + * @protected + */ + this._coordinates = []; + /** + * Current breakpoint. + * @todo Real media queries would be nice. + * @protected + */ + this._breakpoint = null; + /** + * Current width of the plugin element. + */ + this._width = null; + /** + * All real items. + * @protected + */ + this._items = []; + /** + * All cloned items. + * @protected + */ + this._clones = []; + /** + * Merge values of all items. + * @todo Maybe this could be part of a plugin. + * @protected + */ + this._mergers = []; + /** + * Widths of all items. + */ + this._widths = []; + /** + * Invalidated parts within the update process. + * @protected + */ + this._invalidated = {}; + /** + * Ordered list of workers for the update process. + * @protected + */ + this._pipe = []; + /** + * Current state information for the drag operation. + * @todo #261 + * @protected + */ + this._drag = { + time: null, + target: null, + pointer: null, + stage: { + start: null, + current: null + }, + direction: null + }; + /** + * Current state information and their tags. + * @type {Object} + * @protected + */ + this._states = { + current: {}, + tags: { + 'initializing': [ 'busy' ], + 'animating': [ 'busy' ], + 'dragging': [ 'interacting' ] + } + }; + $.each([ 'onResize', 'onThrottledResize' ], $.proxy(function(i, handler) { + this._handlers[handler] = $.proxy(this[handler], this); + }, this)); + $.each(Owl.Plugins, $.proxy(function(key, plugin) { + this._plugins[key.charAt(0).toLowerCase() + key.slice(1)] + = new plugin(this); + }, this)); + $.each(Owl.Workers, $.proxy(function(priority, worker) { + this._pipe.push({ + 'filter': worker.filter, + 'run': $.proxy(worker.run, this) + }); + }, this)); + this.setup(); + this.initialize(); + } + /** + * Default options for the carousel. + * @public + */ + Owl.Defaults = { + items: 3, + loop: false, + center: false, + rewind: false, + checkVisibility: true, + mouseDrag: true, + touchDrag: true, + pullDrag: true, + freeDrag: false, + margin: 0, + stagePadding: 0, + merge: false, + mergeFit: true, + autoWidth: false, + startPosition: 0, + rtl: false, + smartSpeed: 250, + fluidSpeed: false, + dragEndSpeed: false, + responsive: {}, + responsiveRefreshRate: 200, + responsiveBaseElement: window, + fallbackEasing: 'swing', + slideTransition: '', + info: false, + nestedItemSelector: false, + itemElement: 'div', + stageElement: 'div', + refreshClass: 'owl-refresh', + loadedClass: 'owl-loaded', + loadingClass: 'owl-loading', + rtlClass: 'owl-rtl', + responsiveClass: 'owl-responsive', + dragClass: 'owl-drag', + itemClass: 'owl-item', + stageClass: 'owl-stage', + stageOuterClass: 'owl-stage-outer', + grabClass: 'owl-grab' + }; + /** + * Enumeration for width. + * @public + * @readonly + * @enum {String} + */ + Owl.Width = { + Default: 'default', + Inner: 'inner', + Outer: 'outer' + }; + /** + * Enumeration for types. + * @public + * @readonly + * @enum {String} + */ + Owl.Type = { + Event: 'event', + State: 'state' + }; + /** + * Contains all registered plugins. + * @public + */ + Owl.Plugins = {}; + /** + * List of workers involved in the update process. + */ + Owl.Workers = [ { + filter: [ 'width', 'settings' ], + run: function() { + this._width = this.$element.width(); + } + }, { + filter: [ 'width', 'items', 'settings' ], + run: function(cache) { + cache.current = this._items && this._items[this.relative(this._current)]; + } + }, { + filter: [ 'items', 'settings' ], + run: function() { + this.$stage.children('.cloned').remove(); + } + }, { + filter: [ 'width', 'items', 'settings' ], + run: function(cache) { + var margin = this.settings.margin || '', + grid = !this.settings.autoWidth, + rtl = this.settings.rtl, + css = { + 'width': 'auto', + 'margin-left': rtl ? margin : '', + 'margin-right': rtl ? '' : margin + }; + + !grid && this.$stage.children().css(css); + + cache.css = css; + } + }, { + filter: [ 'width', 'items', 'settings' ], + run: function(cache) { + var width = (this.width() / this.settings.items).toFixed(3) - this.settings.margin, + merge = null, + iterator = this._items.length, + grid = !this.settings.autoWidth, + widths = []; + cache.items = { + merge: false, + width: width + }; + while (iterator--) { + merge = this._mergers[iterator]; + merge = this.settings.mergeFit && Math.min(merge, this.settings.items) || merge; + cache.items.merge = merge > 1 || cache.items.merge; + widths[iterator] = !grid ? this._items[iterator].width() : width * merge; + } + this._widths = widths; + } + }, { + filter: [ 'items', 'settings' ], + run: function() { + var clones = [], + items = this._items, + settings = this.settings, + // TODO: Should be computed from number of min width items in stage + view = Math.max(settings.items * 2, 4), + size = Math.ceil(items.length / 2) * 2, + repeat = settings.loop && items.length ? settings.rewind ? view : Math.max(view, size) : 0, + append = '', + prepend = ''; + repeat /= 2; + while (repeat > 0) { + // Switch to only using appended clones + clones.push(this.normalize(clones.length / 2, true)); + append = append + items[clones[clones.length - 1]][0].outerHTML; + clones.push(this.normalize(items.length - 1 - (clones.length - 1) / 2, true)); + prepend = items[clones[clones.length - 1]][0].outerHTML + prepend; + repeat -= 1; + } + this._clones = clones; + $(append).addClass('cloned').appendTo(this.$stage); + $(prepend).addClass('cloned').prependTo(this.$stage); + } + }, { + filter: [ 'width', 'items', 'settings' ], + run: function() { + var rtl = this.settings.rtl ? 1 : -1, + size = this._clones.length + this._items.length, + iterator = -1, + previous = 0, + current = 0, + coordinates = []; + while (++iterator < size) { + previous = coordinates[iterator - 1] || 0; + current = this._widths[this.relative(iterator)] + this.settings.margin; + coordinates.push(previous + current * rtl); + } + this._coordinates = coordinates; + } + }, { + filter: [ 'width', 'items', 'settings' ], + run: function() { + var padding = this.settings.stagePadding, + coordinates = this._coordinates, + css = { + 'width': Math.ceil(Math.abs(coordinates[coordinates.length - 1])) + padding * 2, + 'padding-left': padding || '', + 'padding-right': padding || '' + }; + this.$stage.css(css); + } + }, { + filter: [ 'width', 'items', 'settings' ], + run: function(cache) { + var iterator = this._coordinates.length, + grid = !this.settings.autoWidth, + items = this.$stage.children(); + if (grid && cache.items.merge) { + while (iterator--) { + cache.css.width = this._widths[this.relative(iterator)]; + items.eq(iterator).css(cache.css); + } + } else if (grid) { + cache.css.width = cache.items.width; + items.css(cache.css); + } + } + }, { + filter: [ 'items' ], + run: function() { + this._coordinates.length < 1 && this.$stage.removeAttr('style'); + } + }, { + filter: [ 'width', 'items', 'settings' ], + run: function(cache) { + cache.current = cache.current ? this.$stage.children().index(cache.current) : 0; + cache.current = Math.max(this.minimum(), Math.min(this.maximum(), cache.current)); + this.reset(cache.current); + } + }, { + filter: [ 'position' ], + run: function() { + this.animate(this.coordinates(this._current)); + } + }, { + filter: [ 'width', 'position', 'items', 'settings' ], + run: function() { + var rtl = this.settings.rtl ? 1 : -1, + padding = this.settings.stagePadding * 2, + begin = this.coordinates(this.current()) + padding, + end = begin + this.width() * rtl, + inner, outer, matches = [], i, n; + for (i = 0, n = this._coordinates.length; i < n; i++) { + inner = this._coordinates[i - 1] || 0; + outer = Math.abs(this._coordinates[i]) + padding * rtl; + if ((this.op(inner, '<=', begin) && (this.op(inner, '>', end))) + || (this.op(outer, '<', begin) && this.op(outer, '>', end))) { + matches.push(i); + } + } + this.$stage.children('.active').removeClass('active'); + this.$stage.children(':eq(' + matches.join('), :eq(') + ')').addClass('active'); + this.$stage.children('.center').removeClass('center'); + if (this.settings.center) { + this.$stage.children().eq(this.current()).addClass('center'); + } + } + } ]; + /** + * Create the stage DOM element + */ + Owl.prototype.initializeStage = function() { + this.$stage = this.$element.find('.' + this.settings.stageClass); + // if the stage is already in the DOM, grab it and skip stage initialization + if (this.$stage.length) { + return; + } + this.$element.addClass(this.options.loadingClass); + // create stage + this.$stage = $('<' + this.settings.stageElement + '>', { + "class": this.settings.stageClass + }).wrap( $( '
', { + "class": this.settings.stageOuterClass + })); + // append stage + this.$element.append(this.$stage.parent()); + }; + /** + * Create item DOM elements + */ + Owl.prototype.initializeItems = function() { + var $items = this.$element.find('.owl-item'); + // if the items are already in the DOM, grab them and skip item initialization + if ($items.length) { + this._items = $items.get().map(function(item) { + return $(item); + }); + this._mergers = this._items.map(function() { + return 1; + }); + this.refresh(); + return; + } + // append content + this.replace(this.$element.children().not(this.$stage.parent())); + // check visibility + if (this.isVisible()) { + // update view + this.refresh(); + } else { + // invalidate width + this.invalidate('width'); + } + this.$element + .removeClass(this.options.loadingClass) + .addClass(this.options.loadedClass); + }; + /** + * Initializes the carousel. + * @protected + */ + Owl.prototype.initialize = function() { + this.enter('initializing'); + this.trigger('initialize'); + this.$element.toggleClass(this.settings.rtlClass, this.settings.rtl); + if (this.settings.autoWidth && !this.is('pre-loading')) { + var imgs, nestedSelector, width; + imgs = this.$element.find('img'); + nestedSelector = this.settings.nestedItemSelector ? '.' + this.settings.nestedItemSelector : undefined; + width = this.$element.children(nestedSelector).width(); + if (imgs.length && width <= 0) { + this.preloadAutoWidthImages(imgs); + } + } + this.initializeStage(); + this.initializeItems(); + // register event handlers + this.registerEventHandlers(); + this.leave('initializing'); + this.trigger('initialized'); + }; + /** + * @returns {Boolean} visibility of $element + * if you know the carousel will always be visible you can set `checkVisibility` to `false` to + * prevent the expensive browser layout forced reflow the $element.is(':visible') does + */ + Owl.prototype.isVisible = function() { + return this.settings.checkVisibility + ? this.$element.is(':visible') + : true; + }; + /** + * Setups the current settings. + * @todo Remove responsive classes. Why should adaptive designs be brought into IE8? + * @todo Support for media queries by using `matchMedia` would be nice. + * @public + */ + Owl.prototype.setup = function() { + var viewport = this.viewport(), + overwrites = this.options.responsive, + match = -1, + settings = null; + if (!overwrites) { + settings = $.extend({}, this.options); + } else { + $.each(overwrites, function(breakpoint) { + if (breakpoint <= viewport && breakpoint > match) { + match = Number(breakpoint); + } + }); + settings = $.extend({}, this.options, overwrites[match]); + if (typeof settings.stagePadding === 'function') { + settings.stagePadding = settings.stagePadding(); + } + delete settings.responsive; + // responsive class + if (settings.responsiveClass) { + this.$element.attr('class', + this.$element.attr('class').replace(new RegExp('(' + this.options.responsiveClass + '-)\\S+\\s', 'g'), '$1' + match) + ); + } + } + this.trigger('change', { property: { name: 'settings', value: settings } }); + this._breakpoint = match; + this.settings = settings; + this.invalidate('settings'); + this.trigger('changed', { property: { name: 'settings', value: this.settings } }); + }; + /** + * Updates option logic if necessery. + * @protected + */ + Owl.prototype.optionsLogic = function() { + if (this.settings.autoWidth) { + this.settings.stagePadding = false; + this.settings.merge = false; + } + }; + /** + * Prepares an item before add. + * @todo Rename event parameter `content` to `item`. + * @protected + * @returns {jQuery|HTMLElement} - The item container. + */ + Owl.prototype.prepare = function(item) { + var event = this.trigger('prepare', { content: item }); + + if (!event.data) { + event.data = $('<' + this.settings.itemElement + '/>') + .addClass(this.options.itemClass).append(item) + } + this.trigger('prepared', { content: event.data }); + return event.data; + }; + /** + * Updates the view. + * @public + */ + Owl.prototype.update = function() { + var i = 0, + n = this._pipe.length, + filter = $.proxy(function(p) { return this[p] }, this._invalidated), + cache = {}; + while (i < n) { + if (this._invalidated.all || $.grep(this._pipe[i].filter, filter).length > 0) { + this._pipe[i].run(cache); + } + i++; + } + this._invalidated = {}; + !this.is('valid') && this.enter('valid'); + }; + /** + * Gets the width of the view. + * @public + * @param {Owl.Width} [dimension=Owl.Width.Default] - The dimension to return. + * @returns {Number} - The width of the view in pixel. + */ + Owl.prototype.width = function(dimension) { + dimension = dimension || Owl.Width.Default; + switch (dimension) { + case Owl.Width.Inner: + case Owl.Width.Outer: + return this._width; + default: + return this._width - this.settings.stagePadding * 2 + this.settings.margin; + } + }; + /** + * Refreshes the carousel primarily for adaptive purposes. + * @public + */ + Owl.prototype.refresh = function() { + this.enter('refreshing'); + this.trigger('refresh'); + this.setup(); + this.optionsLogic(); + this.$element.addClass(this.options.refreshClass); + this.update(); + this.$element.removeClass(this.options.refreshClass); + this.leave('refreshing'); + this.trigger('refreshed'); + }; + /** + * Checks window `resize` event. + * @protected + */ + Owl.prototype.onThrottledResize = function() { + window.clearTimeout(this.resizeTimer); + this.resizeTimer = window.setTimeout(this._handlers.onResize, this.settings.responsiveRefreshRate); + }; + /** + * Checks window `resize` event. + * @protected + */ + Owl.prototype.onResize = function() { + if (!this._items.length) { + return false; + } + if (this._width === this.$element.width()) { + return false; + } + if (!this.isVisible()) { + return false; + } + this.enter('resizing'); + if (this.trigger('resize').isDefaultPrevented()) { + this.leave('resizing'); + return false; + } + this.invalidate('width'); + this.refresh(); + this.leave('resizing'); + this.trigger('resized'); + }; + /** + * Registers event handlers. + * @todo Check `msPointerEnabled` + * @todo #261 + * @protected + */ + Owl.prototype.registerEventHandlers = function() { + if ($.support.transition) { + this.$stage.on($.support.transition.end + '.owl.core', $.proxy(this.onTransitionEnd, this)); + } + if (this.settings.responsive !== false) { + this.on(window, 'resize', this._handlers.onThrottledResize); + } + if (this.settings.mouseDrag) { + this.$element.addClass(this.options.dragClass); + this.$stage.on('mousedown.owl.core', $.proxy(this.onDragStart, this)); + this.$stage.on('dragstart.owl.core selectstart.owl.core', function() { return false }); + } + if (this.settings.touchDrag){ + this.$stage.on('touchstart.owl.core', $.proxy(this.onDragStart, this)); + this.$stage.on('touchcancel.owl.core', $.proxy(this.onDragEnd, this)); + } + }; + /** + * Handles `touchstart` and `mousedown` events. + * @todo Horizontal swipe threshold as option + * @todo #261 + * @protected + * @param {Event} event - The event arguments. + */ + Owl.prototype.onDragStart = function(event) { + var stage = null; + if (event.which === 3) { + return; + } + if ($.support.transform) { + stage = this.$stage.css('transform').replace(/.*\(|\)| /g, '').split(','); + stage = { + x: stage[stage.length === 16 ? 12 : 4], + y: stage[stage.length === 16 ? 13 : 5] + }; + } else { + stage = this.$stage.position(); + stage = { + x: this.settings.rtl ? + stage.left + this.$stage.width() - this.width() + this.settings.margin : + stage.left, + y: stage.top + }; + } + if (this.is('animating')) { + $.support.transform ? this.animate(stage.x) : this.$stage.stop() + this.invalidate('position'); + } + this.$element.toggleClass(this.options.grabClass, event.type === 'mousedown'); + this.speed(0); + this._drag.time = new Date().getTime(); + this._drag.target = $(event.target); + this._drag.stage.start = stage; + this._drag.stage.current = stage; + this._drag.pointer = this.pointer(event); + $(document).on('mouseup.owl.core touchend.owl.core', $.proxy(this.onDragEnd, this)); + $(document).one('mousemove.owl.core touchmove.owl.core', $.proxy(function(event) { + var delta = this.difference(this._drag.pointer, this.pointer(event)); + $(document).on('mousemove.owl.core touchmove.owl.core', $.proxy(this.onDragMove, this)); + if (Math.abs(delta.x) < Math.abs(delta.y) && this.is('valid')) { + return; + } + event.preventDefault(); + this.enter('dragging'); + this.trigger('drag'); + }, this)); + }; + /** + * Handles the `touchmove` and `mousemove` events. + * @todo #261 + * @protected + * @param {Event} event - The event arguments. + */ + Owl.prototype.onDragMove = function(event) { + var minimum = null, + maximum = null, + pull = null, + delta = this.difference(this._drag.pointer, this.pointer(event)), + stage = this.difference(this._drag.stage.start, delta); + if (!this.is('dragging')) { + return; + } + event.preventDefault(); + if (this.settings.loop) { + minimum = this.coordinates(this.minimum()); + maximum = this.coordinates(this.maximum() + 1) - minimum; + stage.x = (((stage.x - minimum) % maximum + maximum) % maximum) + minimum; + } else { + minimum = this.settings.rtl ? this.coordinates(this.maximum()) : this.coordinates(this.minimum()); + maximum = this.settings.rtl ? this.coordinates(this.minimum()) : this.coordinates(this.maximum()); + pull = this.settings.pullDrag ? -1 * delta.x / 5 : 0; + stage.x = Math.max(Math.min(stage.x, minimum + pull), maximum + pull); + } + this._drag.stage.current = stage; + this.animate(stage.x); + }; + /** + * Handles the `touchend` and `mouseup` events. + * @todo #261 + * @todo Threshold for click event + * @protected + * @param {Event} event - The event arguments. + */ + Owl.prototype.onDragEnd = function(event) { + var delta = this.difference(this._drag.pointer, this.pointer(event)), + stage = this._drag.stage.current, + direction = delta.x > 0 ^ this.settings.rtl ? 'left' : 'right'; + $(document).off('.owl.core'); + this.$element.removeClass(this.options.grabClass); + if (delta.x !== 0 && this.is('dragging') || !this.is('valid')) { + this.speed(this.settings.dragEndSpeed || this.settings.smartSpeed); + this.current(this.closest(stage.x, delta.x !== 0 ? direction : this._drag.direction)); + this.invalidate('position'); + this.update(); + this._drag.direction = direction; + if (Math.abs(delta.x) > 3 || new Date().getTime() - this._drag.time > 300) { + this._drag.target.one('click.owl.core', function() { return false; }); + } + } + if (!this.is('dragging')) { + return; + } + this.leave('dragging'); + this.trigger('dragged'); + }; + /** + * Gets absolute position of the closest item for a coordinate. + * @todo Setting `freeDrag` makes `closest` not reusable. See #165. + * @protected + * @param {Number} coordinate - The coordinate in pixel. + * @param {String} direction - The direction to check for the closest item. Ether `left` or `right`. + * @return {Number} - The absolute position of the closest item. + */ + Owl.prototype.closest = function(coordinate, direction) { + var position = -1, + pull = 30, + width = this.width(), + coordinates = this.coordinates(); + if (!this.settings.freeDrag) { + // check closest item + $.each(coordinates, $.proxy(function(index, value) { + // on a left pull, check on current index + if (direction === 'left' && coordinate > value - pull && coordinate < value + pull) { + position = index; + // on a right pull, check on previous index + // to do so, subtract width from value and set position = index + 1 + } else if (direction === 'right' && coordinate > value - width - pull && coordinate < value - width + pull) { + position = index + 1; + } else if (this.op(coordinate, '<', value) + && this.op(coordinate, '>', coordinates[index + 1] !== undefined ? coordinates[index + 1] : value - width)) { + position = direction === 'left' ? index + 1 : index; + } + return position === -1; + }, this)); + } + if (!this.settings.loop) { + // non loop boundries + if (this.op(coordinate, '>', coordinates[this.minimum()])) { + position = coordinate = this.minimum(); + } else if (this.op(coordinate, '<', coordinates[this.maximum()])) { + position = coordinate = this.maximum(); + } + } + return position; + }; + /** + * Animates the stage. + * @todo #270 + * @public + * @param {Number} coordinate - The coordinate in pixels. + */ + Owl.prototype.animate = function(coordinate) { + var animate = this.speed() > 0; + this.is('animating') && this.onTransitionEnd(); + if (animate) { + this.enter('animating'); + this.trigger('translate'); + } + if ($.support.transform3d && $.support.transition) { + this.$stage.css({ + transform: 'translate3d(' + coordinate + 'px,0px,0px)', + transition: (this.speed() / 1000) + 's' + ( + this.settings.slideTransition ? ' ' + this.settings.slideTransition : '' + ) + }); + } else if (animate) { + this.$stage.animate({ + left: coordinate + 'px' + }, this.speed(), this.settings.fallbackEasing, $.proxy(this.onTransitionEnd, this)); + } else { + this.$stage.css({ + left: coordinate + 'px' + }); + } + }; + /** + * Checks whether the carousel is in a specific state or not. + * @param {String} state - The state to check. + * @returns {Boolean} - The flag which indicates if the carousel is busy. + */ + Owl.prototype.is = function(state) { + return this._states.current[state] && this._states.current[state] > 0; + }; + /** + * Sets the absolute position of the current item. + * @public + * @param {Number} [position] - The new absolute position or nothing to leave it unchanged. + * @returns {Number} - The absolute position of the current item. + */ + Owl.prototype.current = function(position) { + if (position === undefined) { + return this._current; + } + if (this._items.length === 0) { + return undefined; + } + position = this.normalize(position); + if (this._current !== position) { + var event = this.trigger('change', { property: { name: 'position', value: position } }); + if (event.data !== undefined) { + position = this.normalize(event.data); + } + this._current = position; + this.invalidate('position'); + this.trigger('changed', { property: { name: 'position', value: this._current } }); + } + return this._current; + }; + /** + * Invalidates the given part of the update routine. + * @param {String} [part] - The part to invalidate. + * @returns {Array.} - The invalidated parts. + */ + Owl.prototype.invalidate = function(part) { + if ($.type(part) === 'string') { + this._invalidated[part] = true; + this.is('valid') && this.leave('valid'); + } + return $.map(this._invalidated, function(v, i) { return i }); + }; + /** + * Resets the absolute position of the current item. + * @public + * @param {Number} position - The absolute position of the new item. + */ + Owl.prototype.reset = function(position) { + position = this.normalize(position); + if (position === undefined) { + return; + } + this._speed = 0; + this._current = position; + this.suppress([ 'translate', 'translated' ]); + this.animate(this.coordinates(position)); + this.release([ 'translate', 'translated' ]); + }; + /** + * Normalizes an absolute or a relative position of an item. + * @public + * @param {Number} position - The absolute or relative position to normalize. + * @param {Boolean} [relative=false] - Whether the given position is relative or not. + * @returns {Number} - The normalized position. + */ + Owl.prototype.normalize = function(position, relative) { + var n = this._items.length, + m = relative ? 0 : this._clones.length; + if (!this.isNumeric(position) || n < 1) { + position = undefined; + } else if (position < 0 || position >= n + m) { + position = ((position - m / 2) % n + n) % n + m / 2; + } + return position; + }; + /** + * Converts an absolute position of an item into a relative one. + * @public + * @param {Number} position - The absolute position to convert. + * @returns {Number} - The converted position. + */ + Owl.prototype.relative = function(position) { + position -= this._clones.length / 2; + return this.normalize(position, true); + }; + /** + * Gets the maximum position for the current item. + * @public + * @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position. + * @returns {Number} + */ + Owl.prototype.maximum = function(relative) { + var settings = this.settings, + maximum = this._coordinates.length, + iterator, + reciprocalItemsWidth, + elementWidth; + if (settings.loop) { + maximum = this._clones.length / 2 + this._items.length - 1; + } else if (settings.autoWidth || settings.merge) { + iterator = this._items.length; + if (iterator) { + reciprocalItemsWidth = this._items[--iterator].width(); + elementWidth = this.$element.width(); + while (iterator--) { + reciprocalItemsWidth += this._items[iterator].width() + this.settings.margin; + if (reciprocalItemsWidth > elementWidth) { + break; + } + } + } + maximum = iterator + 1; + } else if (settings.center) { + maximum = this._items.length - 1; + } else { + maximum = this._items.length - settings.items; + } + if (relative) { + maximum -= this._clones.length / 2; + } + return Math.max(maximum, 0); + }; + /** + * Gets the minimum position for the current item. + * @public + * @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position. + * @returns {Number} + */ + Owl.prototype.minimum = function(relative) { + return relative ? 0 : this._clones.length / 2; + }; + /** + * Gets an item at the specified relative position. + * @public + * @param {Number} [position] - The relative position of the item. + * @return {jQuery|Array.} - The item at the given position or all items if no position was given. + */ + Owl.prototype.items = function(position) { + if (position === undefined) { + return this._items.slice(); + } + position = this.normalize(position, true); + return this._items[position]; + }; + /** + * Gets an item at the specified relative position. + * @public + * @param {Number} [position] - The relative position of the item. + * @return {jQuery|Array.} - The item at the given position or all items if no position was given. + */ + Owl.prototype.mergers = function(position) { + if (position === undefined) { + return this._mergers.slice(); + } + position = this.normalize(position, true); + return this._mergers[position]; + }; + /** + * Gets the absolute positions of clones for an item. + * @public + * @param {Number} [position] - The relative position of the item. + * @returns {Array.} - The absolute positions of clones for the item or all if no position was given. + */ + Owl.prototype.clones = function(position) { + var odd = this._clones.length / 2, + even = odd + this._items.length, + map = function(index) { return index % 2 === 0 ? even + index / 2 : odd - (index + 1) / 2 }; + if (position === undefined) { + return $.map(this._clones, function(v, i) { return map(i) }); + } + return $.map(this._clones, function(v, i) { return v === position ? map(i) : null }); + }; + /** + * Sets the current animation speed. + * @public + * @param {Number} [speed] - The animation speed in milliseconds or nothing to leave it unchanged. + * @returns {Number} - The current animation speed in milliseconds. + */ + Owl.prototype.speed = function(speed) { + if (speed !== undefined) { + this._speed = speed; + } + return this._speed; + }; + /** + * Gets the coordinate of an item. + * @todo The name of this method is missleanding. + * @public + * @param {Number} position - The absolute position of the item within `minimum()` and `maximum()`. + * @returns {Number|Array.} - The coordinate of the item in pixel or all coordinates. + */ + Owl.prototype.coordinates = function(position) { + var multiplier = 1, + newPosition = position - 1, + coordinate; + if (position === undefined) { + return $.map(this._coordinates, $.proxy(function(coordinate, index) { + return this.coordinates(index); + }, this)); + } + if (this.settings.center) { + if (this.settings.rtl) { + multiplier = -1; + newPosition = position + 1; + } + coordinate = this._coordinates[position]; + coordinate += (this.width() - coordinate + (this._coordinates[newPosition] || 0)) / 2 * multiplier; + } else { + coordinate = this._coordinates[newPosition] || 0; + } + coordinate = Math.ceil(coordinate); + return coordinate; + }; + /** + * Calculates the speed for a translation. + * @protected + * @param {Number} from - The absolute position of the start item. + * @param {Number} to - The absolute position of the target item. + * @param {Number} [factor=undefined] - The time factor in milliseconds. + * @returns {Number} - The time in milliseconds for the translation. + */ + Owl.prototype.duration = function(from, to, factor) { + if (factor === 0) { + return 0; + } + return Math.min(Math.max(Math.abs(to - from), 1), 6) * Math.abs((factor || this.settings.smartSpeed)); + }; + /** + * Slides to the specified item. + * @public + * @param {Number} position - The position of the item. + * @param {Number} [speed] - The time in milliseconds for the transition. + */ + Owl.prototype.to = function(position, speed) { + var current = this.current(), + revert = null, + distance = position - this.relative(current), + direction = (distance > 0) - (distance < 0), + items = this._items.length, + minimum = this.minimum(), + maximum = this.maximum(); + if (this.settings.loop) { + if (!this.settings.rewind && Math.abs(distance) > items / 2) { + distance += direction * -1 * items; + } + position = current + distance; + revert = ((position - minimum) % items + items) % items + minimum; + if (revert !== position && revert - distance <= maximum && revert - distance > 0) { + current = revert - distance; + position = revert; + this.reset(current); + } + } else if (this.settings.rewind) { + maximum += 1; + position = (position % maximum + maximum) % maximum; + } else { + position = Math.max(minimum, Math.min(maximum, position)); + } + this.speed(this.duration(current, position, speed)); + this.current(position); + if (this.isVisible()) { + this.update(); + } + }; + /** + * Slides to the next item. + * @public + * @param {Number} [speed] - The time in milliseconds for the transition. + */ + Owl.prototype.next = function(speed) { + speed = speed || false; + this.to(this.relative(this.current()) + 1, speed); + }; + /** + * Slides to the previous item. + * @public + * @param {Number} [speed] - The time in milliseconds for the transition. + */ + Owl.prototype.prev = function(speed) { + speed = speed || false; + this.to(this.relative(this.current()) - 1, speed); + }; + /** + * Handles the end of an animation. + * @protected + * @param {Event} event - The event arguments. + */ + Owl.prototype.onTransitionEnd = function(event) { + // if css2 animation then event object is undefined + if (event !== undefined) { + event.stopPropagation(); + + // Catch only owl-stage transitionEnd event + if ((event.target || event.srcElement || event.originalTarget) !== this.$stage.get(0)) { + return false; + } + } + this.leave('animating'); + this.trigger('translated'); + }; + /** + * Gets viewport width. + * @protected + * @return {Number} - The width in pixel. + */ + Owl.prototype.viewport = function() { + var width; + if (this.options.responsiveBaseElement !== window) { + width = $(this.options.responsiveBaseElement).width(); + } else if (window.innerWidth) { + width = window.innerWidth; + } else if (document.documentElement && document.documentElement.clientWidth) { + width = document.documentElement.clientWidth; + } else { + console.warn('Can not detect viewport width.'); + } + return width; + }; + /** + * Replaces the current content. + * @public + * @param {HTMLElement|jQuery|String} content - The new content. + */ + Owl.prototype.replace = function(content) { + this.$stage.empty(); + this._items = []; + if (content) { + content = (content instanceof jQuery) ? content : $(content); + } + + if (this.settings.nestedItemSelector) { + content = content.find('.' + this.settings.nestedItemSelector); + } + + content.filter(function() { + return this.nodeType === 1; + }).each($.proxy(function(index, item) { + item = this.prepare(item); + this.$stage.append(item); + this._items.push(item); + this._mergers.push(item.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1); + }, this)); + this.reset(this.isNumeric(this.settings.startPosition) ? this.settings.startPosition : 0); + this.invalidate('items'); + }; + /** + * Adds an item. + * @todo Use `item` instead of `content` for the event arguments. + * @public + * @param {HTMLElement|jQuery|String} content - The item content to add. + * @param {Number} [position] - The relative position at which to insert the item otherwise the item will be added to the end. + */ + Owl.prototype.add = function(content, position) { + var current = this.relative(this._current); + position = position === undefined ? this._items.length : this.normalize(position, true); + content = content instanceof jQuery ? content : $(content); + this.trigger('add', { content: content, position: position }); + content = this.prepare(content); + if (this._items.length === 0 || position === this._items.length) { + this._items.length === 0 && this.$stage.append(content); + this._items.length !== 0 && this._items[position - 1].after(content); + this._items.push(content); + this._mergers.push(content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1); + } else { + this._items[position].before(content); + this._items.splice(position, 0, content); + this._mergers.splice(position, 0, content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1); + } + this._items[current] && this.reset(this._items[current].index()); + this.invalidate('items'); + this.trigger('added', { content: content, position: position }); + }; + /** + * Removes an item by its position. + * @todo Use `item` instead of `content` for the event arguments. + * @public + * @param {Number} position - The relative position of the item to remove. + */ + Owl.prototype.remove = function(position) { + position = this.normalize(position, true); + if (position === undefined) { + return; + } + this.trigger('remove', { content: this._items[position], position: position }); + this._items[position].remove(); + this._items.splice(position, 1); + this._mergers.splice(position, 1); + this.invalidate('items'); + this.trigger('removed', { content: null, position: position }); + }; + /** + * Preloads images with auto width. + * @todo Replace by a more generic approach + * @protected + */ + Owl.prototype.preloadAutoWidthImages = function(images) { + images.each($.proxy(function(i, element) { + this.enter('pre-loading'); + element = $(element); + $(new Image()).one('load', $.proxy(function(e) { + element.attr('src', e.target.src); + element.css('opacity', 1); + this.leave('pre-loading'); + !this.is('pre-loading') && !this.is('initializing') && this.refresh(); + }, this)).attr('src', element.attr('src') || element.attr('data-src') || element.attr('data-src-retina')); + }, this)); + }; + /** + * Destroys the carousel. + * @public + */ + Owl.prototype.destroy = function() { + this.$element.off('.owl.core'); + this.$stage.off('.owl.core'); + $(document).off('.owl.core'); + if (this.settings.responsive !== false) { + window.clearTimeout(this.resizeTimer); + this.off(window, 'resize', this._handlers.onThrottledResize); + } + for (var i in this._plugins) { + this._plugins[i].destroy(); + } + this.$stage.children('.cloned').remove(); + this.$stage.unwrap(); + this.$stage.children().contents().unwrap(); + this.$stage.children().unwrap(); + this.$stage.remove(); + this.$element + .removeClass(this.options.refreshClass) + .removeClass(this.options.loadingClass) + .removeClass(this.options.loadedClass) + .removeClass(this.options.rtlClass) + .removeClass(this.options.dragClass) + .removeClass(this.options.grabClass) + .attr('class', this.$element.attr('class').replace(new RegExp(this.options.responsiveClass + '-\\S+\\s', 'g'), '')) + .removeData('owl.carousel'); + }; + + /** + * Operators to calculate right-to-left and left-to-right. + * @protected + * @param {Number} [a] - The left side operand. + * @param {String} [o] - The operator. + * @param {Number} [b] - The right side operand. + */ + Owl.prototype.op = function(a, o, b) { + var rtl = this.settings.rtl; + switch (o) { + case '<': + return rtl ? a > b : a < b; + case '>': + return rtl ? a < b : a > b; + case '>=': + return rtl ? a <= b : a >= b; + case '<=': + return rtl ? a >= b : a <= b; + default: + break; + } + }; + + /** + * Attaches to an internal event. + * @protected + * @param {HTMLElement} element - The event source. + * @param {String} event - The event name. + * @param {Function} listener - The event handler to attach. + * @param {Boolean} capture - Wether the event should be handled at the capturing phase or not. + */ + Owl.prototype.on = function(element, event, listener, capture) { + if (element.addEventListener) { + element.addEventListener(event, listener, capture); + } else if (element.attachEvent) { + element.attachEvent('on' + event, listener); + } + }; + /** + * Detaches from an internal event. + * @protected + * @param {HTMLElement} element - The event source. + * @param {String} event - The event name. + * @param {Function} listener - The attached event handler to detach. + * @param {Boolean} capture - Wether the attached event handler was registered as a capturing listener or not. + */ + Owl.prototype.off = function(element, event, listener, capture) { + if (element.removeEventListener) { + element.removeEventListener(event, listener, capture); + } else if (element.detachEvent) { + element.detachEvent('on' + event, listener); + } + }; + /** + * Triggers a public event. + * @todo Remove `status`, `relatedTarget` should be used instead. + * @protected + * @param {String} name - The event name. + * @param {*} [data=null] - The event data. + * @param {String} [namespace=carousel] - The event namespace. + * @param {String} [state] - The state which is associated with the event. + * @param {Boolean} [enter=false] - Indicates if the call enters the specified state or not. + * @returns {Event} - The event arguments. + */ + Owl.prototype.trigger = function(name, data, namespace, state, enter) { + var status = { + item: { count: this._items.length, index: this.current() } + }, handler = $.camelCase( + $.grep([ 'on', name, namespace ], function(v) { return v }) + .join('-').toLowerCase() + ), event = $.Event( + [ name, 'owl', namespace || 'carousel' ].join('.').toLowerCase(), + $.extend({ relatedTarget: this }, status, data) + ); + if (!this._supress[name]) { + $.each(this._plugins, function(name, plugin) { + if (plugin.onTrigger) { + plugin.onTrigger(event); + } + }); + this.register({ type: Owl.Type.Event, name: name }); + this.$element.trigger(event); + + if (this.settings && typeof this.settings[handler] === 'function') { + this.settings[handler].call(this, event); + } + } + return event; + }; + + /** + * Enters a state. + * @param name - The state name. + */ + Owl.prototype.enter = function(name) { + $.each([ name ].concat(this._states.tags[name] || []), $.proxy(function(i, name) { + if (this._states.current[name] === undefined) { + this._states.current[name] = 0; + } + + this._states.current[name]++; + }, this)); + }; + + /** + * Leaves a state. + * @param name - The state name. + */ + Owl.prototype.leave = function(name) { + $.each([ name ].concat(this._states.tags[name] || []), $.proxy(function(i, name) { + this._states.current[name]--; + }, this)); + }; + /** + * Registers an event or state. + * @public + * @param {Object} object - The event or state to register. + */ + Owl.prototype.register = function(object) { + if (object.type === Owl.Type.Event) { + if (!$.event.special[object.name]) { + $.event.special[object.name] = {}; + } + if (!$.event.special[object.name].owl) { + var _default = $.event.special[object.name]._default; + $.event.special[object.name]._default = function(e) { + if (_default && _default.apply && (!e.namespace || e.namespace.indexOf('owl') === -1)) { + return _default.apply(this, arguments); + } + return e.namespace && e.namespace.indexOf('owl') > -1; + }; + $.event.special[object.name].owl = true; + } + } else if (object.type === Owl.Type.State) { + if (!this._states.tags[object.name]) { + this._states.tags[object.name] = object.tags; + } else { + this._states.tags[object.name] = this._states.tags[object.name].concat(object.tags); + } + + this._states.tags[object.name] = $.grep(this._states.tags[object.name], $.proxy(function(tag, i) { + return $.inArray(tag, this._states.tags[object.name]) === i; + }, this)); + } + }; + /** + * Suppresses events. + * @protected + * @param {Array.} events - The events to suppress. + */ + Owl.prototype.suppress = function(events) { + $.each(events, $.proxy(function(index, event) { + this._supress[event] = true; + }, this)); + }; + /** + * Releases suppressed events. + * @protected + * @param {Array.} events - The events to release. + */ + Owl.prototype.release = function(events) { + $.each(events, $.proxy(function(index, event) { + delete this._supress[event]; + }, this)); + }; + /** + * Gets unified pointer coordinates from event. + * @todo #261 + * @protected + * @param {Event} - The `mousedown` or `touchstart` event. + * @returns {Object} - Contains `x` and `y` coordinates of current pointer position. + */ + Owl.prototype.pointer = function(event) { + var result = { x: null, y: null }; + event = event.originalEvent || event || window.event; + event = event.touches && event.touches.length ? + event.touches[0] : event.changedTouches && event.changedTouches.length ? + event.changedTouches[0] : event; + if (event.pageX) { + result.x = event.pageX; + result.y = event.pageY; + } else { + result.x = event.clientX; + result.y = event.clientY; + } + return result; + }; + /** + * Determines if the input is a Number or something that can be coerced to a Number + * @protected + * @param {Number|String|Object|Array|Boolean|RegExp|Function|Symbol} - The input to be tested + * @returns {Boolean} - An indication if the input is a Number or can be coerced to a Number + */ + Owl.prototype.isNumeric = function(number) { + return !isNaN(parseFloat(number)); + }; + /** + * Gets the difference of two vectors. + * @todo #261 + * @protected + * @param {Object} - The first vector. + * @param {Object} - The second vector. + * @returns {Object} - The difference. + */ + Owl.prototype.difference = function(first, second) { + return { + x: first.x - second.x, + y: first.y - second.y + }; + }; + /** + * The jQuery Plugin for the Owl Carousel + * @todo Navigation plugin `next` and `prev` + * @public + */ + $.fn.owlCarousel = function(option) { + var args = Array.prototype.slice.call(arguments, 1); + return this.each(function() { + var $this = $(this), + data = $this.data('owl.carousel'); + if (!data) { + data = new Owl(this, typeof option == 'object' && option); + $this.data('owl.carousel', data); + $.each([ + 'next', 'prev', 'to', 'destroy', 'refresh', 'replace', 'add', 'remove' + ], function(i, event) { + data.register({ type: Owl.Type.Event, name: event }); + data.$element.on(event + '.owl.carousel.core', $.proxy(function(e) { + if (e.namespace && e.relatedTarget !== this) { + this.suppress([ event ]); + data[event].apply(this, [].slice.call(arguments, 1)); + this.release([ event ]); + } + }, data)); + }); + } + if (typeof option == 'string' && option.charAt(0) !== '_') { + data[option].apply(data, args); + } + }); + }; + /** + * The constructor for the jQuery Plugin + * @public + */ + $.fn.owlCarousel.Constructor = Owl; +})(window.Zepto || window.jQuery, window, document); + +/** + * AutoRefresh Plugin + * @version 2.3.4 + * @author Artus Kolanowski + * @author David Deutsch + * @license The MIT License (MIT) + */ +;(function($, window, document, undefined) { + /** + * Creates the auto refresh plugin. + * @class The Auto Refresh Plugin + * @param {Owl} carousel - The Owl Carousel + */ + var AutoRefresh = function(carousel) { + /** + * Reference to the core. + * @protected + * @type {Owl} + */ + this._core = carousel; + /** + * Refresh interval. + * @protected + * @type {number} + */ + this._interval = null; + /** + * Whether the element is currently visible or not. + * @protected + * @type {Boolean} + */ + this._visible = null; + /** + * All event handlers. + * @protected + * @type {Object} + */ + this._handlers = { + 'initialized.owl.carousel': $.proxy(function(e) { + if (e.namespace && this._core.settings.autoRefresh) { + this.watch(); + } + }, this) + }; + // set default options + this._core.options = $.extend({}, AutoRefresh.Defaults, this._core.options); + + // register event handlers + this._core.$element.on(this._handlers); + }; + /** + * Default options. + * @public + */ + AutoRefresh.Defaults = { + autoRefresh: true, + autoRefreshInterval: 500 + }; + /** + * Watches the element. + */ + AutoRefresh.prototype.watch = function() { + if (this._interval) { + return; + } + + this._visible = this._core.isVisible(); + this._interval = window.setInterval($.proxy(this.refresh, this), this._core.settings.autoRefreshInterval); + }; + /** + * Refreshes the element. + */ + AutoRefresh.prototype.refresh = function() { + if (this._core.isVisible() === this._visible) { + return; + } + this._visible = !this._visible; + this._core.$element.toggleClass('owl-hidden', !this._visible); + this._visible && (this._core.invalidate('width') && this._core.refresh()); + }; + /** + * Destroys the plugin. + */ + AutoRefresh.prototype.destroy = function() { + var handler, property; + window.clearInterval(this._interval); + for (handler in this._handlers) { + this._core.$element.off(handler, this._handlers[handler]); + } + for (property in Object.getOwnPropertyNames(this)) { + typeof this[property] != 'function' && (this[property] = null); + } + }; + $.fn.owlCarousel.Constructor.Plugins.AutoRefresh = AutoRefresh; +})(window.Zepto || window.jQuery, window, document); +/** + * Lazy Plugin + * @version 2.3.4 + * @author Bartosz Wojciechowski + * @author David Deutsch + * @license The MIT License (MIT) + */ +;(function($, window, document, undefined) { + /** + * Creates the lazy plugin. + * @class The Lazy Plugin + * @param {Owl} carousel - The Owl Carousel + */ + var Lazy = function(carousel) { + /** + * Reference to the core. + * @protected + * @type {Owl} + */ + this._core = carousel; + /** + * Already loaded items. + * @protected + * @type {Array.} + */ + this._loaded = []; + /** + * Event handlers. + * @protected + * @type {Object} + */ + this._handlers = { + 'initialized.owl.carousel change.owl.carousel resized.owl.carousel': $.proxy(function(e) { + if (!e.namespace) { + return; + } + if (!this._core.settings || !this._core.settings.lazyLoad) { + return; + } + if ((e.property && e.property.name == 'position') || e.type == 'initialized') { + var settings = this._core.settings, + n = (settings.center && Math.ceil(settings.items / 2) || settings.items), + i = ((settings.center && n * -1) || 0), + position = (e.property && e.property.value !== undefined ? e.property.value : this._core.current()) + i, + clones = this._core.clones().length, + load = $.proxy(function(i, v) { this.load(v) }, this); + //TODO: Need documentation for this new option + if (settings.lazyLoadEager > 0) { + n += settings.lazyLoadEager; + // If the carousel is looping also preload images that are to the "left" + if (settings.loop) { + position -= settings.lazyLoadEager; + n++; + } + } + + while (i++ < n) { + this.load(clones / 2 + this._core.relative(position)); + clones && $.each(this._core.clones(this._core.relative(position)), load); + position++; + } + } + }, this) + }; + // set the default options + this._core.options = $.extend({}, Lazy.Defaults, this._core.options); + // register event handler + this._core.$element.on(this._handlers); + }; + /** + * Default options. + * @public + */ + Lazy.Defaults = { + lazyLoad: false, + lazyLoadEager: 0 + }; + /** + * Loads all resources of an item at the specified position. + * @param {Number} position - The absolute position of the item. + * @protected + */ + Lazy.prototype.load = function(position) { + var $item = this._core.$stage.children().eq(position), + $elements = $item && $item.find('.owl-lazy'); + + if (!$elements || $.inArray($item.get(0), this._loaded) > -1) { + return; + } + $elements.each($.proxy(function(index, element) { + var $element = $(element), image, + url = (window.devicePixelRatio > 1 && $element.attr('data-src-retina')) || $element.attr('data-src') || $element.attr('data-srcset'); + this._core.trigger('load', { element: $element, url: url }, 'lazy'); + if ($element.is('img')) { + $element.one('load.owl.lazy', $.proxy(function() { + $element.css('opacity', 1); + this._core.trigger('loaded', { element: $element, url: url }, 'lazy'); + }, this)).attr('src', url); + } else if ($element.is('source')) { + $element.one('load.owl.lazy', $.proxy(function() { + this._core.trigger('loaded', { element: $element, url: url }, 'lazy'); + }, this)).attr('srcset', url); + } else { + image = new Image(); + image.onload = $.proxy(function() { + $element.css({ + 'background-image': 'url("' + url + '")', + 'opacity': '1' + }); + this._core.trigger('loaded', { element: $element, url: url }, 'lazy'); + }, this); + image.src = url; + } + }, this)); + this._loaded.push($item.get(0)); + }; + + /** + * Destroys the plugin. + * @public + */ + Lazy.prototype.destroy = function() { + var handler, property; + for (handler in this.handlers) { + this._core.$element.off(handler, this.handlers[handler]); + } + for (property in Object.getOwnPropertyNames(this)) { + typeof this[property] != 'function' && (this[property] = null); + } + }; + $.fn.owlCarousel.Constructor.Plugins.Lazy = Lazy; +})(window.Zepto || window.jQuery, window, document); +/** + * AutoHeight Plugin + * @version 2.3.4 + * @author Bartosz Wojciechowski + * @author David Deutsch + * @license The MIT License (MIT) + */ +;(function($, window, document, undefined) { + /** + * Creates the auto height plugin. + * @class The Auto Height Plugin + * @param {Owl} carousel - The Owl Carousel + */ + var AutoHeight = function(carousel) { + /** + * Reference to the core. + * @protected + * @type {Owl} + */ + this._core = carousel; + this._previousHeight = null; + /** + * All event handlers. + * @protected + * @type {Object} + */ + this._handlers = { + 'initialized.owl.carousel refreshed.owl.carousel': $.proxy(function(e) { + if (e.namespace && this._core.settings.autoHeight) { + this.update(); + } + }, this), + 'changed.owl.carousel': $.proxy(function(e) { + if (e.namespace && this._core.settings.autoHeight && e.property.name === 'position'){ + this.update(); + } + }, this), + 'loaded.owl.lazy': $.proxy(function(e) { + if (e.namespace && this._core.settings.autoHeight + && e.element.closest('.' + this._core.settings.itemClass).index() === this._core.current()) { + this.update(); + } + }, this) + }; + // set default options + this._core.options = $.extend({}, AutoHeight.Defaults, this._core.options); + // register event handlers + this._core.$element.on(this._handlers); + this._intervalId = null; + var refThis = this; + // These changes have been taken from a PR by gavrochelegnou proposed in #1575 + // and have been made compatible with the latest jQuery version + $(window).on('load', function() { + if (refThis._core.settings.autoHeight) { + refThis.update(); + } + }); + // Autoresize the height of the carousel when window is resized + // When carousel has images, the height is dependent on the width + // and should also change on resize + $(window).resize(function() { + if (refThis._core.settings.autoHeight) { + if (refThis._intervalId != null) { + clearTimeout(refThis._intervalId); + } + + refThis._intervalId = setTimeout(function() { + refThis.update(); + }, 250); + } + }); + }; + + /** + * Default options. + * @public + */ + AutoHeight.Defaults = { + autoHeight: false, + autoHeightClass: 'owl-height' + }; + + /** + * Updates the view. + */ + AutoHeight.prototype.update = function() { + var start = this._core._current, + end = start + this._core.settings.items, + lazyLoadEnabled = this._core.settings.lazyLoad, + visible = this._core.$stage.children().toArray().slice(start, end), + heights = [], + maxheight = 0; + $.each(visible, function(index, item) { + heights.push($(item).height()); + }); + maxheight = Math.max.apply(null, heights); + if (maxheight <= 1 && lazyLoadEnabled && this._previousHeight) { + maxheight = this._previousHeight; + } + this._previousHeight = maxheight; + + this._core.$stage.parent() + .height(maxheight) + .addClass(this._core.settings.autoHeightClass); + }; + AutoHeight.prototype.destroy = function() { + var handler, property; + for (handler in this._handlers) { + this._core.$element.off(handler, this._handlers[handler]); + } + for (property in Object.getOwnPropertyNames(this)) { + typeof this[property] !== 'function' && (this[property] = null); + } + }; + $.fn.owlCarousel.Constructor.Plugins.AutoHeight = AutoHeight; +})(window.Zepto || window.jQuery, window, document); +/** + * Video Plugin + * @version 2.3.4 + * @author Bartosz Wojciechowski + * @author David Deutsch + * @license The MIT License (MIT) + */ +;(function($, window, document, undefined) { + /** + * Creates the video plugin. + * @class The Video Plugin + * @param {Owl} carousel - The Owl Carousel + */ + var Video = function(carousel) { + /** + * Reference to the core. + * @protected + * @type {Owl} + */ + this._core = carousel; + /** + * Cache all video URLs. + * @protected + * @type {Object} + */ + this._videos = {}; + /** + * Current playing item. + * @protected + * @type {jQuery} + */ + this._playing = null; + /** + * All event handlers. + * @todo The cloned content removale is too late + * @protected + * @type {Object} + */ + this._handlers = { + 'initialized.owl.carousel': $.proxy(function(e) { + if (e.namespace) { + this._core.register({ type: 'state', name: 'playing', tags: [ 'interacting' ] }); + } + }, this), + 'resize.owl.carousel': $.proxy(function(e) { + if (e.namespace && this._core.settings.video && this.isInFullScreen()) { + e.preventDefault(); + } + }, this), + 'refreshed.owl.carousel': $.proxy(function(e) { + if (e.namespace && this._core.is('resizing')) { + this._core.$stage.find('.cloned .owl-video-frame').remove(); + } + }, this), + 'changed.owl.carousel': $.proxy(function(e) { + if (e.namespace && e.property.name === 'position' && this._playing) { + this.stop(); + } + }, this), + 'prepared.owl.carousel': $.proxy(function(e) { + if (!e.namespace) { + return; + } + var $element = $(e.content).find('.owl-video'); + + if ($element.length) { + $element.css('display', 'none'); + this.fetch($element, $(e.content)); + } + }, this) + }; + // set default options + this._core.options = $.extend({}, Video.Defaults, this._core.options); + + // register event handlers + this._core.$element.on(this._handlers); + + this._core.$element.on('click.owl.video', '.owl-video-play-icon', $.proxy(function(e) { + this.play(e); + }, this)); + }; + /** + * Default options. + * @public + */ + Video.Defaults = { + video: false, + videoHeight: false, + videoWidth: false + }; + /** + * Gets the video ID and the type (YouTube/Vimeo/vzaar only). + * @protected + * @param {jQuery} target - The target containing the video data. + * @param {jQuery} item - The item containing the video. + */ + Video.prototype.fetch = function(target, item) { + var type = (function() { + if (target.attr('data-vimeo-id')) { + return 'vimeo'; + } else if (target.attr('data-vzaar-id')) { + return 'vzaar' + } else { + return 'youtube'; + } + })(), + id = target.attr('data-vimeo-id') || target.attr('data-youtube-id') || target.attr('data-vzaar-id'), + width = target.attr('data-width') || this._core.settings.videoWidth, + height = target.attr('data-height') || this._core.settings.videoHeight, + url = target.attr('href'); + + if (url) { + /* + Parses the id's out of the following urls (and probably more): + https://www.youtube.com/watch?v=:id + https://youtu.be/:id + https://vimeo.com/:id + https://vimeo.com/channels/:channel/:id + https://vimeo.com/groups/:group/videos/:id + https://app.vzaar.com/videos/:id + + Visual example: https://regexper.com/#(http%3A%7Chttps%3A%7C)%5C%2F%5C%2F(player.%7Cwww.%7Capp.)%3F(vimeo%5C.com%7Cyoutu(be%5C.com%7C%5C.be%7Cbe%5C.googleapis%5C.com)%7Cvzaar%5C.com)%5C%2F(video%5C%2F%7Cvideos%5C%2F%7Cembed%5C%2F%7Cchannels%5C%2F.%2B%5C%2F%7Cgroups%5C%2F.%2B%5C%2F%7Cwatch%5C%3Fv%3D%7Cv%5C%2F)%3F(%5BA-Za-z0-9._%25-%5D*)(%5C%26%5CS%2B)%3F + */ + id = url.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/); + + if (id[3].indexOf('youtu') > -1) { + type = 'youtube'; + } else if (id[3].indexOf('vimeo') > -1) { + type = 'vimeo'; + } else if (id[3].indexOf('vzaar') > -1) { + type = 'vzaar'; + } else { + throw new Error('Video URL not supported.'); + } + id = id[6]; + } else { + throw new Error('Missing video URL.'); + } + + this._videos[url] = { + type: type, + id: id, + width: width, + height: height + }; + item.attr('data-video', url); + this.thumbnail(target, this._videos[url]); + }; + /** + * Creates video thumbnail. + * @protected + * @param {jQuery} target - The target containing the video data. + * @param {Object} info - The video info object. + * @see `fetch` + */ + Video.prototype.thumbnail = function(target, video) { + var tnLink, + icon, + path, + dimensions = video.width && video.height ? 'width:' + video.width + 'px;height:' + video.height + 'px;' : '', + customTn = target.find('img'), + srcType = 'src', + lazyClass = '', + settings = this._core.settings, + create = function(path) { + icon = '
'; + if (settings.lazyLoad) { + tnLink = $('
',{ + "class": 'owl-video-tn ' + lazyClass, + "srcType": path + }); + } else { + tnLink = $( '
', { + "class": "owl-video-tn", + "style": 'opacity:1;background-image:url(' + path + ')' + }); + } + target.after(tnLink); + target.after(icon); + }; + // wrap video content into owl-video-wrapper div + target.wrap( $( '
', { + "class": "owl-video-wrapper", + "style": dimensions + })); + if (this._core.settings.lazyLoad) { + srcType = 'data-src'; + lazyClass = 'owl-lazy'; + } + // custom thumbnail + if (customTn.length) { + create(customTn.attr(srcType)); + customTn.remove(); + return false; + } + if (video.type === 'youtube') { + path = "//img.youtube.com/vi/" + video.id + "/hqdefault.jpg"; + create(path); + } else if (video.type === 'vimeo') { + $.ajax({ + type: 'GET', + url: '//vimeo.com/api/v2/video/' + video.id + '.json', + jsonp: 'callback', + dataType: 'jsonp', + success: function(data) { + path = data[0].thumbnail_large; + create(path); + } + }); + } else if (video.type === 'vzaar') { + $.ajax({ + type: 'GET', + url: '//vzaar.com/api/videos/' + video.id + '.json', + jsonp: 'callback', + dataType: 'jsonp', + success: function(data) { + path = data.framegrab_url; + create(path); + } + }); + } + }; + /** + * Stops the current video. + * @public + */ + Video.prototype.stop = function() { + this._core.trigger('stop', null, 'video'); + this._playing.find('.owl-video-frame').remove(); + this._playing.removeClass('owl-video-playing'); + this._playing = null; + this._core.leave('playing'); + this._core.trigger('stopped', null, 'video'); + }; + /** + * Starts the current video. + * @public + * @param {Event} event - The event arguments. + */ + Video.prototype.play = function(event) { + var target = $(event.target), + item = target.closest('.' + this._core.settings.itemClass), + video = this._videos[item.attr('data-video')], + width = video.width || '100%', + height = video.height || this._core.$stage.height(), + html, + iframe; + + if (this._playing) { + return; + } + this._core.enter('playing'); + this._core.trigger('play', null, 'video'); + item = this._core.items(this._core.relative(item.index())); + this._core.reset(item.index()); + html = $( '' ); + html.attr( 'height', height ); + html.attr( 'width', width ); + if (video.type === 'youtube') { + html.attr( 'src', '//www.youtube.com/embed/' + video.id + '?autoplay=1&rel=0&v=' + video.id ); + } else if (video.type === 'vimeo') { + html.attr( 'src', '//player.vimeo.com/video/' + video.id + '?autoplay=1' ); + } else if (video.type === 'vzaar') { + html.attr( 'src', '//view.vzaar.com/' + video.id + '/player?autoplay=true' ); + } + iframe = $(html).wrap( '
' ).insertAfter(item.find('.owl-video')); + this._playing = item.addClass('owl-video-playing'); + }; + /** + * Checks whether an video is currently in full screen mode or not. + * @todo Bad style because looks like a readonly method but changes members. + * @protected + * @returns {Boolean} + */ + Video.prototype.isInFullScreen = function() { + var element = document.fullscreenElement || document.mozFullScreenElement || + document.webkitFullscreenElement; + + return element && $(element).parent().hasClass('owl-video-frame'); + }; + /** + * Destroys the plugin. + */ + Video.prototype.destroy = function() { + var handler, property; + this._core.$element.off('click.owl.video'); + for (handler in this._handlers) { + this._core.$element.off(handler, this._handlers[handler]); + } + for (property in Object.getOwnPropertyNames(this)) { + typeof this[property] != 'function' && (this[property] = null); + } + }; + $.fn.owlCarousel.Constructor.Plugins.Video = Video; +})(window.Zepto || window.jQuery, window, document); + +/** + * Animate Plugin + * @version 2.3.4 + * @author Bartosz Wojciechowski + * @author David Deutsch + * @license The MIT License (MIT) + */ +;(function($, window, document, undefined) { + /** + * Creates the animate plugin. + * @class The Navigation Plugin + * @param {Owl} scope - The Owl Carousel + */ + var Animate = function(scope) { + this.core = scope; + this.core.options = $.extend({}, Animate.Defaults, this.core.options); + this.swapping = true; + this.previous = undefined; + this.next = undefined; + this.handlers = { + 'change.owl.carousel': $.proxy(function(e) { + if (e.namespace && e.property.name == 'position') { + this.previous = this.core.current(); + this.next = e.property.value; + } + }, this), + 'drag.owl.carousel dragged.owl.carousel translated.owl.carousel': $.proxy(function(e) { + if (e.namespace) { + this.swapping = e.type == 'translated'; + } + }, this), + 'translate.owl.carousel': $.proxy(function(e) { + if (e.namespace && this.swapping && (this.core.options.animateOut || this.core.options.animateIn)) { + this.swap(); + } + }, this) + }; + this.core.$element.on(this.handlers); + }; + /** + * Default options. + * @public + */ + Animate.Defaults = { + animateOut: false, + animateIn: false + }; + /** + * Toggles the animation classes whenever an translations starts. + * @protected + * @returns {Boolean|undefined} + */ + Animate.prototype.swap = function() { + if (this.core.settings.items !== 1) { + return; + } + if (!$.support.animation || !$.support.transition) { + return; + } + this.core.speed(0); + var left, + clear = $.proxy(this.clear, this), + previous = this.core.$stage.children().eq(this.previous), + next = this.core.$stage.children().eq(this.next), + incoming = this.core.settings.animateIn, + outgoing = this.core.settings.animateOut; + + if (this.core.current() === this.previous) { + return; + } + if (outgoing) { + left = this.core.coordinates(this.previous) - this.core.coordinates(this.next); + previous.one($.support.animation.end, clear) + .css( { 'left': left + 'px' } ) + .addClass('animated owl-animated-out') + .addClass(outgoing); + } + if (incoming) { + next.one($.support.animation.end, clear) + .addClass('animated owl-animated-in') + .addClass(incoming); + } + }; + Animate.prototype.clear = function(e) { + $(e.target).css( { 'left': '' } ) + .removeClass('animated owl-animated-out owl-animated-in') + .removeClass(this.core.settings.animateIn) + .removeClass(this.core.settings.animateOut); + this.core.onTransitionEnd(); + }; + /** + * Destroys the plugin. + * @public + */ + Animate.prototype.destroy = function() { + var handler, property; + for (handler in this.handlers) { + this.core.$element.off(handler, this.handlers[handler]); + } + for (property in Object.getOwnPropertyNames(this)) { + typeof this[property] != 'function' && (this[property] = null); + } + }; + $.fn.owlCarousel.Constructor.Plugins.Animate = Animate; +})(window.Zepto || window.jQuery, window, document); +/** + * Autoplay Plugin + * @version 2.3.4 + * @author Bartosz Wojciechowski + * @author Artus Kolanowski + * @author David Deutsch + * @author Tom De Caluwé + * @license The MIT License (MIT) + */ +;(function($, window, document, undefined) { + /** + * Creates the autoplay plugin. + * @class The Autoplay Plugin + * @param {Owl} scope - The Owl Carousel + */ + var Autoplay = function(carousel) { + /** + * Reference to the core. + * @protected + * @type {Owl} + */ + this._core = carousel; + /** + * The autoplay timeout id. + * @type {Number} + */ + this._call = null; + /** + * Depending on the state of the plugin, this variable contains either + * the start time of the timer or the current timer value if it's + * paused. Since we start in a paused state we initialize the timer + * value. + * @type {Number} + */ + this._time = 0; + /** + * Stores the timeout currently used. + * @type {Number} + */ + this._timeout = 0; + /** + * Indicates whenever the autoplay is paused. + * @type {Boolean} + */ + this._paused = true; + /** + * All event handlers. + * @protected + * @type {Object} + */ + this._handlers = { + 'changed.owl.carousel': $.proxy(function(e) { + if (e.namespace && e.property.name === 'settings') { + if (this._core.settings.autoplay) { + this.play(); + } else { + this.stop(); + } + } else if (e.namespace && e.property.name === 'position' && this._paused) { + // Reset the timer. This code is triggered when the position + // of the carousel was changed through user interaction. + this._time = 0; + } + }, this), + 'initialized.owl.carousel': $.proxy(function(e) { + if (e.namespace && this._core.settings.autoplay) { + this.play(); + } + }, this), + 'play.owl.autoplay': $.proxy(function(e, t, s) { + if (e.namespace) { + this.play(t, s); + } + }, this), + 'stop.owl.autoplay': $.proxy(function(e) { + if (e.namespace) { + this.stop(); + } + }, this), + 'mouseover.owl.autoplay': $.proxy(function() { + if (this._core.settings.autoplayHoverPause && this._core.is('rotating')) { + this.pause(); + } + }, this), + 'mouseleave.owl.autoplay': $.proxy(function() { + if (this._core.settings.autoplayHoverPause && this._core.is('rotating')) { + this.play(); + } + }, this), + 'touchstart.owl.core': $.proxy(function() { + if (this._core.settings.autoplayHoverPause && this._core.is('rotating')) { + this.pause(); + } + }, this), + 'touchend.owl.core': $.proxy(function() { + if (this._core.settings.autoplayHoverPause) { + this.play(); + } + }, this) + }; + // register event handlers + this._core.$element.on(this._handlers); + + // set default options + this._core.options = $.extend({}, Autoplay.Defaults, this._core.options); + }; + /** + * Default options. + * @public + */ + Autoplay.Defaults = { + autoplay: false, + autoplayTimeout: 5000, + autoplayHoverPause: false, + autoplaySpeed: false + }; + /** + * Transition to the next slide and set a timeout for the next transition. + * @private + * @param {Number} [speed] - The animation speed for the animations. + */ + Autoplay.prototype._next = function(speed) { + this._call = window.setTimeout( + $.proxy(this._next, this, speed), + this._timeout * (Math.round(this.read() / this._timeout) + 1) - this.read() + ); + + if (this._core.is('interacting') || document.hidden) { + return; + } + this._core.next(speed || this._core.settings.autoplaySpeed); + } + /** + * Reads the current timer value when the timer is playing. + * @public + */ + Autoplay.prototype.read = function() { + return new Date().getTime() - this._time; + }; + /** + * Starts the autoplay. + * @public + * @param {Number} [timeout] - The interval before the next animation starts. + * @param {Number} [speed] - The animation speed for the animations. + */ + Autoplay.prototype.play = function(timeout, speed) { + var elapsed; + + if (!this._core.is('rotating')) { + this._core.enter('rotating'); + } + timeout = timeout || this._core.settings.autoplayTimeout; + // Calculate the elapsed time since the last transition. If the carousel + // wasn't playing this calculation will yield zero. + elapsed = Math.min(this._time % (this._timeout || timeout), timeout); + if (this._paused) { + // Start the clock. + this._time = this.read(); + this._paused = false; + } else { + // Clear the active timeout to allow replacement. + window.clearTimeout(this._call); + } + // Adjust the origin of the timer to match the new timeout value. + this._time += this.read() % timeout - elapsed; + this._timeout = timeout; + this._call = window.setTimeout($.proxy(this._next, this, speed), timeout - elapsed); + }; + /** + * Stops the autoplay. + * @public + */ + Autoplay.prototype.stop = function() { + if (this._core.is('rotating')) { + // Reset the clock. + this._time = 0; + this._paused = true; + window.clearTimeout(this._call); + this._core.leave('rotating'); + } + }; + /** + * Pauses the autoplay. + * @public + */ + Autoplay.prototype.pause = function() { + if (this._core.is('rotating') && !this._paused) { + // Pause the clock. + this._time = this.read(); + this._paused = true; + window.clearTimeout(this._call); + } + }; + /** + * Destroys the plugin. + */ + Autoplay.prototype.destroy = function() { + var handler, property; + this.stop(); + for (handler in this._handlers) { + this._core.$element.off(handler, this._handlers[handler]); + } + for (property in Object.getOwnPropertyNames(this)) { + typeof this[property] != 'function' && (this[property] = null); + } + }; + $.fn.owlCarousel.Constructor.Plugins.autoplay = Autoplay; +})(window.Zepto || window.jQuery, window, document); + +/** + * Navigation Plugin + * @version 2.3.4 + * @author Artus Kolanowski + * @author David Deutsch + * @license The MIT License (MIT) + */ +;(function($, window, document, undefined) { + 'use strict'; + /** + * Creates the navigation plugin. + * @class The Navigation Plugin + * @param {Owl} carousel - The Owl Carousel. + */ + var Navigation = function(carousel) { + /** + * Reference to the core. + * @protected + * @type {Owl} + */ + this._core = carousel; + + /** + * Indicates whether the plugin is initialized or not. + * @protected + * @type {Boolean} + */ + this._initialized = false; + /** + * The current paging indexes. + * @protected + * @type {Array} + */ + this._pages = []; + /** + * All DOM elements of the user interface. + * @protected + * @type {Object} + */ + this._controls = {}; + /** + * Markup for an indicator. + * @protected + * @type {Array.} + */ + this._templates = []; + /** + * The carousel element. + * @type {jQuery} + */ + this.$element = this._core.$element; + /** + * Overridden methods of the carousel. + * @protected + * @type {Object} + */ + this._overrides = { + next: this._core.next, + prev: this._core.prev, + to: this._core.to + }; + /** + * All event handlers. + * @protected + * @type {Object} + */ + this._handlers = { + 'prepared.owl.carousel': $.proxy(function(e) { + if (e.namespace && this._core.settings.dotsData) { + this._templates.push('
' + + $(e.content).find('[data-dot]').addBack('[data-dot]').attr('data-dot') + '
'); + } + }, this), + 'added.owl.carousel': $.proxy(function(e) { + if (e.namespace && this._core.settings.dotsData) { + this._templates.splice(e.position, 0, this._templates.pop()); + } + }, this), + 'remove.owl.carousel': $.proxy(function(e) { + if (e.namespace && this._core.settings.dotsData) { + this._templates.splice(e.position, 1); + } + }, this), + 'changed.owl.carousel': $.proxy(function(e) { + if (e.namespace && e.property.name == 'position') { + this.draw(); + } + }, this), + 'initialized.owl.carousel': $.proxy(function(e) { + if (e.namespace && !this._initialized) { + this._core.trigger('initialize', null, 'navigation'); + this.initialize(); + this.update(); + this.draw(); + this._initialized = true; + this._core.trigger('initialized', null, 'navigation'); + } + }, this), + 'refreshed.owl.carousel': $.proxy(function(e) { + if (e.namespace && this._initialized) { + this._core.trigger('refresh', null, 'navigation'); + this.update(); + this.draw(); + this._core.trigger('refreshed', null, 'navigation'); + } + }, this) + }; + // set default options + this._core.options = $.extend({}, Navigation.Defaults, this._core.options); + + // register event handlers + this.$element.on(this._handlers); + }; + /** + * Default options. + * @public + * @todo Rename `slideBy` to `navBy` + */ + Navigation.Defaults = { + nav: false, + navText: [ + '', + '' + ], + navSpeed: false, + navElement: 'button type="button" role="presentation"', + navContainer: false, + navContainerClass: 'owl-nav', + navClass: [ + 'owl-prev', + 'owl-next' + ], + slideBy: 1, + dotClass: 'owl-dot', + dotsClass: 'owl-dots', + dots: true, + dotsEach: false, + dotsData: false, + dotsSpeed: false, + dotsContainer: false + }; + /** + * Initializes the layout of the plugin and extends the carousel. + * @protected + */ + Navigation.prototype.initialize = function() { + var override, + settings = this._core.settings; + // create DOM structure for relative navigation + this._controls.$relative = (settings.navContainer ? $(settings.navContainer) + : $('
').addClass(settings.navContainerClass).appendTo(this.$element)).addClass('disabled'); + + this._controls.$previous = $('<' + settings.navElement + '>') + .addClass(settings.navClass[0]) + .html(settings.navText[0]) + .prependTo(this._controls.$relative) + .on('click', $.proxy(function(e) { + this.prev(settings.navSpeed); + }, this)); + this._controls.$next = $('<' + settings.navElement + '>') + .addClass(settings.navClass[1]) + .html(settings.navText[1]) + .appendTo(this._controls.$relative) + .on('click', $.proxy(function(e) { + this.next(settings.navSpeed); + }, this)); + // create DOM structure for absolute navigation + if (!settings.dotsData) { + this._templates = [ $('