Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(landing): dashboard & enjoy section expore #194

Merged
merged 14 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"react-masonry-css": "^1.0.14",
"react-pin-field": "3.0.16",
"react-portal": "^4.2.2",
"react-scroll-parallax": "^3.4.3",
"react-scroll-parallax": "^3.4.5",
"react-select": "^5.5.7",
"react-svg": "15.1.10",
"react-swipeable": "^7.0.0",
Expand Down
1 change: 1 addition & 0 deletions public/icons/emotion/alien-fill.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/emotion/beer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/emotion/biceps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/emotion/confused.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/emotion/downvote.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/icons/emotion/emotion.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/emotion/heart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/emotion/pao.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/emotion/pill.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/emotion/popcorn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/emotion/tada.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/app/Landing/DashboardIntros/LayoutTab/ContentCard.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { FC } from 'react'

import WallpaperBar from './WallpaperBar'

import { Wrapper } from '../../styles/dashboard_intros/layout_tab/content_card'

const ContentCard: FC = () => {
return (
<Wrapper>
<WallpaperBar />
<div>帖子布局</div>
<div>整体布局</div>
<div>看板布局</div>
</Wrapper>
)
}
Expand Down
10 changes: 9 additions & 1 deletion src/app/Landing/DashboardIntros/LayoutTab/WallpaperCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ import { FC } from 'react'

import { parseWallpaper } from '@/wallpaper'
import useWallpaper from '@/hooks/useWallpaper'
import WallpaperBar from './WallpaperBar'

import { Wrapper, Background } from '../../styles/dashboard_intros/layout_tab/wallpaper_card'
import {
Wrapper,
Background,
EditToolbox,
} from '../../styles/dashboard_intros/layout_tab/wallpaper_card'

const WallpaperCard: FC = () => {
const { wallpapers, wallpaper } = useWallpaper()
Expand All @@ -12,6 +17,9 @@ const WallpaperCard: FC = () => {
return (
<Wrapper>
<Background style={{ background }} effect={effect} />
<EditToolbox>
<WallpaperBar />
</EditToolbox>
</Wrapper>
)
}
Expand Down
21 changes: 12 additions & 9 deletions src/app/Landing/DashboardIntros/SideMenus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ import {
InnerWrapper,
Header,
Title,
Highlight,
Desc,
Tabs,
TabItem,
ItemTitle,
ItemDesc,
} from '../styles/dashboard_intros/side_menu'

type TProps = {
Expand All @@ -25,18 +26,20 @@ const SideMenus: FC<TProps> = ({ tab, onChange }) => {
<Wrapper>
<InnerWrapper>
<Header>
<Title>
完善的<Highlight>后台管理</Highlight>
</Title>
<Title>完善的后台管理</Title>
<Desc>强大的自定义设置,所见即所得,满足你的品牌个性化及内容管理需要。</Desc>
</Header>

<Tabs>
{TABS_ITEMS.map((item) => (
<TabItem key={item.key} $active={tab === item.key} onClick={() => onChange(item.key)}>
{item.title}
</TabItem>
))}
{TABS_ITEMS.map((item) => {
const $active = tab === item.key
return (
<TabItem key={item.key} $active={$active} onClick={() => onChange(item.key)}>
<ItemTitle $active={$active}>{item.title}</ItemTitle>
{$active && <ItemDesc>{item.desc}</ItemDesc>}
</TabItem>
)
})}
</Tabs>
</InnerWrapper>
</Wrapper>
Expand Down
5 changes: 1 addition & 4 deletions src/app/Landing/DashboardIntros/constant.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import { DASHBOARD_ROUTE } from '@/constant/route'

export const TABS_ITEMS = [
{
key: DASHBOARD_ROUTE.INFO,
title: '基本信息',
},
{
key: DASHBOARD_ROUTE.LAYOUT,
title: '布局与样式',
desc: '这里是布局与样式的说明,看看效果',
},
{
key: DASHBOARD_ROUTE.SEO,
Expand Down
2 changes: 1 addition & 1 deletion src/app/Landing/DashboardIntros/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import LayoutTab from './LayoutTab'
import { Wrapper, Right } from '../styles/dashboard_intros'

const DashboardIntros: FC = () => {
const [tab, setTab] = useState<TDashboardPath>(DASHBOARD_ROUTE.INFO)
const [tab, setTab] = useState<TDashboardPath>(DASHBOARD_ROUTE.LAYOUT)

return (
<Wrapper>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
/* eslint-disable jsx-a11y/accessible-emoji */
import { FC } from 'react'

import { Wrapper, Building, SadIcon, InternetIcon, Text, Dot } from '../styles/enjoy_dev/block'
import {
Wrapper,
Building,
SadIcon,
InternetIcon,
Text,
Dot,
} from '../../styles/enjoy_dev/high_way/block'

type TProps = {
text: string
Expand All @@ -11,15 +18,15 @@ type TProps = {

const Block: FC<TProps> = ({ text, noDot = false, type = '' }) => {
return (
<Wrapper grey={type === 'giveup'}>
<Wrapper $giveup={type === 'giveup'}>
{type === 'online' && <InternetIcon />}
{type === 'giveup' && <SadIcon />}
{type === '' && (
<Building role="img" aria-label="wip">
🚧
</Building>
)}
<Text>{text}</Text>
<Text $giveup={type === 'giveup'}>{text}</Text>
{!noDot && <Dot />}
</Wrapper>
)
Expand Down
27 changes: 27 additions & 0 deletions src/app/Landing/EnjoyDev/HighWay/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { FC } from 'react'

import Block from './Block'

import { Wrapper, DashLine, SeedIcon, ConnectLine } from '../../styles/enjoy_dev/high_way'

const HighWay: FC = () => {
return (
<Wrapper>
<SeedIcon left="100px" top="60px" />
<DashLine />
<Block text="开发" noDot />
<ConnectLine />
<Block text="开发" />
<ConnectLine />
<Block text="开发" />
<ConnectLine />
<Block text="开发" />
<ConnectLine />
<Block text="上线没人用" type="online" />
<ConnectLine />
<Block text="放弃" type="giveup" />
</Wrapper>
)
}

export default HighWay
159 changes: 0 additions & 159 deletions src/app/Landing/EnjoyDev/NodeBlock.tsx

This file was deleted.

Loading
Loading