Skip to content

Commit

Permalink
[Ticket-v1.3.0] 상단바 디자인 개선, g ads (#319)
Browse files Browse the repository at this point in the history
* feat : 모바일 상단바 디자인 개선 (#317)

Co-authored-by: 9yujin <[email protected]>

* ci : 도커파일 버전 18로 올림 (#318)

Co-authored-by: 9yujin <[email protected]>

* fix : build error

* fix : build error

* fix : build error(admin immutable)

* fix : build error

* fix : build error

* fix : build error

* feat : 구글애즈 메타태그

---------

Co-authored-by: 9yujin <[email protected]>
  • Loading branch information
9yujin and 9yujin authored Nov 10, 2024
1 parent c41b4f3 commit 3c4e3de
Show file tree
Hide file tree
Showing 22 changed files with 149 additions and 211 deletions.
7 changes: 4 additions & 3 deletions Dockerfile.admin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16 AS builder
FROM node:18-alpine AS builder
# set working directory
WORKDIR /app
# install app dependencies
Expand All @@ -8,8 +8,9 @@ COPY package.json ./
COPY yarn.lock ./
# Installs all node packages
# RUN npm ci
RUN npm install yarn --global --force
RUN yarn install --immutable --immutable-cache --check-cache
RUN yarn set version 3.3.0
RUN yarn install
# --immutable --immutable-cache --check-cache


# Copies everything over to Docker environment
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.ticket
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine AS builder
FROM node:18-alpine AS builder
# set working directory
WORKDIR /app
# install app dependencies
Expand Down
1 change: 1 addition & 0 deletions apps/admin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#F8F8FA" />
<meta name="google-adsense-account" content="ca-pub-6683895022461371" />
<title>두둥! - 어드민</title>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion apps/ticket/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports = withBundleAnalyzer(
},
images: {
domains: ['asset.dudoong.com'],
minimumCacheTTL: 86400,
minimumCacheTTL: 5184000,
},
rewrites: async () => [
{
Expand Down
1 change: 1 addition & 0 deletions apps/ticket/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"react-dom": "18.2.0",
"react-spring-bottom-sheet": "^3.4.1",
"recoil": "^0.7.6",
"sharp": "^0.32.1",
"swiper": "^9.0.5",
"typescript": "4.9.4"
},
Expand Down
4 changes: 4 additions & 0 deletions apps/ticket/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ function MyApp({ Component, pageProps, loginData }: MyAppProps) {
name="viewport"
content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width"
/>
<meta
name="google-adsense-account"
content="ca-pub-6683895022461371"
></meta>
</Head>
{/* Global Site Tag (gtag.js) - Google Analytics */}
<Script
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import FeaturePCImage from '@assets/landing-renewal/feature-pc.svg';
import { FlexBox, Spacing } from '@dudoong/ui';
import { ImpressionStartSetHeader } from '../ImpressionStartSetHeader';

export const FeaturePC = () => {
return (
<FlexBox direction={'column'}>
<FeaturePCImage />
<ImpressionStartSetHeader color="white">
<Spacing size={180} />
</ImpressionStartSetHeader>
<Spacing size={180} />
</FlexBox>
);
};
52 changes: 11 additions & 41 deletions apps/ticket/src/components/home/Landing/index.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
import { Footer, useHeaderColorContext } from '@dudoong/ui';
import { Footer } from '@dudoong/ui';
import DDHead from '@components/shared/Layout/NextHead';
import { css } from '@emotion/react';
import Media from '@components/shared/Media';
import { Title } from './title';
import { ImpressionArea } from '@toss/impression-area';
import { useEffect } from 'react';
import { Intro } from './intro';
import { Feature } from './feature';
import { Special } from './special';
import { Outro } from './outro';

const Landing = () => {
const { setHeaderColor } = useHeaderColorContext();

useEffect(() => {
setHeaderColor('black');
}, []);

return (
<>
<DDHead
Expand All @@ -33,41 +25,19 @@ const Landing = () => {
`}
>
<Media.Mobile>
<ImpressionArea
onImpressionStart={() => setHeaderColor('black')}
onImpressionEnd={() => setHeaderColor('white')}
>
<Title.Mobile />
<Intro.Mobile />
</ImpressionArea>
<ImpressionArea onImpressionEnd={() => setHeaderColor('black')}>
<Feature.Mobile />
</ImpressionArea>
<ImpressionArea onImpressionEnd={() => setHeaderColor('white')}>
<Special.Mobile />
</ImpressionArea>
<ImpressionArea>
<Outro />
</ImpressionArea>
<Title.Mobile />
<Intro.Mobile />
<Feature.Mobile />
<Special.Mobile />
<Outro />
</Media.Mobile>

<Media.PC>
<ImpressionArea
onImpressionStart={() => setHeaderColor('black')}
onImpressionEnd={() => setHeaderColor('white')}
>
<Title.PC />
</ImpressionArea>
<ImpressionArea onImpressionEnd={() => setHeaderColor('black')}>
<Intro.PC />
<Feature.PC />
</ImpressionArea>
<ImpressionArea onImpressionEnd={() => setHeaderColor('white')}>
<Special.PC />
</ImpressionArea>
<ImpressionArea>
<Outro />
</ImpressionArea>
<Title.PC />
<Intro.PC />
<Feature.PC />
<Special.PC />
<Outro />
</Media.PC>
</main>
<section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import SpecialFourth from '@assets/landing-renewal/special-4.svg';
import { css } from '@emotion/react';
import { backgroundBlackStyle } from '../backgroundBlackStyle';
import { ReactNode } from 'react';
import { ImpressionStartSetHeader } from '../ImpressionStartSetHeader';

export const SpecialMobile = () => {
return (
Expand Down Expand Up @@ -54,9 +53,7 @@ export const SpecialMobile = () => {
}
/>
</div>
<ImpressionStartSetHeader color="black">
<Spacing size={120} />
</ImpressionStartSetHeader>
<Spacing size={120} />
</FlexBox>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import SpecialThird from '@assets/landing-renewal/special-3.svg';
import SpecialFourth from '@assets/landing-renewal/special-4.svg';
import { css } from '@emotion/react';
import { backgroundBlackStyle } from '../backgroundBlackStyle';
import { ImpressionStartSetHeader } from '../ImpressionStartSetHeader';

export const SpecialPC = () => {
return (
Expand Down Expand Up @@ -84,9 +83,7 @@ export const SpecialPC = () => {
/>
</FlexBox>
</div>
<ImpressionStartSetHeader color="black">
<Spacing size={190} />
</ImpressionStartSetHeader>
<Spacing size={190} />
</FlexBox>
);
};
Expand Down
13 changes: 11 additions & 2 deletions apps/ticket/src/components/home/Landing/title/Title.Mobile.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Spacing, Text } from '@dudoong/ui';
import { Spacing, Text, theme } from '@dudoong/ui';
import { css } from '@emotion/react';
import Logo from '@assets/landing-renewal/title-logo.svg';
import TitleIllustMobile from '@assets/landing-renewal/title-illust-mobile.svg';
Expand All @@ -7,7 +7,16 @@ import { backgroundBlackStyle } from '../backgroundBlackStyle';
export const TitleMobile = () => {
return (
<div css={backgroundBlackStyle}>
<Spacing size={12} />
<div
css={css({
position: 'absolute',
top: 0,
width: '100%',
height: 72,
backgroundColor: theme.palette.black,
})}
/>
<Spacing size={24} />
<Logo css={css({ marginLeft: 24, width: 231 })} />
<Spacing size={22} />
<div css={css({ marginLeft: 24 })}>
Expand Down
30 changes: 10 additions & 20 deletions apps/ticket/src/components/shared/Layout/HeaderLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
/** @jsxImportSource @emotion/react */
import styled from '@emotion/styled';
import { PropsWithChildren, useState } from 'react';
import {
Divider,
Header,
PopupOptions,
ProfileImage,
ThemeType,
useHeaderColorContext,
} from '@dudoong/ui';
import { PropsWithChildren } from 'react';
import { Divider, Header, PopupOptions, ProfileImage } from '@dudoong/ui';
import { media } from '@dudoong/ui/src/theme';
import { useRouter } from 'next/router';
import { useRecoilValue, useResetRecoilState } from 'recoil';
Expand Down Expand Up @@ -37,7 +30,6 @@ const navigatorMap = {
export const HeaderLayout = ({ children }: PropsWithChildren) => {
const { push, asPath } = useRouter();
const { userProfile, isAuthenticated } = useRecoilValue(authState);
const { theme } = useHeaderColorContext();

const { Toast } = useToastify();
const resetAuthState = useResetRecoilState(authState);
Expand Down Expand Up @@ -82,7 +74,7 @@ export const HeaderLayout = ({ children }: PropsWithChildren) => {
}
/>
{(asPath === '/' || asPath === '/home') && (
<Navigator colortheme={theme}>
<Navigator>
<>
{navigatorMap[asPath].map((link) => (
<Link href={link.url} key={link.title}>
Expand Down Expand Up @@ -116,21 +108,21 @@ export const HeaderLayout = ({ children }: PropsWithChildren) => {
url="/mypage"
text="마이페이지"
padding={[12, 24]}
textColor={theme === 'black' ? 'gray_200' : 'gray_500'}
textColor={'gray_500'}
/>
<Shortcuts
onClick={logoutMutate}
text="로그아웃"
padding={[12, 24]}
textColor={theme === 'black' ? 'gray_200' : 'gray_500'}
textColor={'gray_500'}
/>
</>
) : (
<Shortcuts
onClick={handleLogin}
text="로그인"
padding={[12, 24]}
textColor={theme === 'black' ? 'gray_200' : 'gray_500'}
textColor={'gray_500'}
/>
)}
<Divider line padding={24} height={12} />
Expand All @@ -141,11 +133,12 @@ export const HeaderLayout = ({ children }: PropsWithChildren) => {
key={link.title}
text={link.title}
padding={[12, 24]}
textColor={theme === 'black' ? 'gray_200' : 'gray_500'}
textColor={'gray_500'}
/>
))}
</MobileHeader>
)}

{/* 서비스 콘텐츠 */}
<Content>
<div>{children}</div>
Expand Down Expand Up @@ -188,15 +181,13 @@ const Content = styled.div`
}
`;

const Navigator = styled.div<{ colortheme: ThemeType }>`
const Navigator = styled.div`
${media.mobile} {
display: none;
}
position: absolute;
top: 12px;
${({ theme }) => theme.typo.G_Side_15_M}
color : ${({ theme, colortheme }) =>
colortheme === 'black' ? theme.palette.white : undefined};
display: flex;
gap: 36px;
right: 180px;
Expand All @@ -206,8 +197,7 @@ const Navigator = styled.div<{ colortheme: ThemeType }>`
border-radius: 12px;
&:hover {
background-color: ${({ theme, colortheme }) =>
colortheme === 'white' && theme.palette.gray_100};
background-color: ${({ theme }) => theme.palette.gray_100};
}
}
`;
22 changes: 5 additions & 17 deletions apps/ticket/src/components/shared/Layout/HeaderProfileElement.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
import {
Popup,
PopupOptions,
Profile,
ThemeType,
useHeaderColorContext,
} from '@dudoong/ui';
import { Popup, PopupOptions, Profile } from '@dudoong/ui';
import { palette } from '@dudoong/ui/src/theme/palette';
import { css } from '@emotion/react';
import styled from '@emotion/styled';
Expand All @@ -17,7 +11,6 @@ interface HeaderProfileElement {
}
const HeaderProfileElement = (props: HeaderProfileElement) => {
const { name, profileOption, image, handleLogin } = props;
const { theme } = useHeaderColorContext();

return (
<>
Expand All @@ -42,23 +35,18 @@ const HeaderProfileElement = (props: HeaderProfileElement) => {
}
/>
) : (
<LoginButton onClick={handleLogin} colortheme={theme}>
로그인
</LoginButton>
<LoginButton onClick={handleLogin}>로그인</LoginButton>
)}
</>
);
};
const LoginButton = styled.button<{ colortheme?: ThemeType }>`
const LoginButton = styled.button`
height: 40px;
width: 80px;
border-radius: 12px;
border: 1px solid
${({ theme, colortheme }) =>
colortheme === 'black' ? theme.palette.white : theme.palette.black};
border: 1px solid ${({ theme }) => theme.palette.black};
${({ theme }) => theme.typo.Text_16}
color: ${({ theme, colortheme }) =>
colortheme === 'black' ? theme.palette.white : theme.palette.black};
color: ${({ theme }) => theme.palette.black};
line-height: 100%;
`;

Expand Down
Loading

0 comments on commit 3c4e3de

Please sign in to comment.