Skip to content

Commit

Permalink
Merge pull request #8 from team-nerd-planet/feature/woowon
Browse files Browse the repository at this point in the history
feat: 러쉬 작업
  • Loading branch information
thewoowon authored Jul 18, 2024
2 parents 979007b + 151fb22 commit e7adc74
Show file tree
Hide file tree
Showing 44 changed files with 1,807 additions and 2,707 deletions.
2 changes: 1 addition & 1 deletion app/approve/[token]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { approveSubscription } from "services/subscription/queries";
import { approveSubscription } from "@services/subscription/queries";

const ApprovePage = async ({
params: { token },
Expand Down
2 changes: 1 addition & 1 deletion app/collection/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import styled from "@emotion/styled";
import { companyList } from "constants/company";
import { companyList } from "@/constants/company";

const CollectionPage = () => {
return (
Expand Down
75 changes: 60 additions & 15 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
--toastify-text-color-light: #f8f9fe !important;
--toastify-color-progress-success: #93ebff !important;
}

* {
@apply border-border;
}

body {
font-family: "Pretendard Variable", Pretendard, -apple-system,
BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI",
Expand All @@ -31,10 +33,12 @@
.text-balance {
text-wrap: balance;
}

.stack {
display: flex;
flex-direction: column;
}

.center {
display: flex;
justify-content: center;
Expand All @@ -43,23 +47,27 @@
}

@layer components {

/* background-color: 효과; */
.glow {
animation: glow 1s ease-in-out infinite;
}

@keyframes glow {
0% {
text-shadow: 0 0 10px var(--foreground), 0 0 20px var(--foreground),
0 0 30px var(--foreground), 0 0 40px var(--foreground),
0 0 50px var(--foreground), 0 0 60px var(--foreground),
0 0 70px var(--foreground), 0 0 80px var(--foreground);
}

50% {
text-shadow: 0 0 20px var(--foreground), 0 0 30px var(--foreground),
0 0 40px var(--foreground), 0 0 50px var(--foreground),
0 0 60px var(--foreground), 0 0 70px var(--foreground),
0 0 80px var(--foreground), 0 0 90px var(--foreground);
}

100% {
text-shadow: 0 0 10px var(--foreground), 0 0 20px var(--foreground),
0 0 30px var(--foreground), 0 0 40px var(--foreground),
Expand All @@ -81,10 +89,12 @@
}

@keyframes twinkle {

0%,
100% {
opacity: 0;
}

50% {
opacity: 1;
}
Expand All @@ -96,19 +106,21 @@
display: flex;
align-items: center;
justify-content: flex-start;
gap: 10px; /* Tailwind's gap-4 */
gap: 10px;
/* Tailwind's gap-4 */
}

.filter-window {
display: none;
}

#toggle-panel:checked ~ .filter-window {
#toggle-panel:checked~.filter-window {
display: flex !important;
}

.label {
margin-left: 0.5rem; /* Tailwind's ml-2 */
margin-left: 0.5rem;
/* Tailwind's ml-2 */
color: white;
}

Expand All @@ -124,31 +136,64 @@
.toggle-slider {
position: relative;
display: inline-block;
width: 3rem; /* Tailwind's w-12 */
height: 1.5rem; /* Tailwind's h-6 */
background-color: #d1d5db; /* Tailwind's bg-gray-300 */
border-radius: 9999px; /* Tailwind's rounded-full */
width: 3rem;
/* Tailwind's w-12 */
height: 1.5rem;
/* Tailwind's h-6 */
background-color: #d1d5db;
/* Tailwind's bg-gray-300 */
border-radius: 9999px;
/* Tailwind's rounded-full */
cursor: pointer;
transition: background-color 0.4s;
}

.toggle-slider::before {
content: "";
position: absolute;
height: 1.25rem; /* Tailwind's h-5 */
width: 1.25rem; /* Tailwind's w-5 */
height: 1.25rem;
/* Tailwind's h-5 */
width: 1.25rem;
/* Tailwind's w-5 */
left: 0.125rem;
bottom: 0.125rem;
background-color: white;
border-radius: 9999px; /* Tailwind's rounded-full */
border-radius: 9999px;
/* Tailwind's rounded-full */
transition: transform 0.4s;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Tailwind's shadow-md */
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
/* Tailwind's shadow-md */
}

.toggle-input:checked+.toggle-slider {
background-color: #93ebff;
/* Tailwind's bg-blue-600 */
}

.toggle-input:checked+.toggle-slider::before {
transform: translateX(1.5rem);
/* Tailwind's translate-x-5 */
}

.toggle-input:checked + .toggle-slider {
background-color: #93ebff; /* Tailwind's bg-blue-600 */
#gradient-canvas {
--gradient-color-1: #000033;
--gradient-color-2: #483d8b;
--gradient-color-3: #000033;
--gradient-color-4: #483d8b;
}

.toggle-input:checked + .toggle-slider::before {
transform: translateX(1.5rem); /* Tailwind's translate-x-5 */

.rush-inline-text {
color: white !important;
}

.progress-bar {
position: absolute;
top: 0;
left: 0;
right: 0;
height: 5px;
background: #e3e3e3;
transform-origin: 0%;
z-index: 100;
}
10 changes: 5 additions & 5 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Navbar from "components/layout/navbar";
import Navbar from "@components/layout/navbar";
import type { Metadata } from "next";
import { Suspense, type ReactNode } from "react";
import "./globals.css";
import BottomSheet from "components/bottomSheet";
import BottomSheet from "@components/bottomSheet";
import { ToastContainer, Flip } from "react-toastify";
import "react-toastify/dist/ReactToastify.css";
import { GoogleAnalytics, GoogleTagManager } from "@next/third-parties/google";
Expand Down Expand Up @@ -121,10 +121,10 @@ export default function RootLayout({
content={process.env.NEXT_PUBLIC_NAVER_SITE_VERIFICATION}
/>
</head>
<body className="relative">
<body className="relative scrollbar-hide">
<Navbar />
<main className="w-full min-h-[calc(100vh-var(--header-height))] bg-[#1C1C20]">
<div className="max-w-screen-laptop mx-auto px-[12px] tablet:px-[24px] laptop:px-[36px]">
<main className="w-full min-h-[calc(100vh-var(--header-height))] bg-[#1C1C20] scrollbar-hide">
<div className="max-w-screen-laptop mx-auto px-[12px] tablet:px-[24px] laptop:px-[36px] scrollbar-hide">
{children}
</div>
</main>
Expand Down
8 changes: 4 additions & 4 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import Banner from "components/banner";
import { FeedFilter, LineFeedFilter } from "components/feed/feed-filter";
import Banner from "@components/banner";
import { FeedFilter, LineFeedFilter } from "@components/feed/feed-filter";
import Feeds, {
FeedsErrorFallback,
FeedsSkeleton,
} from "components/feed/feeds";
} from "@components/feed/feeds";
import { Suspense } from "react";
import { ErrorBoundary } from "react-error-boundary";
import type { CompanySize } from "services/feed/types";
import type { CompanySize } from "@services/feed/types";

export type HomeSearchParams = {
page: string;
Expand Down
77 changes: 2 additions & 75 deletions app/rush/page.tsx
Original file line number Diff line number Diff line change
@@ -1,81 +1,8 @@
"use client";

import styled from "@emotion/styled";
import Image from "next/image";
import RushList from "@/components/Rush/RushList";

const RushPage = () => {
return (
<Container>
<Content>
<div
style={{
display: "flex",
flexDirection: "column",
justifyContent: "center",
alignItems: "center",
gap: "20px",
}}
>
<Image
src={
"https://imagedelivery.net/6qzLODAqs2g1LZbVYqtuQw/c128208d-c3ff-488f-93d7-4ba3ce866c00/public"
}
alt="mail"
width={64}
height={64}
/>
<div
style={{
display: "flex",
flexDirection: "column",
justifyContent: "center",
alignItems: "center",
}}
>
<div
style={{
fontSize: "20px",
fontWeight: "bold",
color: "#f8f9fe",
}}
>
러쉬는 준비중이에요!
</div>
<div
style={{
fontSize: "12px",
color: "#f8f9fe",
}}
>
너드플래닛의 숏폼 서비스인 러쉬를 기대해주세요!
</div>
</div>
</div>
</Content>
</Container>
);
return <RushList />;
};
export default RushPage;

const Container = styled.div`
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
width: 100%;
max-width: 1140px;
margin: 0 auto;
padding: 20px 20px;
gap: 40px;
`;

const Content = styled.div`
background-color: #1c1c20;
padding: 36px 24px;
width: 400px;
height: 200px;
border-radius: 10px;
margin-bottom: 100px;
color: #f8f9fe;
position: relative;
`;
43 changes: 43 additions & 0 deletions components/Rush/RushList/RushItem/Counter.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import styled from "@emotion/styled";

type CounterProps = {
value?: number;
onClick?: () => void;
}

const Counter = ({
value = 0,
onClick
}: CounterProps) => {
return (<div style={{
display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center",
gap: "4px"
}}>
<Box onClick={onClick}>
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clipPath="url(#clip0_376_160)">
<path d="M12.0001 18.75C8.80135 18.75 5.77435 17.3948 3.47485 14.934C3.1921 14.6318 3.2086 14.157 3.51085 13.8743C3.81385 13.5915 4.28785 13.608 4.57135 13.9103C6.5836 16.0643 9.22135 17.25 12.0001 17.25C15.5724 17.25 18.8619 15.2963 20.8801 12C18.8626 8.70375 15.5724 6.75 12.0001 6.75C8.2966 6.75 4.8961 8.85075 2.9026 12.3698C2.6986 12.7305 2.2396 12.858 1.88035 12.6525C1.5196 12.4485 1.3936 11.991 1.5976 11.6302C3.86035 7.635 7.74985 5.25 12.0001 5.25C16.2511 5.25 20.1399 7.635 22.4026 11.6302C22.5324 11.8597 22.5324 12.1403 22.4026 12.369C20.1399 16.3643 16.2511 18.75 12.0001 18.75Z" fill="white" />
<path d="M12 15.75C9.93225 15.75 8.25 14.0677 8.25 12C8.25 9.93225 9.93225 8.25 12 8.25C14.0677 8.25 15.75 9.93225 15.75 12C15.75 14.0677 14.0677 15.75 12 15.75ZM12 9.75C10.7595 9.75 9.75 10.7595 9.75 12C9.75 13.2405 10.7595 14.25 12 14.25C13.2405 14.25 14.25 13.2405 14.25 12C14.25 10.7595 13.2405 9.75 12 9.75Z" fill="white" />
</g>
<defs>
<clipPath id="clip0_376_160">
<rect width="24" height="24" fill="white" />
</clipPath>
</defs>
</svg>
</Box>
<div style={{
fontSize: "16px",
color: "white"
}}>{value}</div>
</div>)
}

export default Counter;

const Box = styled.div`
width: 24px;
height: 24px;
fill: white;
cursor: pointer;
`;
36 changes: 36 additions & 0 deletions components/Rush/RushList/RushItem/InitialCard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
type InitialCardProps = {
initial?: string;
onClick?: () => void;
}

const rainbow = [
{ bgColor: "#FF0000", color: "#FFFFFF" },
{ bgColor: "#FF7F00", color: "#FFFFFF" },
{ bgColor: "#FFFF00", color: "#000000" },
{ bgColor: "#00FF00", color: "#000000" },
{ bgColor: "#0000FF", color: "#FFFFFF" },
{ bgColor: "#4B0082", color: "#FFFFFF" },
{ bgColor: "#9400D3", color: "#FFFFFF" }
];

const InitialCard = ({
initial = "A",
onClick
}: InitialCardProps) => {
const randomColor = rainbow[Math.floor(Math.random() * rainbow.length)];
return (<div style={{
cursor: "pointer",
backgroundColor: "white",
color: "black",
display: "flex",
justifyContent: "center",
alignItems: "center",
width: "24px",
height: "24px",
borderRadius: "5px"
}} onClick={onClick}>
{initial}
</div>)
}

export default InitialCard;
Loading

0 comments on commit e7adc74

Please sign in to comment.