Add Member Login button to TNCSC website navigation
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:
parent
a0ba0c544f
commit
d7503347ee
@ -4,3 +4,34 @@
|
||||
#wrapwrap:has(> main .tncsc-top-header) > header#top {
|
||||
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;
|
||||
}
|
||||
|
||||
@ -1,5 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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.
|
||||
Keep overrides outside the noupdate page seeds so upgrades apply
|
||||
the fix without replacing administrator-edited page content. -->
|
||||
@ -9,6 +15,9 @@
|
||||
<xpath expr="//t[@t-call='website.layout']" position="inside">
|
||||
<t t-set="no_header" t-value="True"/>
|
||||
</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 id="view_page_about_custom_header_only"
|
||||
@ -17,6 +26,9 @@
|
||||
<xpath expr="//t[@t-call='website.layout']" position="inside">
|
||||
<t t-set="no_header" t-value="True"/>
|
||||
</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 id="view_page_tamil_nadu_custom_header_only"
|
||||
@ -25,6 +37,9 @@
|
||||
<xpath expr="//t[@t-call='website.layout']" position="inside">
|
||||
<t t-set="no_header" t-value="True"/>
|
||||
</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 id="view_page_board_custom_header_only"
|
||||
@ -33,6 +48,9 @@
|
||||
<xpath expr="//t[@t-call='website.layout']" position="inside">
|
||||
<t t-set="no_header" t-value="True"/>
|
||||
</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 id="view_page_membership_custom_header_only"
|
||||
@ -41,6 +59,9 @@
|
||||
<xpath expr="//t[@t-call='website.layout']" position="inside">
|
||||
<t t-set="no_header" t-value="True"/>
|
||||
</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 id="view_page_membership_benefits_custom_header_only"
|
||||
@ -49,6 +70,9 @@
|
||||
<xpath expr="//t[@t-call='website.layout']" position="inside">
|
||||
<t t-set="no_header" t-value="True"/>
|
||||
</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 id="view_page_membership_registration_custom_header_only"
|
||||
@ -57,6 +81,9 @@
|
||||
<xpath expr="//t[@t-call='website.layout']" position="inside">
|
||||
<t t-set="no_header" t-value="True"/>
|
||||
</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 id="view_page_events_custom_header_only"
|
||||
@ -65,6 +92,9 @@
|
||||
<xpath expr="//t[@t-call='website.layout']" position="inside">
|
||||
<t t-set="no_header" t-value="True"/>
|
||||
</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 id="view_page_product_summer_picnic_custom_header_only"
|
||||
@ -73,6 +103,9 @@
|
||||
<xpath expr="//t[@t-call='website.layout']" position="inside">
|
||||
<t t-set="no_header" t-value="True"/>
|
||||
</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 id="view_page_tamil_school_custom_header_only"
|
||||
@ -81,6 +114,9 @@
|
||||
<xpath expr="//t[@t-call='website.layout']" position="inside">
|
||||
<t t-set="no_header" t-value="True"/>
|
||||
</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 id="view_page_contact_custom_header_only"
|
||||
@ -89,6 +125,9 @@
|
||||
<xpath expr="//t[@t-call='website.layout']" position="inside">
|
||||
<t t-set="no_header" t-value="True"/>
|
||||
</xpath>
|
||||
<xpath expr="//div[hasclass('tncsc-hero-nav')]//a[@href='/contact']" position="after">
|
||||
<t t-call="tncsc_deployment.website_member_login_button"/>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user