Skip to content

Commit ce9d9c4

Browse files
remove ribbon component and apply mobile navbar style
1 parent 72cf3f6 commit ce9d9c4

File tree

8 files changed

+25
-52
lines changed

8 files changed

+25
-52
lines changed

src/features/common/components/errors/error-page/error-page.component.tsx

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React from "react";
22
import styles from "./error-page.module.scss";
33
import { ShellComponent } from "@/features/common/components/shell/shell.component";
4-
import { RibbonComponent } from "@/features/common/components/bars/ribbon/ribbon.component";
54
import { MobileHeaderComponent } from "@/features/common/components/headers/mobile-header/mobile-header.component";
65
import { HeaderComponent } from "@/features/common/components/headers/header/header.component";
76
import { FooterComponent } from "@/features/common/components/footer/footer.component";
@@ -33,25 +32,11 @@ export const ErrorPageComponent: React.FC<ErrorPageComponentProps> = ({
3332
languageCode={languageCode}
3433
dictionary={dictionary.header}
3534
siteLogo={<SiteLogoComponent languageCode={languageCode} />}
36-
ribbon={
37-
<RibbonComponent
38-
themeCode={themeCode}
39-
languageCode={languageCode}
40-
dictionary={dictionary.ribbon}
41-
/>
42-
}
4335
/>
4436
<HeaderComponent
4537
languageCode={languageCode}
4638
dictionary={dictionary.header}
4739
siteLogo={<SiteLogoComponent languageCode={languageCode} />}
48-
ribbon={
49-
<RibbonComponent
50-
themeCode={themeCode}
51-
languageCode={languageCode}
52-
dictionary={dictionary.ribbon}
53-
/>
54-
}
5540
/>
5641
</header>
5742
<main className={styles.main}>{children}</main>

src/features/common/components/headers/header/header.component.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@ interface HeaderComponentProps {
1515
languageCode: string;
1616
dictionary: LayoutDictionaryModel["header"];
1717
siteLogo: React.ReactNode;
18-
ribbon: React.ReactNode;
1918
}
2019

2120
export const HeaderComponent: React.FC<HeaderComponentProps> = ({
2221
languageCode,
2322
dictionary,
2423
siteLogo,
25-
ribbon,
2624
}) => {
2725
const pathname = usePathname();
2826
const pathnameSegments = getPathnameSegments(pathname);
@@ -39,7 +37,6 @@ export const HeaderComponent: React.FC<HeaderComponentProps> = ({
3937

4038
return (
4139
<header className={styles.header}>
42-
{ribbon}
4340
<BoxComponent
4441
contentAs="nav"
4542
containerClassName={styles.container}

src/features/common/components/headers/header/header.module.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
flex: 1;
4242
display: flex;
4343
align-items: center;
44-
justify-content: flex-end;
44+
justify-content: center;
4545
gap: 3rem;
4646
}
4747

@@ -90,3 +90,7 @@
9090
border-radius: 0.125rem;
9191
}
9292
}
93+
94+
.header_actions {
95+
96+
}

src/features/common/components/headers/mobile-header/mobile-header.component.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@ interface MobileHeaderComponentProps {
1616
languageCode: string;
1717
dictionary: LayoutDictionaryModel["header"];
1818
siteLogo: React.ReactNode;
19-
ribbon: React.ReactNode;
2019
}
2120

2221
export const MobileHeaderComponent: React.FC<MobileHeaderComponentProps> = ({
2322
languageCode,
2423
dictionary,
2524
siteLogo,
26-
ribbon,
2725
}) => {
2826
const pathname = usePathname();
2927
const [currentPathname, setCurrentPathname] = useState<string | null>(null);
@@ -81,7 +79,6 @@ export const MobileHeaderComponent: React.FC<MobileHeaderComponentProps> = ({
8179
return (
8280
<>
8381
<header className={styles.header}>
84-
{ribbon}
8582
<BoxComponent
8683
contentAs="nav"
8784
containerClassName={styles.container}

src/features/common/components/headers/mobile-header/mobile-header.module.scss

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,18 @@
11
@use "@/libs/theme/styles/variables" as *;
22
@use "@/libs/theme/styles/mixins" as *;
33

4-
.header {
4+
.container {
5+
width: calc(100% - 2rem);
56
position: fixed;
6-
top: 0;
7+
top: 1rem;
78
right: 0;
89
left: 0;
9-
10-
z-index: 9001;
11-
backdrop-filter: blur(2rem);
12-
}
13-
14-
.container {
15-
@include Container;
16-
10+
border-radius: 1rem;
11+
margin: 0 auto;
1712
background: var(--color_bg_app_bar);
18-
border-bottom: 1px solid rgba(#555, 0.32);
19-
20-
@media #{$breakpoint-dimension-sm} {
21-
display: none;
22-
}
13+
border: 1px solid var(--color_bg_app_bar_border);
14+
backdrop-filter: blur(2rem);
15+
z-index: 100;
2316
}
2417

2518
.wrapper {

src/features/common/components/layout/page-header/page-header.component.tsx

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,11 @@ export const PageHeaderComponent: React.FC<PageHeaderComponentProps> = ({
2424
languageCode={languageCode}
2525
dictionary={layoutDictionary.header}
2626
siteLogo={siteLogo}
27-
ribbon={
28-
<RibbonComponent
29-
themeCode={themeCode}
30-
languageCode={languageCode}
31-
dictionary={layoutDictionary.ribbon}
32-
/>
33-
}
3427
/>
3528
<HeaderComponent
3629
languageCode={languageCode}
3730
dictionary={layoutDictionary.header}
3831
siteLogo={siteLogo}
39-
ribbon={
40-
<RibbonComponent
41-
themeCode={themeCode}
42-
languageCode={languageCode}
43-
dictionary={layoutDictionary.ribbon}
44-
/>
45-
}
4632
/>
4733
</>
4834
);
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
interface ThemeToggleComponentProps {
2+
3+
}
4+
5+
export const ThemeToggleComponent: React.FC<ThemeToggleComponentProps> = ({
6+
}) => {
7+
return (
8+
<div>Theme Toggle</div>
9+
);
10+
};

src/libs/theme/styles/globals.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848
--color_fg_default: var(--functional-gray-200);
4949
--color_fg_link_primary: var(--cloud);
5050

51-
--color_bg_app_bar: rgba(17, 17, 17, 0.66);
51+
--color_bg_app_bar: hsla(0,0%,7%,.04);
52+
--color_bg_app_bar_border: hsla(0, 0%, 7%, .12);
5253
--color_bg_app_bar_plain: rgba(17, 17, 17);
5354

5455
--color_fg_link: var(--functional-gray-50);

0 commit comments

Comments
 (0)