Skip to content

Commit

Permalink
refactor(landing-page): redesign tabs (#191)
Browse files Browse the repository at this point in the history
* chore: wip

* chore: add new tab

* chore(landing): move feature walls -> articles tabs

* chore(landing): adjust tabs icon preview

* feat(loading): add dashboard holder section

* style(landing): fix bg style of user voice

* refactor(intros): discuss tab redesign

* refactor(intros): kanban done

* refactor(intros): add drag concept

* refactor(intros): add drag target concept

* refactor(intros): add drag target concept

* refactor(intros): wip

* refactor(intros): wip

* refactor(intros): wip

* refactor(intros): wip

* refactor(intros): wip

* refactor(intros): wip

* refactor(intros): wip

* refactor(intros): wip

* refactor(intros): changelog make awesome

* refactor(intros): wip

* chore: wip

* refactor(intros): wip

* refactor(intros): wip

* refactor(intros): help feat wip

* chore: wip

* chore: wip

* chore(help): wip

* chore(help): done

* chore(help): rename -> tab
  • Loading branch information
mydearxym authored Dec 7, 2023
1 parent 4a03f22 commit 9cf95c0
Show file tree
Hide file tree
Showing 178 changed files with 4,970 additions and 3,332 deletions.
1,600 changes: 1,598 additions & 2 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"@next/bundle-analyzer": "^12.2.5",
"@soywod/pin-field": "^0.1.9",
"@tippyjs/react": "^4.2.6",
"@udecode/plate": "^26.0.5",
"@urql/core": "^4.1.4",
"@urql/next": "^1.1.0",
"chalk": "^2.4.1",
Expand Down Expand Up @@ -101,6 +102,10 @@
"sanitize-html": "^2.5.2",
"scroll-into-view-if-needed": "1.5.0",
"sentry-testkit": "^2.1.0",
"slate": "^0.101.1",
"slate-history": "^0.100.0",
"slate-hyperscript": "^0.100.0",
"slate-react": "^0.101.1",
"sonner": "^1.0.0",
"store": "^2.0.12",
"stringz": "^2.0.0",
Expand Down
18 changes: 18 additions & 0 deletions src/app/editor/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'use client'

import React from 'react'
import { Plate, PlateContent } from '@udecode/plate-common'

import { Wrapper } from './styles'

const BasicEditorDefaultDemo = () => {
return (
<Wrapper>
<Plate onChange={(data) => console.log('## onChange: ', data)}>
<PlateContent placeholder="Type..." />
</Plate>
</Wrapper>
)
}

export default BasicEditorDefaultDemo
9 changes: 9 additions & 0 deletions src/app/editor/styles/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import styled from 'styled-components'

export const Wrapper = styled.div`
margin-top: 10%;
width: 800px;
height: 300px;
border: 1px solid;
`
export const holder = 1
4 changes: 0 additions & 4 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
'use client'

import Link from 'next/link'

import LandingPage from '@/containers/content/LandingPage'

export default function Page() {
return (
<div>
<Link href="/home">go to home </Link>

<LandingPage />
</div>
)
Expand Down
11 changes: 0 additions & 11 deletions src/app/test/error.tsx

This file was deleted.

35 changes: 0 additions & 35 deletions src/app/test/page.tsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { FC } from 'react'

import {
Wrapper,
Header,
Dot,
BlocksWrapper,
BlocksSolidIcon,
} from '../../../styles/articles_intro_tabs/changelog_tab/changelog_demo/cover_preview'

const CoverPreview: FC = () => {
return (
<Wrapper>
<Header>
<Dot />
<Dot />
<Dot />
</Header>
<BlocksWrapper>
<BlocksSolidIcon />
<BlocksSolidIcon />
<BlocksSolidIcon />
<BlocksSolidIcon />
</BlocksWrapper>
</Wrapper>
)
}

export default CoverPreview
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import { FC } from 'react'

import {
Wrapper,
ICON,
Item,
Title,
ColorBall,
} from '../../../../styles/articles_intro_tabs/changelog_tab/changelog_demo/editor_preview/toolbox'

const EditorToolbox: FC = () => {
return (
<Wrapper>
<Item>
<ICON.Rotate />
<Title>旋转</Title>
</Item>
<Item>
<ICON.Arch />
<Title>弧度</Title>
</Item>
<Item>
<ICON.Shadow />
<Title>阴影</Title>
</Item>
<Item>
<ICON.Position />
<Title>位置</Title>
</Item>
<Item>
<ICON.Size />
<Title>大小</Title>
</Item>
<Item>
<ICON.Light />
<Title>灯光</Title>
</Item>
<Item>
<ICON.Ratio />
<Title>比例</Title>
</Item>
<Item>
<ColorBall />
<Title>背景</Title>
</Item>
</Wrapper>
)
}

export default EditorToolbox
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import { FC } from 'react'

import TagNode from '@/widgets/TagNode'
import { COLOR_NAME } from '@/constant/colors'

import Toolbox from './Toolbox'
import CoverPreview from '../CoverPreview'

import {
Wrapper,
Header,
Title,
Version,
Bar,
Cover,
TagsWrapper,
TagItem,
Content,
} from '../../../../styles/articles_intro_tabs/changelog_tab/changelog_demo/editor_preview'

const EditorPreview: FC = () => {
return (
<Wrapper>
<Header>
<Title>
文章封面图编辑器 <Version>v2.0</Version>
</Title>

<TagsWrapper>
<TagItem>
<TagNode color={COLOR_NAME.GREEN} hashSize={10} hashRight={4} opacity={0.6} boldHash />
Web
</TagItem>

<TagItem>
<TagNode color={COLOR_NAME.ORANGE} hashSize={10} hashRight={4} opacity={0.6} boldHash />
Mobile
</TagItem>
</TagsWrapper>
</Header>
<Cover>
<CoverPreview />
</Cover>
<Toolbox />
<Content>
<Bar height={6} width={159} right={7} opacity={0.15} />
<Bar height={6} width={100} opacity={0.1} />
<Bar height={6} width={60} opacity={0.1} />
</Content>
</Wrapper>
)
}

export default EditorPreview
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { FC } from 'react'

import {
Wrapper,
Item,
EmojiImg,
Count,
} from '../../../styles/articles_intro_tabs/changelog_tab/changelog_demo/emotion_bar'

const EMOTION_STATIC = '/icons/static/emotion'

const EditorPreview: FC = () => {
return (
<Wrapper>
<Item>
<EmojiImg src={`${EMOTION_STATIC}/tada.png`} />
<Count>41</Count>
</Item>

<Item>
<EmojiImg src={`${EMOTION_STATIC}/beer.png`} />
<Count>32</Count>
</Item>

<Item>
<EmojiImg src={`${EMOTION_STATIC}/biceps.png`} />
<Count>17</Count>
</Item>

<Item>
<EmojiImg src={`${EMOTION_STATIC}/popcorn.png`} />
<Count>10</Count>
</Item>
</Wrapper>
)
}

export default EditorPreview
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { FC } from 'react'

import {
Wrapper,
Item,
EmojiImg,
Count,
} from '../../../styles/articles_intro_tabs/changelog_tab/changelog_demo/emotion_bar_bad'

const EMOTION_STATIC = '/icons/static/emotion'

const EditorPreview: FC = () => {
return (
<Wrapper>
<Item>
<EmojiImg src={`${EMOTION_STATIC}/downvote.png`} />
<Count>14</Count>
</Item>

<Item>
<EmojiImg src={`${EMOTION_STATIC}/confused.png`} />
<Count>12</Count>
</Item>

<Item>
<EmojiImg src={`${EMOTION_STATIC}/pill.png`} />
<Count>35</Count>
</Item>
</Wrapper>
)
}

export default EditorPreview
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { FC } from 'react'

import { mockUsers } from '@/mock'

import { SpaceGrow } from '@/widgets/Common'
import Facepile from '@/widgets/Facepile'

import {
Wrapper,
UpvoteWrapper,
UpvoteIcon,
UpvoteCount,
UsersWrapper,
PublishDate,
} from '../../../../styles/articles_intro_tabs/changelog_tab/changelog_demo/main_list/footer'

type TProps = {
upvotesCount?: number
date?: string
}

const Footer: FC<TProps> = ({ upvotesCount = 24, date = '2013-12-01' }) => {
const users = mockUsers(3)

return (
<Wrapper>
<UpvoteWrapper>
<UpvoteIcon />
<UpvoteCount>{upvotesCount}</UpvoteCount>
</UpvoteWrapper>
<UsersWrapper>
<Facepile users={users} />
</UsersWrapper>
<SpaceGrow />

<PublishDate>{date}</PublishDate>
</Wrapper>
)
}

export default Footer
Loading

0 comments on commit 9cf95c0

Please sign in to comment.