diff --git a/addons/home_dashboard/__manifest__.py b/addons/home_dashboard/__manifest__.py index 85cadf1..cbddf6f 100644 --- a/addons/home_dashboard/__manifest__.py +++ b/addons/home_dashboard/__manifest__.py @@ -4,11 +4,12 @@ 'license': 'LGPL-3', 'category': 'Website', 'summary': 'Redirect login to home and show icon grid', - 'depends': ['base', 'web', 'auth_signup'], + 'depends': ['base', 'web', 'auth_signup', 'website'], 'data': [ 'views/home_template.xml', 'views/login_templates.xml', 'views/web_title_template.xml', + 'views/website_logo.xml', ], 'assets': { 'web.assets_backend': [ @@ -19,6 +20,7 @@ 'web.assets_frontend': [ 'home_dashboard/static/src/css/theme_variables.css', 'home_dashboard/static/src/css/login_style.css', + 'home_dashboard/static/src/css/website_style.css', ], 'web.assets_common': [ 'home_dashboard/static/src/css/theme_variables.css', diff --git a/addons/home_dashboard/controllers/__pycache__/main.cpython-310.pyc b/addons/home_dashboard/controllers/__pycache__/main.cpython-310.pyc index 54c32de..aaae469 100644 Binary files a/addons/home_dashboard/controllers/__pycache__/main.cpython-310.pyc and b/addons/home_dashboard/controllers/__pycache__/main.cpython-310.pyc differ diff --git a/addons/home_dashboard/controllers/main.py b/addons/home_dashboard/controllers/main.py index 5a6d437..4c83f7e 100644 --- a/addons/home_dashboard/controllers/main.py +++ b/addons/home_dashboard/controllers/main.py @@ -10,10 +10,12 @@ class CustomHome(Home): return request.redirect('/') return response -class ImageHome(http.Controller): - @http.route('/', type='http', auth='user', website=True) +from odoo.addons.website.controllers.main import Website + +class ImageHome(Website): + @http.route('/', type='http', auth='user', website=True, sitemap=True) def index(self, **kwargs): - # Fetch root menus + # Override root to show Dashboard menus = request.env['ir.ui.menu'].sudo().search([ ('parent_id', '=', False) ], order='sequence') @@ -21,4 +23,9 @@ class ImageHome(http.Controller): return request.render('home_dashboard.image_home_template', { 'menus': menus, 'user_id': request.env.user - }) \ No newline at end of file + }) + + @http.route('/home', type='http', auth="public", website=True, sitemap=True) + def website_home(self, **kw): + # Explicit route for standard Website Homepage + return super(ImageHome, self).index(**kw) \ No newline at end of file diff --git a/addons/home_dashboard/static/src/css/home_menu.css b/addons/home_dashboard/static/src/css/home_menu.css index 127c65e..156c31d 100644 --- a/addons/home_dashboard/static/src/css/home_menu.css +++ b/addons/home_dashboard/static/src/css/home_menu.css @@ -106,12 +106,12 @@ align-items: center !important; gap: 12px !important; padding: 10px 25px !important; - background: rgba(255, 255, 255, 0.7) !important; + background: rgba(0, 0, 0, 0.9) !important; backdrop-filter: blur(15px) !important; -webkit-backdrop-filter: blur(15px); border-radius: 50px !important; - border: 1px solid rgba(255, 255, 255, 0.4) !important; - box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important; + border: 1px solid rgba(255, 255, 255, 0.15) !important; + box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important; } .o_top_item { @@ -120,7 +120,7 @@ display: flex; align-items: center; justify-content: center; - color: #4a5568 !important; + color: #ffffff !important; transition: all 0.3s ease; cursor: pointer; position: relative; @@ -135,7 +135,7 @@ .o_bar_divider { width: 1px; height: 24px; - background: rgba(0, 0, 0, 0.1); + background: rgba(255, 255, 255, 0.2); margin: 0 10px; } diff --git a/addons/home_dashboard/static/src/css/login_style.css b/addons/home_dashboard/static/src/css/login_style.css index 9db06f6..3ace60f 100644 --- a/addons/home_dashboard/static/src/css/login_style.css +++ b/addons/home_dashboard/static/src/css/login_style.css @@ -122,6 +122,7 @@ box-shadow: 0 8px 20px rgba(43, 177, 165, 0.4) !important; } + /* Responsive Handling */ @media (max-width: 992px) { .o_login_main_wrapper { @@ -135,4 +136,58 @@ .o_login_right_side { background: linear-gradient(135deg, #fecd4f 0%, #2bb1a5 100%) !important; } +} + +/* Hide Website Header/Footer to ensure standard "Backend-Style" Login UI */ +body.o_custom_login_body header, +body.o_custom_login_body footer, +body.o_custom_login_body .o_footer_copyright, +body.o_custom_login_body #o_main_nav { + display: none !important; +} + +/* Ensure the wrapper covers the entire screen, ignoring website container constraints */ +body.o_custom_login_body .o_login_main_wrapper { + position: fixed !important; + top: 0; + left: 0; + width: 100vw !important; + height: 100vh !important; + z-index: 9999; + /* Ensure it stays on top */ + margin: 0 !important; + padding: 0 !important; +} + +/* Custom Footer */ +.o_login_footer_custom { + position: absolute; + bottom: 0; + right: 0; + width: 50%; + /* Only on the right side which is 50% usually, or just right side */ + text-align: center; + padding: 15px; + background: transparent; + color: #6c757d; + z-index: 10; + font-size: 0.9rem; +} + +@media (max-width: 992px) { + .o_login_footer_custom { + width: 100%; + color: white; + /* Visible on gradient background */ + } +} + +.o_login_footer_custom a { + color: #2bb1a5; + text-decoration: none; + font-weight: 600; +} + +.o_login_footer_custom a:hover { + color: #fecd4f; } \ No newline at end of file diff --git a/addons/home_dashboard/static/src/css/website_style.css b/addons/home_dashboard/static/src/css/website_style.css new file mode 100644 index 0000000..0a57c45 --- /dev/null +++ b/addons/home_dashboard/static/src/css/website_style.css @@ -0,0 +1,70 @@ +/* Custom Website Header Styling */ + +/* Force Header Background to Black */ +header#top, +body .o_header_standard, +body header.o_header_standard, +body .navbar, +body #o_main_nav { + background-color: #000000 !important; + background: #000000 !important; + border-bottom: 1px solid rgba(255, 255, 255, 0.1); +} + +/* Navbar Links / Menu Items */ +header#top .navbar-nav .nav-link, +header#top .nav-link, +body .o_header_standard .nav-link, +body .navbar .nav-link, +body #o_main_nav .nav-link { + color: #ffffff !important; + font-weight: 500; +} + +/* Navbar Icons (Search, Cart, User, etc.) */ +header#top i, +header#top .fa, +body .o_header_standard i, +body .o_header_standard .fa, +body .navbar i, +body .navbar .fa { + color: #ffffff !important; +} + +/* Brand / Logo Text (if text logo) */ +header#top .navbar-brand, +body .o_header_standard .navbar-brand { + color: #ffffff !important; +} + +/* Hover States - Using Theme Teal */ +header#top .nav-link:hover, +body .o_header_standard .nav-link:hover, +header#top i:hover, +body .o_header_standard i:hover { + color: #2bb1a5 !important; +} + +/* Active States - Using Theme Gold */ +header#top .nav-link.active, +body .o_header_standard .nav-link.active { + color: #fecd4f !important; +} + +/* Dropdown Menu overrides (ensure visibility) */ +header#top .dropdown-menu, +body .o_header_standard .dropdown-menu { + background-color: #000000 !important; + border: 1px solid rgba(255, 255, 255, 0.15); +} + +header#top .dropdown-item, +body .o_header_standard .dropdown-item { + color: #ffffff !important; +} + +header#top .dropdown-item:hover, +body .o_header_standard .dropdown-item:hover { + background-color: #2bb1a5 !important; + color: #ffffff !important; +} \ No newline at end of file diff --git a/addons/home_dashboard/views/home_template.xml b/addons/home_dashboard/views/home_template.xml index 07d5a68..585c493 100644 --- a/addons/home_dashboard/views/home_template.xml +++ b/addons/home_dashboard/views/home_template.xml @@ -48,7 +48,12 @@