-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update sliding-context.js Update sliding-nav-2023.html Create contextual.json Update themes/*.html Update alpha-layered-theme-menu-mr-tp.css
- Loading branch information
David Elisma
committed
Feb 8, 2023
1 parent
7490fd0
commit 020567b
Showing
21 changed files
with
737 additions
and
557 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,240 @@ | ||
{ | ||
"jobs": { | ||
"auth": { | ||
"link": "/landing/sign-government-canada-online-account", | ||
"labelExtended": "Sign in to jobs" | ||
}, | ||
"contextualFooter": { | ||
"links": [ | ||
{ | ||
"url": "someUrl.html", | ||
"text": "Contact jobs" | ||
} | ||
] | ||
} | ||
}, | ||
"immigration": { | ||
"auth": { | ||
"link": "/landing/sign-government-canada-online-account", | ||
"labelExtended": "Sign in to immigration" | ||
}, | ||
"contextualFooter": { | ||
"links": [ | ||
{ | ||
"url": "someUrl.html", | ||
"text": "Contact immigration" | ||
} | ||
] | ||
} | ||
}, | ||
"travel": { | ||
"auth": { | ||
"link": "/landing/sign-government-canada-online-account", | ||
"labelExtended": "Sign in to travel" | ||
}, | ||
"contextualFooter": { | ||
"links": [ | ||
{ | ||
"url": "someUrl.html", | ||
"text": "Contact travel" | ||
} | ||
] | ||
} | ||
}, | ||
"business": { | ||
"auth": { | ||
"link": "/landing/sign-government-canada-online-account", | ||
"labelExtended": "Sign in to business" | ||
}, | ||
"contextualFooter": { | ||
"links": [ | ||
{ | ||
"url": "someUrl.html", | ||
"text": "Contact business" | ||
} | ||
] | ||
} | ||
}, | ||
"benefits": { | ||
"auth": { | ||
"link": "/landing/sign-government-canada-online-account", | ||
"labelExtended": "Sign in to benefits" | ||
}, | ||
"contextualFooter": { | ||
"links": [ | ||
{ | ||
"url": "someUrl.html", | ||
"text": "Contact benefits" | ||
} | ||
] | ||
} | ||
}, | ||
"Health": { | ||
"auth": { | ||
"link": "/landing/sign-government-canada-online-account", | ||
"labelExtended": "Sign in to health" | ||
}, | ||
"contextualFooter": { | ||
"links": [ | ||
{ | ||
"url": "someUrl.html", | ||
"text": "Contact health" | ||
} | ||
] | ||
} | ||
}, | ||
"taxes": { | ||
"auth": { | ||
"link": "/landing/sign-government-canada-online-account", | ||
"labelExtended": "Sign in to taxes" | ||
}, | ||
"contextualFooter": { | ||
"links": [ | ||
{ | ||
"url": "someUrl.html", | ||
"text": "Contact taxes" | ||
} | ||
] | ||
} | ||
}, | ||
"environment": { | ||
"auth": { | ||
"link": "/landing/sign-government-canada-online-account", | ||
"labelExtended": "Sign in to environment" | ||
}, | ||
"contextualFooter": { | ||
"links": [ | ||
{ | ||
"url": "someUrl.html", | ||
"text": "Contact environment" | ||
} | ||
] | ||
} | ||
}, | ||
"defence": { | ||
"auth": { | ||
"link": "/landing/sign-government-canada-online-account", | ||
"labelExtended": "Sign in to defence" | ||
}, | ||
"contextualFooter": { | ||
"links": [ | ||
{ | ||
"url": "someUrl.html", | ||
"text": "Contact defence" | ||
} | ||
] | ||
} | ||
}, | ||
"culture": { | ||
"auth": { | ||
"link": "/landing/sign-government-canada-online-account", | ||
"labelExtended": "Sign in to culture" | ||
}, | ||
"contextualFooter": { | ||
"links": [ | ||
{ | ||
"url": "someUrl.html", | ||
"text": "Contact culture" | ||
} | ||
] | ||
} | ||
}, | ||
"policing": { | ||
"auth": { | ||
"link": "/landing/sign-government-canada-online-account", | ||
"labelExtended": "Sign in to policing" | ||
}, | ||
"contextualFooter": { | ||
"links": [ | ||
{ | ||
"url": "someUrl.html", | ||
"text": "Contact policing" | ||
} | ||
] | ||
} | ||
}, | ||
"transport": { | ||
"auth": { | ||
"link": "/landing/sign-government-canada-online-account", | ||
"labelExtended": "Sign in to transport" | ||
}, | ||
"contextualFooter": { | ||
"links": [ | ||
{ | ||
"url": "someUrl.html", | ||
"text": "Contact transport" | ||
} | ||
] | ||
} | ||
}, | ||
"world": { | ||
"auth": { | ||
"link": "/landing/sign-government-canada-online-account", | ||
"labelExtended": "Sign in to world" | ||
}, | ||
"contextualFooter": { | ||
"links": [ | ||
{ | ||
"url": "someUrl.html", | ||
"text": "Contact world" | ||
} | ||
] | ||
} | ||
}, | ||
"money": { | ||
"auth": { | ||
"link": "/landing/sign-government-canada-online-account", | ||
"labelExtended": "Sign in to money" | ||
}, | ||
"contextualFooter": { | ||
"links": [ | ||
{ | ||
"url": "someUrl.html", | ||
"text": "Contact money" | ||
} | ||
] | ||
} | ||
}, | ||
"science": { | ||
"auth": { | ||
"link": "/landing/sign-government-canada-online-account", | ||
"labelExtended": "Sign in to science" | ||
}, | ||
"contextualFooter": { | ||
"links": [ | ||
{ | ||
"url": "someUrl.html", | ||
"text": "Contact science" | ||
} | ||
] | ||
} | ||
}, | ||
"indigenous": { | ||
"auth": { | ||
"link": "/landing/sign-government-canada-online-account", | ||
"labelExtended": "Sign in to indigenous" | ||
}, | ||
"contextualFooter": { | ||
"links": [ | ||
{ | ||
"url": "someUrl.html", | ||
"text": "Contact indigenous" | ||
} | ||
] | ||
} | ||
}, | ||
"veterans": { | ||
"auth": { | ||
"link": "/landing/sign-government-canada-online-account", | ||
"labelExtended": "Sign in to veterans" | ||
}, | ||
"contextualFooter": { | ||
"links": [ | ||
{ | ||
"url": "someUrl.html", | ||
"text": "Contact veterans" | ||
} | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,48 @@ | ||
let state = { | ||
signin: { | ||
link: "", | ||
labelExtended: "Sign in" | ||
}, | ||
contextualFooter: { | ||
links: [ | ||
{ | ||
url: "someUrl.html", | ||
text: "Contextual link 1" | ||
} | ||
] | ||
} | ||
} | ||
|
||
function render() { | ||
$( "#wb-so a" ).attr( "href" ); | ||
$( "#wb-so .hidden-xs" ).text( state.signin.labelExtended ); | ||
$each( state.contextualFooter.links, function( key, value ) { | ||
$( "#gc-contextual a" ).text( value.text ); | ||
$( "#gc-contextuùl a ").attr( value.url ); | ||
} ) | ||
} | ||
( function( $, window, wb ) { | ||
"use strcit"; | ||
|
||
$( "[aria-expanded='true']" ).one( "wb-contentupdated", | ||
function( event ) { | ||
var gcMnuTheme = event.currentTarget, | ||
trigger = gcMnuTheme.getAttribute( "data-trigger-wet" ); | ||
var componentName = "gc-mnu", | ||
selector = "." + componentName, | ||
initEvent = "wb-init" + selector, | ||
$document = wb.doc, | ||
init = function( event ) { | ||
var elm = wb.init( event, componentName, selector ), | ||
$elm, | ||
settings; | ||
if ( elm ) { | ||
$elm = $( elm ); | ||
settings = wb.getData( $elm, componentName ); | ||
$elm.trigger( "load", settings ); | ||
wb.ready( $elm, componentName ) | ||
} | ||
}, | ||
render = function ( event, data ) { | ||
var elm = event.currentTarget, | ||
$elm = $( elm ); | ||
|
||
if ( trigger ) { | ||
state.signin.link = $( gcMnuTheme ).data( "gcAuth" ).link; | ||
state.signin.labelExtended = $( gcMnuTheme ).data( "gcAuth" ).labelExtended; | ||
state.contextualFooter.links = $( gcMnuTheme ).data( "gcFooter" ).links | ||
render(); | ||
} | ||
}) | ||
if ( elm.getAttribute( "aria-expanded" ) === "true" ) { | ||
return | ||
} else { | ||
$( "button" ).attr( "aria-expanded", false ); | ||
$elm.attr( "aria-expanded", true ); | ||
} | ||
/* $( "#wb-so a" ).attr( "href" ); | ||
$( "#wb-so .hidden-xs" ).text( ); | ||
$each( function( key, value ) { | ||
$( "#gc-contextual a" ).text( value.text ); | ||
$( "#gc-contextual a").attr( "href", value.url ); | ||
} ) */ | ||
}; | ||
|
||
$document.on( "click", ".gc-mnu button", function( event, data ) { | ||
render( event, data ) | ||
}); | ||
$document.on( "timerpoke.wb" + initEvent, selector, init ); | ||
wb.add( selector ); | ||
} )( jQuery, window, wb ); | ||
|
||
/* | ||
} | ||
*/ |
Oops, something went wrong.