Add Member Login button to TNCSC website navigation
Some checks failed
CI / Brand-leak check (push) Has been cancelled
CI / flake8 / pylint-odoo / manifest completeness (push) Has been cancelled
CI / Install all modules with --test-enable (push) Has been cancelled

Add a shared login button to all 11 custom navigation templates, linking to /web/login with /my as the post-login destination. Style it in ivory and gold with visible keyboard focus and allow navigation to wrap.

Validated template insertion points, SCSS compilation, and desktop/mobile browser previews. Confirmed the button opens the login form with the member portal redirect.
This commit is contained in:
metatroncubeswdev 2026-09-27 09:48:57 -04:00
parent a0ba0c544f
commit d7503347ee
2 changed files with 70 additions and 0 deletions

View File

@ -4,3 +4,34 @@
#wrapwrap:has(> main .tncsc-top-header) > header#top { #wrapwrap:has(> main .tncsc-top-header) > header#top {
display: none !important; display: none !important;
} }
.tncsc-hero-nav .tncsc-member-login {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 8px 12px;
border: 1px solid #D89C43;
border-radius: 6px;
background: #FFFCF7;
color: #87530D;
font-size: 14px;
font-weight: 600;
text-decoration: none;
white-space: nowrap;
&:hover {
background: #FFF0D6;
color: #643D09;
}
&:focus-visible {
outline: 3px solid #D89C43;
outline-offset: 3px;
}
}
// Let navigation wrap before buttons or dropdowns overlap at narrower widths.
.tncsc-hero-nav nav {
flex-wrap: wrap;
}

View File

