Skip to content

Commit

Permalink
fix: event mobile layout
Browse files Browse the repository at this point in the history
  • Loading branch information
melniiv committed Dec 6, 2024
1 parent 333f404 commit c4be1f5
Show file tree
Hide file tree
Showing 8 changed files with 221 additions and 191 deletions.
9 changes: 7 additions & 2 deletions src/common/components/table/table.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

.tableWrapper {
max-width: 100%;
overflow-x: auto;
white-space: nowrap;
}

.table {
Expand All @@ -15,6 +17,7 @@
--fontsize-cell-header: var(--fontsize-body-l);
--margin-bottom-table: var(--spacing-m);
--spacing-cell: var(--spacing-m) var(--spacing-xs);
--spacing-cell-mobile: var(--spacing-xs) var(--spacing-xs);
--expanded-row-border-color: var(--color-black-30);

width: 100%;
Expand All @@ -27,10 +30,11 @@
font-size: var(--fontsize-cell-header);
font-weight: normal;
text-align: left;
padding: var(--spacing-cell);
padding: var(--spacing-cell-mobile);
border-bottom: 1px solid var(--border-color-cell);

@include respond-above(l) {
padding: var(--spacing-cell);
&:nth-child(2) {
padding-left: 0;
}
Expand Down Expand Up @@ -60,9 +64,10 @@
font-size: var(--fontsize-cell);
font-weight: normal;
text-align: left;
padding: var(--spacing-cell);
padding: var(--spacing-cell-mobile);

@include respond-above(l) {
padding: var(--spacing-cell);
&:nth-child(2) {
padding-left: 0;
}
Expand Down
4 changes: 2 additions & 2 deletions src/domain/app/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const Header: React.FC = () => {
};

return (
<div>
<>
<Navigation
languages={HARDCODED_LANGUAGES}
menu={menu}
Expand All @@ -113,7 +113,7 @@ const Header: React.FC = () => {
getPathnameForLanguage={getPathnameForLanguage}
/>
<HeaderNotification />
</div>
</>
);
};

Expand Down
176 changes: 87 additions & 89 deletions src/domain/app/header/__tests__/__snapshots__/Header.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,112 +1,110 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Header matches snapshot 1`] = `
<div>
<header
class="hds-header Header-module_header__291GF"
style="--header-max-width: var(--breakpoint-xl);"
<header
class="hds-header Header-module_header__291GF"
style="--header-max-width: var(--breakpoint-xl);"
>
<div
class="Header-module_headerBackgroundWrapper__KsFy2"
>
<div
class="Header-module_headerBackgroundWrapper__KsFy2"
<a
class="SkipLink-module_skipLink__1knzF"
href="#main-content"
>
<a
class="SkipLink-module_skipLink__1knzF"
href="#main-content"
<span
class="SkipLink-module_skipLinkLabel__21n5B"
>
<span
class="SkipLink-module_skipLinkLabel__21n5B"
>
skip to content
</span>
</a>
skip to content
</span>
</a>
<div
class="HeaderActionBar-module_headerActionBarContainer__5tfj-"
>
<div
class="HeaderActionBar-module_headerActionBarContainer__5tfj-"
class="HeaderActionBar-module_headerActionBar__lPeGE"
>
<div
class="HeaderActionBar-module_headerActionBar__lPeGE"
<a
aria-label="Helsingin kaupunki"
class="HeaderActionBar-module_titleAndLogoContainer__2LEAb HeaderActionBar-module_logo__2r2T0"
href="#"
role="link"
>
<a
aria-label="Helsingin kaupunki"
class="HeaderActionBar-module_titleAndLogoContainer__2LEAb HeaderActionBar-module_logo__2r2T0"
href="#"
role="link"
<span
class="HeaderActionBarLogo-module_logoWrapper__8NgfS"
>
<span
class="HeaderActionBarLogo-module_logoWrapper__8NgfS"
>
<img
alt="Helsinki"
class="Logo-module_logo__Y2mwP Logo-module_large__3Tjj3"
src="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNzggMzYiIHRpdGxlPSJIZWxzaW5naW4ga2F1cHVua2kiIHJvbGU9ImltZyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoCiAgICAgICAgZD0iTTc1Ljc1MyAyLjI1MXYyMC43YzAgMy45NS0zLjI3NSA3LjE3OC03LjMxIDcuMTc4aC0yMi4yNmMtMi42NzQgMC01LjIwNS45Ni03LjE4MyAyLjczOWExMC43NDkgMTAuNzQ5IDAgMDAtNy4xODMtMi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5LS4zODctLjE1OS0uNzQ0di04LjM4MnptLTcuMjQ2IDQuNTdjLS43OTUgMC0xLjQ0Ni41NTgtMS42MjEgMS41ODFoMy4wNWMuMDE3LS44OTktLjU4Ny0xLjU4LTEuNDMtMS41OHptMy4zNTMgMy4wMDdIMjMuNjNjLjA5NSAxLjIyNC43OTQgMS44MjggMS43IDEuODI4LjgxIDAgMS4zNjctLjUyNyAxLjQ5NC0xLjI0bDEuODI4IDEuMDA3Yy0uNTQuOTYxLTEuNyAxLjc5OC0zLjMyMiAxLjc5OC0yLjE2IDAtMy43NS0xLjQ3Mi0zLjc1LTMuOTUxIDAtMi40NjQgMS42Mi0zLjk1MSAzLjcwMy0zLjk1MSAyLjA4MSAwIDMuNDY0IDEuNDQgMy40NjQgMy40ODYtLjAxNi42MDQtLjExMSAxLjAyMy0uMTExIDEuMDIzem0tMTEuMDc3IDMuMjA3aDIuMjU3VjEwLjkxNmgtMi4yNTd2NC4xMDdoLTQuMjQzdi00LjA5MUgxMS4wNnYxMC4zNjZoMi4yNTZ2LTQuMjkyaDQuMjQzdjQuMjkyeiIKICAgICAgICBmaWxsPSJjdXJyZW50Q29sb3IiIC8+Cjwvc3ZnPg=="
/>
</span>
</a>
<a
class="HeaderActionBar-module_titleAndLogoContainer__2LEAb HeaderActionBar-module_title__opzt9 HeaderActionBar-module_normal__3B4qi"
href="#"
<img
alt="Helsinki"
class="Logo-module_logo__Y2mwP Logo-module_large__3Tjj3"
src="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNzggMzYiIHRpdGxlPSJIZWxzaW5naW4ga2F1cHVua2kiIHJvbGU9ImltZyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoCiAgICAgICAgZD0iTTc1Ljc1MyAyLjI1MXYyMC43YzAgMy45NS0zLjI3NSA3LjE3OC03LjMxIDcuMTc4aC0yMi4yNmMtMi42NzQgMC01LjIwNS45Ni03LjE4MyAyLjcz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NC0uMDc3LS41MDktLjIxNi0uMTExLS4xNC0uMTU5LS4zODctLjE1OS0uNzQ0di04LjM4MnptLTcuMjQ2IDQuNTdjLS43OTUgMC0xLjQ0Ni41NTgtMS42MjEgMS41ODFoMy4wNWMuMDE3LS44OTktLjU4Ny0xLjU4LTEuNDMtMS41OHptMy4zNTMgMy4wMDdIMjMuNjNjLjA5NSAxLjIyNC43OTQgMS44MjggMS43IDEuODI4LjgxIDAgMS4zNjctLjUyNyAxLjQ5NC0xLjI0bDEuODI4IDEuMDA3Yy0uNTQuOTYxLTEuNyAxLjc5OC0zLjMyMiAxLjc5OC0yLjE2IDAtMy43NS0xLjQ3Mi0zLjc1LTMuOTUxIDAtMi40NjQgMS42Mi0zLjk1MSAzLjcwMy0zLjk1MSAyLjA4MSAwIDMuNDY0IDEuNDQgMy40NjQgMy40ODYtLjAxNi42MDQtLjExMSAxLjAyMy0uMTExIDEuMDIzem0tMTEuMDc3IDMuMjA3aDIuMjU3VjEwLjkxNmgtMi4yNTd2NC4xMDdoLTQuMjQzdi00LjA5MUgxMS4wNnYxMC4zNjZoMi4yNTZ2LTQuMjkyaDQuMjQzdjQuMjkyeiIKICAgICAgICBmaWxsPSJjdXJyZW50Q29sb3IiIC8+Cjwvc3ZnPg=="
/>
</span>
</a>
<a
class="HeaderActionBar-module_titleAndLogoContainer__2LEAb HeaderActionBar-module_title__opzt9 HeaderActionBar-module_normal__3B4qi"
href="#"
>
<span
class="HeaderActionBar-module_title__opzt9"
>
<span
class="HeaderActionBar-module_title__opzt9"
>
Test site
</span>
</a>
Test site
</span>
</a>
<div
class="HeaderActionBar-module_headerActions__3lNnM"
>
<div
class="HeaderActionBar-module_headerActions__3lNnM"
class="HeaderLanguageSelector-module_languageSelector__3d38B"
>
<div
class="HeaderLanguageSelector-module_languageSelector__3d38B"
class="HeaderLanguageSelector-module_languageNodes__lTe8p"
>
<div
class="HeaderLanguageSelector-module_languageNodes__lTe8p"
<button
aria-current="true"
class="HeaderLanguageSelector-module_item__3_I7N HeaderLanguageSelector-module_activeItem__15LKg"
lang="fi"
type="button"
>
<span>
Suomi
</span>
</button>
<button
aria-current="false"
class="HeaderLanguageSelector-module_item__3_I7N"
lang="sv"
type="button"
>
<span>
Svenska
</span>
</button>
<button
aria-current="false"
class="HeaderLanguageSelector-module_item__3_I7N"
lang="en"
type="button"
>
<button
aria-current="true"
class="HeaderLanguageSelector-module_item__3_I7N HeaderLanguageSelector-module_activeItem__15LKg"
lang="fi"
type="button"
>
<span>
Suomi
</span>
</button>
<button
aria-current="false"
class="HeaderLanguageSelector-module_item__3_I7N"
lang="sv"
type="button"
>
<span>
Svenska
</span>
</button>
<button
aria-current="false"
class="HeaderLanguageSelector-module_item__3_I7N"
lang="en"
type="button"
>
<span>
English
</span>
</button>
</div>
<span>
English
</span>
</button>
</div>
</div>
</div>
</div>
<div
class="HeaderNavigationMenu-module_headerNavigationMenuContainer__2nK9z"
</div>
<div
class="HeaderNavigationMenu-module_headerNavigationMenuContainer__2nK9z"
>
<nav
class="HeaderNavigationMenu-module_headerNavigationMenu__3G6-N"
>
<nav
class="HeaderNavigationMenu-module_headerNavigationMenu__3G6-N"
>
<ul
class="HeaderNavigationMenu-module_headerNavigationMenuList__3HIzx"
/>
</nav>
</div>
<ul
class="HeaderNavigationMenu-module_headerNavigationMenuList__3HIzx"
/>
</nav>
</div>
</header>
</div>
</div>
</header>
`;
Loading

0 comments on commit c4be1f5

Please sign in to comment.