diff --git a/packages/lds/src/Tabs/Tabs.css.ts b/packages/lds/src/Tabs/Tabs.css.ts index 847bb2fa..bb74b410 100644 --- a/packages/lds/src/Tabs/Tabs.css.ts +++ b/packages/lds/src/Tabs/Tabs.css.ts @@ -7,21 +7,23 @@ export const tabs = style({ }); export const tapList = style({ + position: 'relative', display: 'flex', - justifyContent: 'space-between', }); export const tapItem = style({ - width: '94px', - height: '48px', + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + flex: 1, }); export const link = style({ display: 'flex', justifyContent: 'center', alignItems: 'center', - width: '100%', - height: '100%', + width: '94px', + height: '48px', fontSize: '1.6rem', color: 'rgba(255, 255, 255, 0.3)', fontWeight: 'bold', diff --git a/packages/lds/src/Tabs/Tabs.tsx b/packages/lds/src/Tabs/Tabs.tsx index c0927948..10ed8b51 100644 --- a/packages/lds/src/Tabs/Tabs.tsx +++ b/packages/lds/src/Tabs/Tabs.tsx @@ -36,11 +36,9 @@ function Tabs({ tabInfos }: TabsProps) { const { textSpan } = matchedRoute if (textSpan) { - const { width, left } = textSpan.getBoundingClientRect() - setActiveTabStyle({ - width: `${width}px`, - left: `${left}px`, + width: `${textSpan.offsetWidth}px`, + left: `${textSpan.offsetLeft}px`, }) } } @@ -53,7 +51,7 @@ function Tabs({ tabInfos }: TabsProps) {
  • tabInfo.textSpan = ref}>{tabInfo.text} diff --git a/services/web/src/app/friend/layout.css.ts b/services/web/src/app/friend/layout.css.ts new file mode 100644 index 00000000..0255ed4d --- /dev/null +++ b/services/web/src/app/friend/layout.css.ts @@ -0,0 +1,8 @@ +import { style } from '@vanilla-extract/css'; + +export const section = style({ + maxWidth: '720px', + padding: '0 16px', + margin: '0 auto', + boxSizing: 'content-box', +}); diff --git a/services/web/src/app/friend/layout.tsx b/services/web/src/app/friend/layout.tsx index ed316c8f..b7bed733 100644 --- a/services/web/src/app/friend/layout.tsx +++ b/services/web/src/app/friend/layout.tsx @@ -1,10 +1,14 @@ -import { FriendHeaderContent } from '@/features/HeaderContent'; +import { FriendHeader } from '@features/Header'; + +import { section } from './layout.css' function FriendLayout({ children }: { children: React.ReactNode }) { return ( <> - - {children} + +
    + {children} +
    ) } diff --git a/services/web/src/app/me/layout.css.ts b/services/web/src/app/me/layout.css.ts new file mode 100644 index 00000000..0255ed4d --- /dev/null +++ b/services/web/src/app/me/layout.css.ts @@ -0,0 +1,8 @@ +import { style } from '@vanilla-extract/css'; + +export const section = style({ + maxWidth: '720px', + padding: '0 16px', + margin: '0 auto', + boxSizing: 'content-box', +}); diff --git a/services/web/src/app/me/layout.tsx b/services/web/src/app/me/layout.tsx index 206663bc..107ee35b 100644 --- a/services/web/src/app/me/layout.tsx +++ b/services/web/src/app/me/layout.tsx @@ -1,16 +1,16 @@ -import { MeHeaderContent } from '@/features/HeaderContent'; -import { Logo } from '@/features/Logo' +import { MyHeader } from '@features/Header'; + +import { section } from './layout.css' function MeLayout({ children }: { children: React.ReactNode }) { return ( <> -
    - -
    - - {children} + +
    + {children} +
    - ) + ); } -export default MeLayout +export default MeLayout; diff --git a/services/web/src/features/Header/FriendHeader.css.ts b/services/web/src/features/Header/FriendHeader.css.ts new file mode 100644 index 00000000..b2b5451b --- /dev/null +++ b/services/web/src/features/Header/FriendHeader.css.ts @@ -0,0 +1,19 @@ +import { style } from '@vanilla-extract/css'; + +export const minimizeStyle = style({}); + +export const header = style({ + background: 'linear-gradient(290.64deg, #FF8058 6.56%, #FB7A93 100.28%)', + + selectors: { + [`&.${minimizeStyle}`]: { + position: 'sticky', + top: 0, + }, + }, +}); + +export const headerContent = style({ + maxWidth: '720px', + margin: '0 auto', +}); diff --git a/services/web/src/features/HeaderContent/FriendHeaderContent.tsx b/services/web/src/features/Header/FriendHeader.tsx similarity index 72% rename from services/web/src/features/HeaderContent/FriendHeaderContent.tsx rename to services/web/src/features/Header/FriendHeader.tsx index 0fea20c2..25c8e8ce 100644 --- a/services/web/src/features/HeaderContent/FriendHeaderContent.tsx +++ b/services/web/src/features/Header/FriendHeader.tsx @@ -5,7 +5,7 @@ import { clsx } from 'clsx'; import { useParams } from 'next/navigation'; import { useRef } from 'react'; -import { contentWrapper, fixedHeader } from './FriendHeaderContent.css'; +import { minimizeStyle, header, headerContent } from './FriendHeader.css'; import { FriendProfile } from './components/FriendProfile'; import useMinimize from './hooks/useMinimize'; @@ -26,10 +26,12 @@ function FriendHeaderContent() { }); return ( -
    - - -
    +
    +
    + + +
    +
    ); } diff --git a/services/web/src/features/Header/MyHeader.css.ts b/services/web/src/features/Header/MyHeader.css.ts new file mode 100644 index 00000000..da3e1646 --- /dev/null +++ b/services/web/src/features/Header/MyHeader.css.ts @@ -0,0 +1,19 @@ +import { style } from '@vanilla-extract/css'; + +export const minimizeStyle = style({}); + +export const header = style({ + background: 'linear-gradient(270deg, #0989FF 0%, #713EFF 98.13%)', + + selectors: { + [`&.${minimizeStyle}`]: { + position: 'sticky', + top: 0, + }, + }, +}); + +export const headerContent = style({ + maxWidth: '720px', + margin: '0 auto', +}); diff --git a/services/web/src/features/HeaderContent/MeHeaderContent.tsx b/services/web/src/features/Header/MyHeader.tsx similarity index 62% rename from services/web/src/features/HeaderContent/MeHeaderContent.tsx rename to services/web/src/features/Header/MyHeader.tsx index 765e931d..544fdbfd 100644 --- a/services/web/src/features/HeaderContent/MeHeaderContent.tsx +++ b/services/web/src/features/Header/MyHeader.tsx @@ -4,8 +4,9 @@ import { Tabs, TabInfo } from '@linker/lds'; import { clsx } from 'clsx'; import { useRef } from 'react'; -import { contentWrapper, fixedHeader } from './MeHeaderContent.css'; -import { MeProfile } from './components/MeProfile'; +import { minimizeStyle, header, headerContent } from './MyHeader.css'; +import { Logo } from './components/Logo' +import { MyProfile } from './components/MyProfile'; import useMinimize from './hooks/useMinimize'; const MINIMIZE_THRESHOLD = 150; @@ -24,10 +25,13 @@ function MeHeaderContent() { }); return ( -
    - - -
    +
    +
    + {!isMinimize && } + + +
    +
    ); } diff --git a/services/web/src/features/HeaderContent/components/FriendProfile/FriendProfile.tsx b/services/web/src/features/Header/components/FriendProfile/FriendProfile.tsx similarity index 100% rename from services/web/src/features/HeaderContent/components/FriendProfile/FriendProfile.tsx rename to services/web/src/features/Header/components/FriendProfile/FriendProfile.tsx diff --git a/services/web/src/features/HeaderContent/components/FriendProfile/index.ts b/services/web/src/features/Header/components/FriendProfile/index.ts similarity index 100% rename from services/web/src/features/HeaderContent/components/FriendProfile/index.ts rename to services/web/src/features/Header/components/FriendProfile/index.ts diff --git a/services/web/src/features/Logo/Logo.css.ts b/services/web/src/features/Header/components/Logo/Logo.css.ts similarity index 83% rename from services/web/src/features/Logo/Logo.css.ts rename to services/web/src/features/Header/components/Logo/Logo.css.ts index db06a4ea..a3337135 100644 --- a/services/web/src/features/Logo/Logo.css.ts +++ b/services/web/src/features/Header/components/Logo/Logo.css.ts @@ -2,8 +2,7 @@ import { style } from '@vanilla-extract/css'; export const wrapper = style({ width: '100%', - padding: '16px 20px', - backgroundColor: 'black', + padding: '14px 20px', boxSizing: 'border-box', }); @@ -11,6 +10,7 @@ export const logo = style({ margin: 0, fontSize: '2rem', fontWeight: 'bold', + lineHeight: '2.4rem', fontStyle: 'italic', color: '#ffffff', }); diff --git a/services/web/src/features/Logo/Logo.tsx b/services/web/src/features/Header/components/Logo/Logo.tsx similarity index 76% rename from services/web/src/features/Logo/Logo.tsx rename to services/web/src/features/Header/components/Logo/Logo.tsx index 286ab39d..6e005e94 100644 --- a/services/web/src/features/Logo/Logo.tsx +++ b/services/web/src/features/Header/components/Logo/Logo.tsx @@ -2,9 +2,9 @@ import { wrapper, logo } from './Logo.css' function Logo() { return ( -
    +

    LINKER

    -
    + ) } diff --git a/services/web/src/features/Logo/index.ts b/services/web/src/features/Header/components/Logo/index.ts similarity index 100% rename from services/web/src/features/Logo/index.ts rename to services/web/src/features/Header/components/Logo/index.ts diff --git a/services/web/src/features/HeaderContent/components/MeProfile/MeProfile.css.ts b/services/web/src/features/Header/components/MyProfile/MyProfile.css.ts similarity index 77% rename from services/web/src/features/HeaderContent/components/MeProfile/MeProfile.css.ts rename to services/web/src/features/Header/components/MyProfile/MyProfile.css.ts index 1cfc3053..e9958de6 100644 --- a/services/web/src/features/HeaderContent/components/MeProfile/MeProfile.css.ts +++ b/services/web/src/features/Header/components/MyProfile/MyProfile.css.ts @@ -5,11 +5,11 @@ export const minimizeStyle = style({}); export const profileWrapper = style({ display: 'flex', alignItems: 'center', - padding: '1.4rem 2.3rem 2.4rem', + padding: '2rem', selectors: { [`&.${minimizeStyle}`]: { - padding: '1.2rem 2.3rem 1.4rem', + padding: '1.2rem 2rem', }, }, }); @@ -18,33 +18,26 @@ export const profileImageWrapper = style({ display: 'flex', justifyContent: 'center', alignItems: 'center', + overflow: 'hidden', width: '7.2rem', height: '7.2rem', boxSizing: 'content-box', - border: '3px solid #49a15f', - borderRadius: '50%', + border: '2px solid #FFFFFF', + borderRadius: '42%', selectors: { [`&.${minimizeStyle}`]: { - width: '3.4rem', - height: '3.4rem', + width: '4rem', + height: '4rem', }, }, }); export const profileImage = style({ - width: '6.7rem', - height: '6.7rem', + width: '100%', + height: '100%', objectFit: 'cover', objectPosition: 'top', - borderRadius: '50%', - - selectors: { - [`&.${minimizeStyle}`]: { - width: '3rem', - height: '3rem', - }, - }, }); export const profileInfo = style({ diff --git a/services/web/src/features/HeaderContent/components/MeProfile/MeProfile.tsx b/services/web/src/features/Header/components/MyProfile/MyProfile.tsx similarity index 83% rename from services/web/src/features/HeaderContent/components/MeProfile/MeProfile.tsx rename to services/web/src/features/Header/components/MyProfile/MyProfile.tsx index ceb5af2f..4c3b90c1 100644 --- a/services/web/src/features/HeaderContent/components/MeProfile/MeProfile.tsx +++ b/services/web/src/features/Header/components/MyProfile/MyProfile.tsx @@ -11,18 +11,18 @@ import { name, job, tag, -} from './MeProfile.css' +} from './MyProfile.css' interface ProfileProps { isMinimize: boolean } -function MeProfile({ isMinimize }: ProfileProps) { +function MyProfile({ isMinimize }: ProfileProps) { return (
    main profile @@ -36,4 +36,4 @@ function MeProfile({ isMinimize }: ProfileProps) { ); } -export default MeProfile; +export default MyProfile; diff --git a/services/web/src/features/Header/components/MyProfile/index.ts b/services/web/src/features/Header/components/MyProfile/index.ts new file mode 100644 index 00000000..d27e8b13 --- /dev/null +++ b/services/web/src/features/Header/components/MyProfile/index.ts @@ -0,0 +1 @@ +export { default as MyProfile } from './MyProfile'; diff --git a/services/web/src/features/HeaderContent/hooks/useMinimize.tsx b/services/web/src/features/Header/hooks/useMinimize.tsx similarity index 100% rename from services/web/src/features/HeaderContent/hooks/useMinimize.tsx rename to services/web/src/features/Header/hooks/useMinimize.tsx diff --git a/services/web/src/features/Header/index.ts b/services/web/src/features/Header/index.ts new file mode 100644 index 00000000..6a536a8a --- /dev/null +++ b/services/web/src/features/Header/index.ts @@ -0,0 +1,2 @@ +export { default as MyHeader } from './MyHeader'; +export { default as FriendHeader } from './FriendHeader'; diff --git a/services/web/src/features/HeaderContent/FriendHeaderContent.css.ts b/services/web/src/features/HeaderContent/FriendHeaderContent.css.ts deleted file mode 100644 index 761620b1..00000000 --- a/services/web/src/features/HeaderContent/FriendHeaderContent.css.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { style } from '@vanilla-extract/css'; - -export const contentWrapper = style({ - backgroundColor: 'black', -}); - -export const fixedHeader = style({ - position: 'sticky', - top: 0, -}); diff --git a/services/web/src/features/HeaderContent/MeHeaderContent.css.ts b/services/web/src/features/HeaderContent/MeHeaderContent.css.ts deleted file mode 100644 index 761620b1..00000000 --- a/services/web/src/features/HeaderContent/MeHeaderContent.css.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { style } from '@vanilla-extract/css'; - -export const contentWrapper = style({ - backgroundColor: 'black', -}); - -export const fixedHeader = style({ - position: 'sticky', - top: 0, -}); diff --git a/services/web/src/features/HeaderContent/components/MeProfile/index.ts b/services/web/src/features/HeaderContent/components/MeProfile/index.ts deleted file mode 100644 index b9cc0023..00000000 --- a/services/web/src/features/HeaderContent/components/MeProfile/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default as MeProfile } from './MeProfile'; diff --git a/services/web/src/features/HeaderContent/index.ts b/services/web/src/features/HeaderContent/index.ts deleted file mode 100644 index 0928738f..00000000 --- a/services/web/src/features/HeaderContent/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { default as MeHeaderContent } from './MeHeaderContent'; -export { default as FriendHeaderContent } from './FriendHeaderContent';