Skip to content

Commit

Permalink
fix: header responsiveness (#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
pregno authored Oct 9, 2024
1 parent 14c070b commit 69df71a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 21 deletions.
6 changes: 3 additions & 3 deletions packages/html/ds/src/header/components/headerDesktop.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@
<div
class="gi-h-20 gi-justify-between gi-items-center gi-flex gi-bg-emerald-800 gi-relative gi-py-3 gi-px-4 sm:gi-px-8 sm:gi-py-4"
>
<div class="gi-flex gi-items-center gi-gap-4 md:gi-gap-6">
<div class="gi-flex gi-items-center gi-gap-4 md:gi-gap-6 lg:gi-gap-12">
{% if props.logo.href %}
<a
aria-label="Go to the home page"
href="{{ props.logo.href }}"
class="xs:gi-block gi-hidden"
class="md:gi-block gi-hidden"
>{{ govieLogo() }}</a
>
{% else %}
<span class="xs:gi-block gi-hidden">{{ govieLogo() }}</span>
<span class="md:gi-block gi-hidden">{{ govieLogo() }}</span>
{% endif %}
{% if props.title %}
<div class="gi-heading-sm gi-tracking-wider gi-text-white !gi-m-0">
Expand Down
8 changes: 4 additions & 4 deletions packages/html/ds/src/header/components/headerSmall.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@
<a
aria-label="Go to the home page"
href="{{ props.logo.href }}"
class="xs:gi-block gi-hidden"
class="md:gi-block gi-hidden"
>{{ govieLogo() }}</a
>
<a
aria-label="Go to the home page"
href="{{ props.logo.href }}"
class="xs:gi-hidden gi-block"
class="md:gi-hidden gi-block"
>{{ govieLogoSmall() }}</a
>
{% else %}
<span class="xs:gi-block gi-hidden">{{ govieLogo() }}</span>
<span class="xs:gi-hidden gi-block">{{ govieLogoSmall() }}</span>
<span class="md:gi-block gi-hidden">{{ govieLogo() }}</span>
<span class="md:gi-hidden gi-block">{{ govieLogoSmall() }}</span>
{% endif %}
{% if props.title %}
<div class="gi-heading-sm gi-tracking-wider gi-text-white !gi-m-0">
Expand Down
4 changes: 0 additions & 4 deletions packages/html/ds/src/header/header.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,6 @@ export const withTitle: Story = {
},
},
navLinks: [
{
href: '#link-1',
label: 'News',
},
{
href: '#link-2',
label: 'Departments',
Expand Down
5 changes: 0 additions & 5 deletions packages/react/ds/src/header/header.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,15 +233,10 @@ export const withTitle: Story = {
},
tools: {
search: {
label: 'Search',
action: '/search-page',
},
},
navLinks: [
{
href: '#',
label: 'News',
},
{
href: '#',
label: 'Departments',
Expand Down
10 changes: 5 additions & 5 deletions packages/react/ds/src/header/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,17 @@ export function Header({
id="MenuContainer"
className="gi-h-20 gi-justify-between gi-items-center gi-flex gi-bg-emerald-800 gi-relative gi-py-3 gi-px-4 sm:gi-px-8 sm:gi-py-4"
>
<div className="gi-flex gi-items-center gi-gap-4 md:gi-gap-6">
<div className="gi-flex gi-items-center gi-gap-4 md:gi-gap-6 lg:gi-gap-12">
{logo?.href ? (
<>
<a href={logo.href} className="xs:gi-block gi-hidden">
<a href={logo.href} className="md:gi-block gi-hidden">
{logo.image ? (
<img className="gi-object-contain gi-h-12" src={logo.image} />
) : (
<GovieLogo />
)}
</a>
<a href={logo.href} className="xs:gi-hidden gi-block">
<a href={logo.href} className="md:gi-hidden gi-block">
{logo.image ? (
<img className="gi-object-contain gi-h-10" src={logo.image} />
) : (
Expand All @@ -96,14 +96,14 @@ export function Header({
</>
) : (
<>
<span className="xs:gi-block gi-hidden">
<span className="md:gi-block gi-hidden">
{logo?.image ? (
<img className="gi-object-contain gi-h-12" src={logo.image} />
) : (
<GovieLogo />
)}
</span>
<span className="xs:gi-hidden gi-block">
<span className="md:gi-hidden gi-block">
{logo?.image ? (
<img className="gi-object-contain gi-h-10" src={logo.image} />
) : (
Expand Down

0 comments on commit 69df71a

Please sign in to comment.