website installed and some ui upgrade

This commit is contained in:
Alaguraj0361 2026-01-09 21:30:49 +05:30
parent 038bad056c
commit 45699efd13
10 changed files with 170 additions and 12 deletions

View File

@ -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',

View File

@ -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
})
})
@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)

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -48,7 +48,12 @@
<div class="container" style="padding-top: 100px;">
<div class="o_apps">
<t t-foreach="menus" t-as="menu">
<a t-attf-href="/web#menu_id={{menu.id}}" class="o_app">
<t t-set="app_url" t-value="'/web#menu_id=' + str(menu.id)"/>
<!-- Check if it is the Website app by checking the icon module or name -->
<t t-if="(menu.web_icon and menu.web_icon.startswith('website,')) or menu.name == 'Website'">
<t t-set="app_url" t-value="'/home'"/>
</t>
<a t-att-href="app_url" class="o_app">
<div class="o_app_icon_container">
<t t-if="menu.web_icon">
<t t-set="icon_data" t-value="menu.web_icon.split(',')"/>

View File

@ -2,6 +2,8 @@
<template id="custom_login_layout" inherit_id="web.login_layout" name="Custom Login Layout" priority="10">
<xpath expr="//t[@t-call='web.frontend_layout']" position="inside">
<t t-set="body_classname" t-value="'o_custom_login_body'"/>
<t t-set="no_header" t-value="True"/>
<t t-set="no_footer" t-value="True"/>
<t t-set="head">
<link rel="stylesheet" type="text/css" href="/home_dashboard/static/src/css/login_style.css"/>
</t>
@ -36,6 +38,10 @@
</div>
</div>
</div>
<div class="o_login_footer_custom">
<p>Powered by <a href="https://metatroncubesolutions.com/" target="_blank">Metatron Cube Solutions</a></p>
</div>
</div>
</xpath>
</template>

View File

@ -0,0 +1,14 @@
<odoo>
<data>
<!--
Override the Shared Brand Placeholder
Using a generic selector '//span' because strict field matching failed.
This template typically contains a single span or img for the logo.
-->
<template id="custom_website_logo_placeholder" inherit_id="website.placeholder_header_brand" name="Custom Website Logo Placeholder">
<xpath expr="//span" position="replace">
<img src="/web/binary/company_logo" t-att-alt="website.name" class="img-fluid" style="height: 3rem;"/>
</xpath>
</template>
</data>
</odoo>

View File

@ -17,4 +17,3 @@ Write-Host "Project exported to directory: $exportDir"
.\export_odoo.ps1