Now that issue 3082394 has been accepted, I'd like to fix the CDN footer for the GCWeb theme.

Comments

smulvih2 created an issue. See original summary.

smulvih2’s picture

StatusFileSize
new2.47 KB

This patch fixes the template file page--gcweb.html.twig to allow for language negotiation. I'm using https://www150.statcan.gc.ca/n1/wet-boew4b/ajax/sitefooter- as the CDN URL in the WxT Bootstrap settings. Some CSS changes were needed as the DOM structure from CDN doesn't match the expected output; .wb-navcurr is not wrapped in div.landscape as on Canada.ca

smulvih2’s picture

StatusFileSize
new1.34 KB

Here's a new patch that wraps the footer top section in div.landscape. I think this is a better approach then #2 above as it doesn't require any changes to styles.

joseph.olstad’s picture

Status: Needs review » Reviewed & tested by the community

Patch applies cleanly, seems to work as advertised.

joseph.olstad’s picture

Project: Web Experience Toolkit: Bootstrap » Web Experience Toolkit
Version: 8.x-1.x-dev » 8.x-3.x-dev
Component: Templates » WxT Bootstrap

Moving to the wxt project, while it is a wxt_bootstrap issue and this theme CAN be used by it'self without wxt but for issue maintenance, the way we've been dealing with component issues is to keep them in the wxt project

RTBC

sylus’s picture

Hi there ^_^

Super sorry haven't had a chance to look at this, I asked someone from the team to take a look.

I think my only concern was that it uses javasript to replace the markup can't we just adjust the template directly?

I also don't think we want this to replace other theme markups and only a certain one?

Definitely happy to work with you on this, and appreciate joseph.olstad take a first look.

You both are awesome :D

sylus’s picture

Status: Reviewed & tested by the community » Needs work
smulvih2’s picture

StatusFileSize
new683 bytes

@sylus I agree, the javascript approach is a bit hacky. I had some time to revisit this and I think the new approach, which only requires changes to the template file, is much better.

The issue with the returned CDN data is the top menu is not wrapped in a .landscape div. Using a technique here (https://wet-boew.github.io/v4.0-ci/demos/data-ajax/data-ajax-en.html) I was able to target CDN content using a CSS class selector and put the nav inside a .landscape div.

smulvih2’s picture

Status: Needs work » Needs review
sylus’s picture

Status: Needs review » Fixed

This looks good really appreciate it :D

Committed and attributed! Thanks again!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

smulvih2’s picture