Skip to content

Commit

Permalink
Merge pull request #490 from WestpacGEL/488-github-link-in-footer-not…
Browse files Browse the repository at this point in the history
…-linked-correctly

488 GitHub link in footer not linked correctly
  • Loading branch information
jaortiz authored Dec 7, 2023
2 parents 34b7a54 + 109f85d commit 5f1b54b
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import { DocumentRenderer } from '@keystatic/core/renderer';
import { Grid, Item, Select } from '@westpac/ui';
import { useSearchParams } from 'next/navigation';
import { useId, useState } from 'react';

import { Container } from '@/app/design-system/components';
Expand Down Expand Up @@ -31,8 +30,6 @@ const FILTERS = [
export function AccessibilityContent({ accessibilitySections, accessibilityDemo }: AccessibilityContentProps) {
const [filter, setFilter] = useState<VisionFilterProps['value']>();
const id = useId();
const searchParams = useSearchParams();
const brand = searchParams.get('brand') || 'wbc';

return (
<>
Expand All @@ -48,10 +45,7 @@ export function AccessibilityContent({ accessibilitySections, accessibilityDemo
All components are designed and tested to ensure colour contrast ratios comply with the WCAG 2.1 AA
specification. Select a filter from the list below to see how this component would appear to someone
with a:{' '}
<Link href={`/design-system/accessibility/colour-vision-impairment?brand=${brand}`}>
colour vision impairment
</Link>
.
<Link href="/design-system/accessibility/colour-vision-impairment">colour vision impairment</Link>.
</Text>
</Item>
</Grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ export function Header({ className, title }: { className?: string; title?: strin
</button>

<div className={styles.gridButtonWrapper()}>
<span className="sr-only">Active breakpoint:</span>
<span className="hidden font-bold sm:block md:hidden">SM</span>
<span className="hidden font-bold md:block lg:hidden">MD</span>
<span className="hidden font-bold lg:block">LG</span>
<button
aria-hidden="true"
className={styles.gridButton()}
onClick={() => {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function StickyFooter() {
<Link href="mailto:[email protected]">
<EmailIcon />
</Link>
<Link href="github.com/WestpacGEL">
<Link target="_blank" href="https://github.com/WestpacGEL/GEL-next">
<GithubIcon />
</Link>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Update `tailwind.config.js` to use the `withGEL` helper exported by `@westpac/ui
/** @type {import('tailwindcss').Config} */
const config = withGEL({
relative: true,
content: ['./src/**/*.{js,ts,jsx,tsx,mdx}', './node_modules/@westpac/ui/src/**/*.{js,ts,jsx,tsx,mdx}'],
content: ['./src/**/*.{js,ts,jsx,tsx,mdx}', './node_modules/@westpac/ui/src/**/*.{js,ts,jsx,tsx}'],
safelist: [],
});

Expand All @@ -29,17 +29,17 @@ For applications using `brand fonts` add the following options config to the `wi

const config = withGEL({
relative: true,
content: ['./src/**/*.{js,ts,jsx,tsx,mdx}', './node_modules/@westpac/ui/src/**/*.{js,ts,jsx,tsx,mdx}'],
content: ['./src/**/*.{js,ts,jsx,tsx,mdx}', './node_modules/@westpac/ui/src/**/*.{js,ts,jsx,tsx}'],
safelist: [],
options: {
brandFonts: {
// path to font files
src: '/fonts',
/** takes a single brand string e.g. 'wbc' or an array of brands.
src: '/fonts',
/** takes a single brand string e.g. 'wbc' or an array of brands.
If no brands are specified will import all brands by default */
brands: ['wbc', 'stg'],
brands: ['wbc', 'stg'],
},
},
});
`} />
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,16 @@ The following example shows adding the `wbc` theme. You can add other valid bran
...
</html>
`} />
```
```

### Targeting a specific brand with Tailwind CSS

You can target a specific brand by using the `active-theme-[brand_name]` prefix. For example, to target the `wbc` brand, you can use the following prefix.

```html
<StaticCode language="jsx" code={`
<section>
<p class="text-text active-theme-wbc:text-primary">Budgeting for beginners</p>
</section>
`} />
```

1 comment on commit 5f1b54b

@vercel
Copy link

@vercel vercel bot commented on 5f1b54b Dec 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

gel-next-site – ./apps/site

gel-next-site.vercel.app
gel-next-site-git-main-westpacgel.vercel.app
gel-next-site-westpacgel.vercel.app

Please sign in to comment.