forked from alaguraj/odoo-testing-addons
Add home_dashboard module, introducing a custom theme with new color variables and a shop template.
This commit is contained in:
parent
580e6461dc
commit
0444eb4c94
@ -4,12 +4,13 @@
|
||||
'license': 'LGPL-3',
|
||||
'category': 'Website',
|
||||
'summary': 'Redirect login to home and show icon grid',
|
||||
'depends': ['base', 'web', 'auth_signup', 'website'],
|
||||
'depends': ['base', 'web', 'auth_signup', 'website', 'website_sale'],
|
||||
'data': [
|
||||
'views/home_template.xml',
|
||||
'views/login_templates.xml',
|
||||
'views/web_title_template.xml',
|
||||
'views/website_logo.xml',
|
||||
'views/shop_template.xml',
|
||||
],
|
||||
'assets': {
|
||||
'web.assets_backend': [
|
||||
@ -21,6 +22,7 @@
|
||||
'home_dashboard/static/src/css/theme_variables.css',
|
||||
'home_dashboard/static/src/css/login_style.css',
|
||||
'home_dashboard/static/src/css/website_style.css',
|
||||
'home_dashboard/static/src/css/shop_style.css',
|
||||
],
|
||||
'web.assets_common': [
|
||||
'home_dashboard/static/src/css/theme_variables.css',
|
||||
|
||||
290
addons/home_dashboard/static/src/css/shop_style.css
Normal file
290
addons/home_dashboard/static/src/css/shop_style.css
Normal file
@ -0,0 +1,290 @@
|
||||
/* ========================================
|
||||
SHOP PAGE - LEFT SIDEBAR FILTER STYLING
|
||||
======================================== */
|
||||
|
||||
/* Ensure Shop Page Layout with Sidebar */
|
||||
#wrapwrap.oe_website_sale {
|
||||
background: var(--bg-gradient-main, linear-gradient(135deg, #8fe0d6 0%, #ffecb5 100%)) !important;
|
||||
}
|
||||
|
||||
/* Main Shop Container - Two Column Layout */
|
||||
.oe_website_sale #products_grid_before {
|
||||
display: block !important;
|
||||
visibility: visible !important;
|
||||
opacity: 1 !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
/* Left Sidebar Filter Section */
|
||||
.oe_website_sale #o_shop_collapse_category,
|
||||
.oe_website_sale .o_wsale_products_searchbar_form,
|
||||
.oe_website_sale #wsale_products_categories_collapse {
|
||||
display: block !important;
|
||||
visibility: visible !important;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
/* Shop Layout Container */
|
||||
.oe_website_sale .container,
|
||||
.oe_website_sale .container-fluid {
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
/* Row with Sidebar and Products */
|
||||
.oe_website_sale .row {
|
||||
display: flex !important;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
/* Left Sidebar Column (Categories/Filters) */
|
||||
.oe_website_sale #products_grid_before,
|
||||
.oe_website_sale .col-lg-3,
|
||||
.oe_website_sale aside {
|
||||
flex: 0 0 280px !important;
|
||||
max-width: 280px !important;
|
||||
display: block !important;
|
||||
visibility: visible !important;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
/* Right Products Column */
|
||||
.oe_website_sale #products_grid,
|
||||
.oe_website_sale .col-lg-9 {
|
||||
flex: 1 !important;
|
||||
max-width: calc(100% - 280px) !important;
|
||||
}
|
||||
|
||||
/* Filter Sidebar Styling */
|
||||
.oe_website_sale #products_grid_before {
|
||||
background: rgba(255, 255, 255, 0.95) !important;
|
||||
border-radius: 16px !important;
|
||||
padding: 20px !important;
|
||||
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
|
||||
backdrop-filter: blur(10px);
|
||||
border: 1px solid rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
/* Category Filter Section */
|
||||
.oe_website_sale .o_wsale_products_searchbar_form,
|
||||
.oe_website_sale #wsale_products_categories_collapse {
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
/* Category Filter Title */
|
||||
.oe_website_sale #products_grid_before h5,
|
||||
.oe_website_sale #products_grid_before .h5,
|
||||
.oe_website_sale #products_grid_before h6 {
|
||||
color: var(--secondary-color, #2bb1a5) !important;
|
||||
font-weight: 700 !important;
|
||||
font-size: 1.1rem !important;
|
||||
margin-bottom: 15px !important;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
/* Category List Items */
|
||||
.oe_website_sale #products_grid_before ul,
|
||||
.oe_website_sale #products_grid_before .list-group {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.oe_website_sale #products_grid_before li,
|
||||
.oe_website_sale #products_grid_before .list-group-item {
|
||||
background: transparent !important;
|
||||
border: none !important;
|
||||
padding: 10px 15px !important;
|
||||
margin-bottom: 5px !important;
|
||||
border-radius: 10px !important;
|
||||
transition: all 0.2s ease !important;
|
||||
}
|
||||
|
||||
.oe_website_sale #products_grid_before li a,
|
||||
.oe_website_sale #products_grid_before .list-group-item a {
|
||||
color: #4a5568 !important;
|
||||
text-decoration: none !important;
|
||||
font-weight: 500 !important;
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.oe_website_sale #products_grid_before li:hover,
|
||||
.oe_website_sale #products_grid_before .list-group-item:hover {
|
||||
background: var(--gradient-primary, linear-gradient(135deg, #2bb1a5 0%, #fecd4f 100%)) !important;
|
||||
transform: translateX(5px);
|
||||
}
|
||||
|
||||
.oe_website_sale #products_grid_before li:hover a,
|
||||
.oe_website_sale #products_grid_before .list-group-item:hover a {
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
/* Active Category */
|
||||
.oe_website_sale #products_grid_before li.active,
|
||||
.oe_website_sale #products_grid_before .list-group-item.active {
|
||||
background: var(--gradient-primary, linear-gradient(135deg, #2bb1a5 0%, #fecd4f 100%)) !important;
|
||||
box-shadow: 0 4px 12px rgba(43, 177, 165, 0.3) !important;
|
||||
}
|
||||
|
||||
.oe_website_sale #products_grid_before li.active a,
|
||||
.oe_website_sale #products_grid_before .list-group-item.active a {
|
||||
color: #ffffff !important;
|
||||
font-weight: 700 !important;
|
||||
}
|
||||
|
||||
/* Search Bar in Sidebar */
|
||||
.oe_website_sale #products_grid_before .form-control,
|
||||
.oe_website_sale #products_grid_before input[type="text"],
|
||||
.oe_website_sale #products_grid_before input[type="search"] {
|
||||
border-radius: 10px !important;
|
||||
border: 1px solid #e2e8f0 !important;
|
||||
padding: 10px 15px !important;
|
||||
background: #f8f9fa !important;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.oe_website_sale #products_grid_before .form-control:focus,
|
||||
.oe_website_sale #products_grid_before input:focus {
|
||||
border-color: var(--secondary-color, #2bb1a5) !important;
|
||||
background: #ffffff !important;
|
||||
box-shadow: 0 0 0 3px rgba(43, 177, 165, 0.15) !important;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Filter Buttons */
|
||||
.oe_website_sale #products_grid_before .btn,
|
||||
.oe_website_sale #products_grid_before button {
|
||||
border-radius: 10px !important;
|
||||
padding: 8px 20px !important;
|
||||
font-weight: 600 !important;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.oe_website_sale #products_grid_before .btn-primary {
|
||||
background: var(--gradient-primary, linear-gradient(135deg, #2bb1a5 0%, #fecd4f 100%)) !important;
|
||||
border: none !important;
|
||||
color: #ffffff !important;
|
||||
box-shadow: 0 4px 12px rgba(43, 177, 165, 0.3) !important;
|
||||
}
|
||||
|
||||
.oe_website_sale #products_grid_before .btn-primary:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 8px 15px rgba(43, 177, 165, 0.4) !important;
|
||||
}
|
||||
|
||||
/* Attribute Filters (Color, Size, etc.) */
|
||||
.oe_website_sale #products_grid_before .css_attribute_color {
|
||||
display: inline-block;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 50%;
|
||||
margin: 5px;
|
||||
border: 2px solid #e2e8f0;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.oe_website_sale #products_grid_before .css_attribute_color:hover,
|
||||
.oe_website_sale #products_grid_before .css_attribute_color.active {
|
||||
border-color: var(--secondary-color, #2bb1a5);
|
||||
transform: scale(1.1);
|
||||
box-shadow: 0 2px 8px rgba(43, 177, 165, 0.3);
|
||||
}
|
||||
|
||||
/* Price Range Filter */
|
||||
.oe_website_sale #products_grid_before .o_wsale_price_filter {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.oe_website_sale #products_grid_before .o_wsale_price_filter input[type="range"] {
|
||||
width: 100%;
|
||||
accent-color: var(--secondary-color, #2bb1a5);
|
||||
}
|
||||
|
||||
/* Collapse/Expand Buttons */
|
||||
.oe_website_sale #products_grid_before .btn-link {
|
||||
color: var(--secondary-color, #2bb1a5) !important;
|
||||
text-decoration: none !important;
|
||||
font-weight: 600 !important;
|
||||
}
|
||||
|
||||
.oe_website_sale #products_grid_before .btn-link:hover {
|
||||
color: var(--primary-color, #fecd4f) !important;
|
||||
}
|
||||
|
||||
/* Mobile Responsive */
|
||||
@media (max-width: 991px) {
|
||||
|
||||
.oe_website_sale #products_grid_before,
|
||||
.oe_website_sale .col-lg-3,
|
||||
.oe_website_sale aside {
|
||||
flex: 0 0 100% !important;
|
||||
max-width: 100% !important;
|
||||
margin-bottom: 20px;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.oe_website_sale #products_grid,
|
||||
.oe_website_sale .col-lg-9 {
|
||||
flex: 0 0 100% !important;
|
||||
max-width: 100% !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Ensure visibility of all filter elements */
|
||||
.oe_website_sale .o_wsale_products_searchbar_form,
|
||||
.oe_website_sale .o_wsale_products_categories,
|
||||
.oe_website_sale #wsale_products_categories_collapse,
|
||||
.oe_website_sale .o_wsale_products_attributes,
|
||||
.oe_website_sale .o_wsale_products_price {
|
||||
display: block !important;
|
||||
visibility: visible !important;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
/* Category Navigation */
|
||||
.oe_website_sale .o_wsale_products_categories ul.o_wsale_categories_list {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
.oe_website_sale .o_wsale_products_categories ul.o_wsale_categories_list li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
/* Attribute Filters Section */
|
||||
.oe_website_sale .o_wsale_products_attributes {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.oe_website_sale .o_wsale_products_attributes .o_wsale_attribute {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.oe_website_sale .o_wsale_products_attributes .o_wsale_attribute label {
|
||||
display: block;
|
||||
margin-bottom: 10px;
|
||||
color: #4a5568;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* Clear Filters Button */
|
||||
.oe_website_sale .o_wsale_clear_filters {
|
||||
margin-top: 20px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.oe_website_sale .o_wsale_clear_filters .btn {
|
||||
width: 100%;
|
||||
background: #f8f9fa !important;
|
||||
border: 1px solid #e2e8f0 !important;
|
||||
color: #4a5568 !important;
|
||||
}
|
||||
|
||||
.oe_website_sale .o_wsale_clear_filters .btn:hover {
|
||||
background: #ffffff !important;
|
||||
border-color: var(--secondary-color, #2bb1a5) !important;
|
||||
color: var(--secondary-color, #2bb1a5) !important;
|
||||
}
|
||||
@ -228,6 +228,7 @@ body,
|
||||
font-weight: 600 !important;
|
||||
letter-spacing: 0.3px;
|
||||
box-shadow: 0 4px 12px rgba(254, 205, 79, 0.3) !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.btn-primary:hover,
|
||||
|
||||
17
addons/home_dashboard/views/shop_template.xml
Normal file
17
addons/home_dashboard/views/shop_template.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<odoo>
|
||||
<!-- Ensure Shop Filter Sidebar is Visible -->
|
||||
<template id="products_categories_inherit" inherit_id="website_sale.products_categories" name="Show Categories Sidebar">
|
||||
<!-- Force display of categories sidebar -->
|
||||
<xpath expr="//div[@id='products_grid_before']" position="attributes">
|
||||
<attribute name="class">col-lg-3 d-block</attribute>
|
||||
<attribute name="style">display: block !important; visibility: visible !important;</attribute>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<!-- Ensure Products Grid Takes Remaining Space -->
|
||||
<template id="products_grid_inherit" inherit_id="website_sale.products" name="Adjust Products Grid">
|
||||
<xpath expr="//div[@id='products_grid']" position="attributes">
|
||||
<attribute name="class">col-lg-9</attribute>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
Loading…
x
Reference in New Issue
Block a user