@ -1,5 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo>
<template id="website_member_login_button" name="TNCSC Member Login Button">
<a href="/web/login?redirect=/my" class="tncsc-member-login">
<i class="fa fa-user" aria-hidden="true"/> Member Login
</a>
</template>
<!-- These pages provide their own TNCSC header and navigation. <!-- These pages provide their own TNCSC header and navigation.
Keep overrides outside the noupdate page seeds so upgrades apply Keep overrides outside the noupdate page seeds so upgrades apply
the fix without replacing administrator-edited page content. --> the fix without replacing administrator-edited page content. -->
@ -9,6 +15,9 @@
<xpath expr="//t[@t-call='website.layout']" position="inside"> <xpath expr="//t[@t-call='website.layout']" position="inside">
<t t-set="no_header" t-value="True"/> <t t-set="no_header" t-value="True"/>
</xpath> </xpath>
<xpath expr="//div[hasclass('tncsc-hero-nav')]//a[@href='/contact']" position="after">
<t t-call="tncsc_deployment.website_member_login_button"/>
</xpath>
</template> </template>
<template id="view_page_about_custom_header_only" <template id="view_page_about_custom_header_only"
@ -17,6 +26,9 @@
<xpath expr="//t[@t-call='website.layout']" position="inside"> <xpath expr="//t[@t-call='website.layout']" position="inside">
<t t-set="no_header" t-value="True"/> <t t-set="no_header" t-value="True"/>
</xpath> </xpath>
<xpath expr="//div[hasclass('tncsc-hero-nav')]//a[@href='/contact']" position="after">
<t t-call="tncsc_deployment.website_member_login_button"/>
</xpath>
</template> </template>
<template id="view_page_tamil_nadu_custom_header_only" <template id="view_page_tamil_nadu_custom_header_only"
@ -25,6 +37,9 @@
<xpath expr="//t[@t-call='website.layout']" position="inside"> <xpath expr="//t[@t-call='website.layout']" position="inside">
<t t-set="no_header" t-value="True"/> <t t-set="no_header" t-value="True"/>
</xpath> </xpath>
<xpath expr="//div[hasclass('tncsc-hero-nav')]//a[@href='/contact']" position="after">
<t t-call="tncsc_deployment.website_member_login_button"/>
</xpath>
</template> </template>
<template id="view_page_board_custom_header_only" <template id="view_page_board_custom_header_only"
@ -33,6 +48,9 @@
<xpath expr="//t[@t-call='website.layout']" position="inside"> <xpath expr="//t[@t-call='website.layout']" position="inside">
<t t-set="no_header" t-value="True"/> <t t-set="no_header" t-value="True"/>
</xpath> </xpath>
<xpath expr="//div[hasclass('tncsc-hero-nav')]//a[@href='/contact']" position="after">
<t t-call="tncsc_deployment.website_member_login_button"/>
</xpath>
</template> </template>
<template id="view_page_membership_custom_header_only" <template id="view_page_membership_custom_header_only"
@ -41,6 +59,9 @@
<xpath expr="//t[@t-call='website.layout']" position="inside"> <xpath expr="//t[@t-call='website.layout']" position="inside">
<t t-set="no_header" t-value="True"/> <t t-set="no_header" t-value="True"/>
</xpath> </xpath>
<xpath expr="//div[hasclass('tncsc-hero-nav')]//a[@href='/contact']" position="after">
<t t-call="tncsc_deployment.website_member_login_button"/>
</xpath>
</template> </template>
<template id="view_page_membership_benefits_custom_header_only" <template id="view_page_membership_benefits_custom_header_only"
@ -49,6 +70,9 @@
<xpath expr="//t[@t-call='website.layout']" position="inside"> <xpath expr="//t[@t-call='website.layout']" position="inside">
<t t-set="no_header" t-value="True"/> <t t-set="no_header" t-value="True"/>
</xpath> </xpath>
<xpath expr="//div[hasclass('tncsc-hero-nav')]//a[@href='/contact']" position="after">
<t t-call="tncsc_deployment.website_member_login_button"/>
</xpath>
</template> </template>
<template id="view_page_membership_registration_custom_header_only" <template id="view_page_membership_registration_custom_header_only"
@ -57,6 +81,9 @@
<xpath expr="//t[@t-call='website.layout']" position="inside"> <xpath expr="//t[@t-call='website.layout']" position="inside">
<t t-set="no_header" t-value="True"/> <t t-set="no_header" t-value="True"/>
</xpath> </xpath>
<xpath expr="//div[hasclass('tncsc-hero-nav')]//a[@href='/contact']" position="after">
<t t-call="tncsc_deployment.website_member_login_button"/>
</xpath>
</template> </template>
<template id="view_page_events_custom_header_only" <template id="view_page_events_custom_header_only"
@ -65,6 +92,9 @@
<xpath expr="//t[@t-call='website.layout']" position="inside"> <xpath expr="//t[@t-call='website.layout']" position="inside">
<t t-set="no_header" t-value="True"/> <t t-set="no_header" t-value="True"/>
</xpath> </xpath>
<xpath expr="//div[hasclass('tncsc-hero-nav')]//a[@href='/contact']" position="after">
<t t-call="tncsc_deployment.website_member_login_button"/>
</xpath>
</template> </template>
<template id="view_page_product_summer_picnic_custom_header_only" <template id="view_page_product_summer_picnic_custom_header_only"
@ -73,6 +103,9 @@
<xpath expr="//t[@t-call='website.layout']" position="inside"> <xpath expr="//t[@t-call='website.layout']" position="inside">
<t t-set="no_header" t-value="True"/> <t t-set="no_header" t-value="True"/>
</xpath> </xpath>
<xpath expr="//div[hasclass('tncsc-hero-nav')]//a[@href='/contact']" position="after">
<t t-call="tncsc_deployment.website_member_login_button"/>
</xpath>
</template> </template>
<template id="view_page_tamil_school_custom_header_only" <template id="view_page_tamil_school_custom_header_only"
@ -81,6 +114,9 @@
<xpath expr="//t[@t-call='website.layout']" position="inside"> <xpath expr="//t[@t-call='website.layout']" position="inside">
<t t-set="no_header" t-value="True"/> <t t-set="no_header" t-value="True"/>
</xpath> </xpath>
<xpath expr="//div[hasclass('tncsc-hero-nav')]//a[@href='/contact']" position="after">
<t t-call="tncsc_deployment.website_member_login_button"/>
</xpath>
</template> </template>
<template id="view_page_contact_custom_header_only" <template id="view_page_contact_custom_header_only"
@ -89,6 +125,9 @@
<xpath expr="//t[@t-call='website.layout']" position="inside"> <xpath expr="//t[@t-call='website.layout']" position="inside">
<t t-set="no_header" t-value="True"/> <t t-set="no_header" t-value="True"/>
</xpath> </xpath>
<xpath expr="//div[hasclass('tncsc-hero-nav')]//a[@href='/contact']" position="after">
<t t-call="tncsc_deployment.website_member_login_button"/>
</xpath>
</template> </template>
</odoo> </odoo>