Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ai-box
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
青山
ai-box
Commits
b8e5ce43
Commit
b8e5ce43
authored
Nov 26, 2024
by
fisherdaddy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: fix some layout bugs
parent
57d488f2
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
70 additions
and
43 deletions
+70
-43
AnthropicTimeline.jsx
src/components/AnthropicTimeline.jsx
+6
-2
BackgroundRemover.jsx
src/components/BackgroundRemover.jsx
+19
-6
OpenAITimeline.jsx
src/components/OpenAITimeline.jsx
+5
-1
PricingCharts.jsx
src/components/PricingCharts.jsx
+4
-0
Blog.jsx
src/pages/Blog.jsx
+25
-23
DevTools.jsx
src/pages/DevTools.jsx
+3
-3
ImageTools.jsx
src/pages/ImageTools.jsx
+3
-3
Timeline.css
src/styles/Timeline.css
+5
-5
No files found.
src/components/AnthropicTimeline.jsx
View file @
b8e5ce43
...
@@ -4,10 +4,13 @@ import events from '../data/anthropic-releases.json';
...
@@ -4,10 +4,13 @@ import events from '../data/anthropic-releases.json';
import
SEO
from
'../components/SEO'
;
import
SEO
from
'../components/SEO'
;
import
{
useTranslation
}
from
'../js/i18n'
;
import
{
useTranslation
}
from
'../js/i18n'
;
import
{
useScrollToTop
}
from
'../hooks/useScrollToTop'
;
import
{
useScrollToTop
}
from
'../hooks/useScrollToTop'
;
import
{
usePageLoading
}
from
'../hooks/usePageLoading'
;
import
LoadingOverlay
from
'./LoadingOverlay'
;
const
AnthropicTimeline
=
()
=>
{
const
AnthropicTimeline
=
()
=>
{
const
{
t
}
=
useTranslation
();
const
{
t
}
=
useTranslation
();
useScrollToTop
();
useScrollToTop
();
const
isLoading
=
usePageLoading
();
return
(
return
(
<>
<>
...
@@ -15,7 +18,8 @@ const AnthropicTimeline = () => {
...
@@ -15,7 +18,8 @@ const AnthropicTimeline = () => {
title=
{
t
(
'tools.anthropicTimeline.title'
)
}
title=
{
t
(
'tools.anthropicTimeline.title'
)
}
description=
{
t
(
'tools.anthropicTimeline.description'
)
}
description=
{
t
(
'tools.anthropicTimeline.description'
)
}
/>
/>
<
div
className=
"container"
>
{
isLoading
&&
<
LoadingOverlay
/>
}
<
div
className=
"timeline-container"
>
<
h1
className=
"timeline-title"
>
{
t
(
'tools.anthropicTimeline.title'
)
}
</
h1
>
<
h1
className=
"timeline-title"
>
{
t
(
'tools.anthropicTimeline.title'
)
}
</
h1
>
<
ul
className=
"timeline"
>
<
ul
className=
"timeline"
>
{
events
.
map
((
item
,
index
)
=>
(
{
events
.
map
((
item
,
index
)
=>
(
...
...
src/components/BackgroundRemover.jsx
View file @
b8e5ce43
...
@@ -4,6 +4,8 @@ import styled from 'styled-components';
...
@@ -4,6 +4,8 @@ import styled from 'styled-components';
import
{
useTranslation
}
from
'../js/i18n'
;
import
{
useTranslation
}
from
'../js/i18n'
;
import
SEO
from
'./SEO'
;
import
SEO
from
'./SEO'
;
import
{
useScrollToTop
}
from
'../hooks/useScrollToTop'
;
import
{
useScrollToTop
}
from
'../hooks/useScrollToTop'
;
import
{
usePageLoading
}
from
'../hooks/usePageLoading'
;
import
LoadingOverlay
from
'./LoadingOverlay'
;
// Reuse container style
// Reuse container style
const
Container
=
styled
.
div
`
const
Container
=
styled
.
div
`
...
@@ -81,6 +83,20 @@ const PreviewArea = styled.div`
...
@@ -81,6 +83,20 @@ const PreviewArea = styled.div`
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
gap: 1rem;
gap: 1rem;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.9);
z-index: 10;
opacity: 1;
transition: opacity 0.3s ease-in-out;
&.hide {
opacity: 0;
pointer-events: none;
}
}
}
.upload-prompt {
.upload-prompt {
...
@@ -160,6 +176,7 @@ const PrivacyNote = styled.div`
...
@@ -160,6 +176,7 @@ const PrivacyNote = styled.div`
function
BackgroundRemover
()
{
function
BackgroundRemover
()
{
useScrollToTop
();
useScrollToTop
();
const
{
t
}
=
useTranslation
();
const
{
t
}
=
useTranslation
();
const
isPageLoading
=
usePageLoading
();
const
[
selectedImage
,
setSelectedImage
]
=
useState
(
null
);
const
[
selectedImage
,
setSelectedImage
]
=
useState
(
null
);
const
[
removedBgImage
,
setRemovedBgImage
]
=
useState
(
null
);
const
[
removedBgImage
,
setRemovedBgImage
]
=
useState
(
null
);
const
[
isProcessing
,
setIsProcessing
]
=
useState
(
false
);
const
[
isProcessing
,
setIsProcessing
]
=
useState
(
false
);
...
@@ -202,6 +219,7 @@ function BackgroundRemover() {
...
@@ -202,6 +219,7 @@ function BackgroundRemover() {
title=
{
t
(
'tools.imageBackgroundRemover.title'
)
}
title=
{
t
(
'tools.imageBackgroundRemover.title'
)
}
description=
{
t
(
'tools.imageBackgroundRemover.description'
)
}
description=
{
t
(
'tools.imageBackgroundRemover.description'
)
}
/>
/>
{
(
isPageLoading
||
isProcessing
)
&&
<
LoadingOverlay
/>
}
<
Container
>
<
Container
>
<
ContentWrapper
>
<
ContentWrapper
>
<
ControlPanel
>
<
ControlPanel
>
...
@@ -217,7 +235,6 @@ function BackgroundRemover() {
...
@@ -217,7 +235,6 @@ function BackgroundRemover() {
{
t
(
'tools.imageBackgroundRemover.uploadPrompt'
)
}
{
t
(
'tools.imageBackgroundRemover.uploadPrompt'
)
}
</
ImageUploadArea
>
</
ImageUploadArea
>
{
/* 添加提示语 */
}
<
PrivacyNote
>
<
PrivacyNote
>
{
t
(
'tools.imageBackgroundRemover.privacyNote'
)
}
{
t
(
'tools.imageBackgroundRemover.privacyNote'
)
}
</
PrivacyNote
>
</
PrivacyNote
>
...
@@ -230,11 +247,7 @@ function BackgroundRemover() {
...
@@ -230,11 +247,7 @@ function BackgroundRemover() {
</
DownloadButton
>
</
DownloadButton
>
)
}
)
}
<
div
className=
"preview-content"
>
<
div
className=
"preview-content"
>
{
isProcessing
?
(
{
removedBgImage
?
(
<
div
className=
"loading-container"
>
<
span
>
{
t
(
'tools.imageBackgroundRemover.processing'
)
}
</
span
>
</
div
>
)
:
removedBgImage
?
(
<
div
style=
{
{
<
div
style=
{
{
position
:
'relative'
,
position
:
'relative'
,
width
:
'100%'
,
width
:
'100%'
,
...
...
src/components/OpenAITimeline.jsx
View file @
b8e5ce43
...
@@ -4,10 +4,13 @@ import '../styles/Timeline.css';
...
@@ -4,10 +4,13 @@ import '../styles/Timeline.css';
import
events
from
'../data/openai-releases.json'
;
import
events
from
'../data/openai-releases.json'
;
import
SEO
from
'../components/SEO'
;
import
SEO
from
'../components/SEO'
;
import
{
useTranslation
}
from
'../js/i18n'
;
import
{
useTranslation
}
from
'../js/i18n'
;
import
{
usePageLoading
}
from
'../hooks/usePageLoading'
;
import
LoadingOverlay
from
'./LoadingOverlay'
;
const
Timeline
=
()
=>
{
const
Timeline
=
()
=>
{
useScrollToTop
();
useScrollToTop
();
const
{
t
}
=
useTranslation
();
const
{
t
}
=
useTranslation
();
const
isLoading
=
usePageLoading
();
return
(
return
(
<>
<>
...
@@ -15,7 +18,8 @@ const Timeline = () => {
...
@@ -15,7 +18,8 @@ const Timeline = () => {
title=
{
t
(
'tools.openAITimeline.title'
)
}
title=
{
t
(
'tools.openAITimeline.title'
)
}
description=
{
t
(
'tools.openAITimeline.description'
)
}
description=
{
t
(
'tools.openAITimeline.description'
)
}
/>
/>
<
div
className=
"container"
>
{
isLoading
&&
<
LoadingOverlay
/>
}
<
div
className=
"timeline-container"
>
<
h1
className=
"timeline-title"
>
{
t
(
'tools.openAITimeline.title'
)
}
</
h1
>
<
h1
className=
"timeline-title"
>
{
t
(
'tools.openAITimeline.title'
)
}
</
h1
>
<
ul
className=
"timeline"
>
<
ul
className=
"timeline"
>
{
events
.
map
((
item
,
index
)
=>
(
{
events
.
map
((
item
,
index
)
=>
(
...
...
src/components/PricingCharts.jsx
View file @
b8e5ce43
...
@@ -5,9 +5,12 @@ import OpenaiPricing from '../data/openai-pricing.json';
...
@@ -5,9 +5,12 @@ import OpenaiPricing from '../data/openai-pricing.json';
import
LLMPricing
from
'../data/llm-pricing.json'
;
import
LLMPricing
from
'../data/llm-pricing.json'
;
import
VisionPricing
from
'../data/vision-model-pricing.json'
;
import
VisionPricing
from
'../data/vision-model-pricing.json'
;
import
SEO
from
'../components/SEO'
;
import
SEO
from
'../components/SEO'
;
import
{
usePageLoading
}
from
'../hooks/usePageLoading'
;
import
LoadingOverlay
from
'./LoadingOverlay'
;
const
PricingCharts
=
()
=>
{
const
PricingCharts
=
()
=>
{
useScrollToTop
();
useScrollToTop
();
const
isLoading
=
usePageLoading
();
const
lastUpdateTime
=
'2024-11-06 21:30'
;
const
lastUpdateTime
=
'2024-11-06 21:30'
;
return
(
return
(
...
@@ -16,6 +19,7 @@ const PricingCharts = () => {
...
@@ -16,6 +19,7 @@ const PricingCharts = () => {
title=
"AI Model Pricing Comparison"
title=
"AI Model Pricing Comparison"
description=
"Compare prices of different AI models"
description=
"Compare prices of different AI models"
/>
/>
{
isLoading
&&
<
LoadingOverlay
/>
}
<
div
className=
"pricing-charts-container"
>
<
div
className=
"pricing-charts-container"
>
<
div
className=
"update-time"
>
<
div
className=
"update-time"
>
Last Updated:
{
lastUpdateTime
}
Last Updated:
{
lastUpdateTime
}
...
...
src/pages/Blog.jsx
View file @
b8e5ce43
...
@@ -13,13 +13,14 @@ const Home = () => {
...
@@ -13,13 +13,14 @@ const Home = () => {
const
{
t
}
=
useTranslation
();
const
{
t
}
=
useTranslation
();
return
(
return
(
<>
<
div
className=
"min-h-screen w-full"
>
<
SEO
<
SEO
title=
{
t
(
'blog.title'
)
}
title=
{
t
(
'blog.title'
)
}
description=
{
t
(
'blog.description'
)
}
description=
{
t
(
'blog.description'
)
}
/>
/>
<
main
className=
"container mx-auto px-4 pt-16 pb-8"
>
<
main
className=
"container mx-auto px-4 pt-16 pb-8 min-h-screen w-full"
>
<
section
className=
"mt-8"
>
<
section
className=
"mt-8 w-full"
>
<
div
className=
"w-full max-w-[1400px] mx-auto"
>
<
div
className=
"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 px-4"
>
<
div
className=
"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 px-4"
>
{
tools
.
map
(
tool
=>
(
{
tools
.
map
(
tool
=>
(
<
Link
<
Link
...
@@ -40,9 +41,10 @@ const Home = () => {
...
@@ -40,9 +41,10 @@ const Home = () => {
</
Link
>
</
Link
>
))
}
))
}
</
div
>
</
div
>
</
div
>
</
section
>
</
section
>
</
main
>
</
main
>
</>
</
div
>
);
);
};
};
...
...
src/pages/DevTools.jsx
View file @
b8e5ce43
...
@@ -20,9 +20,9 @@ const DevTools = () => {
...
@@ -20,9 +20,9 @@ const DevTools = () => {
title=
{
t
(
'dev-tools.title'
)
}
title=
{
t
(
'dev-tools.title'
)
}
description=
{
t
(
'dev-tools.description'
)
}
description=
{
t
(
'dev-tools.description'
)
}
/>
/>
<
main
className=
"container mx-auto px-4 pt-16 pb-8"
>
<
main
className=
"container mx-auto px-4 pt-16 pb-8
min-h-screen
"
>
<
section
className=
"mt-8"
>
<
section
className=
"mt-8
w-full
"
>
<
div
className=
"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 px-4"
>
<
div
className=
"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 px-4
w-full
"
>
{
tools
.
map
(
tool
=>
(
{
tools
.
map
(
tool
=>
(
<
Link
<
Link
to=
{
tool
.
path
}
to=
{
tool
.
path
}
...
...
src/pages/ImageTools.jsx
View file @
b8e5ce43
...
@@ -24,9 +24,9 @@ const tools = [
...
@@ -24,9 +24,9 @@ const tools = [
title=
{
t
(
'title'
)
}
title=
{
t
(
'title'
)
}
description=
{
t
(
'slogan'
)
}
description=
{
t
(
'slogan'
)
}
/>
/>
<
main
className=
"container mx-auto px-4 pt-16 pb-8"
>
<
main
className=
"container mx-auto px-4 pt-16 pb-8
min-h-screen
"
>
<
section
className=
"mt-8"
>
<
section
className=
"mt-8
w-full
"
>
<
div
className=
"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 px-4"
>
<
div
className=
"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 px-4
w-full
"
>
{
tools
.
map
(
tool
=>
(
{
tools
.
map
(
tool
=>
(
<
Link
<
Link
to=
{
tool
.
path
}
to=
{
tool
.
path
}
...
...
src/styles/Timeline.css
View file @
b8e5ce43
.container
{
.
timeline-
container
{
font-family
:
-apple-system
,
BlinkMacSystemFont
,
'Segoe UI'
,
Roboto
,
sans-serif
;
font-family
:
-apple-system
,
BlinkMacSystemFont
,
'Segoe UI'
,
Roboto
,
sans-serif
;
line-height
:
1.6
;
line-height
:
1.6
;
max-width
:
1000px
;
max-width
:
1000px
;
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
min-height
:
100vh
;
min-height
:
100vh
;
}
}
.container
::before
{
.
timeline-
container
::before
{
content
:
''
;
content
:
''
;
position
:
absolute
;
position
:
absolute
;
top
:
0
;
top
:
0
;
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
.event-content
{
.event-content
{
position
:
relative
;
position
:
relative
;
width
:
4
5
%
;
width
:
4
0
%
;
padding
:
1.5rem
;
padding
:
1.5rem
;
background
:
rgba
(
255
,
255
,
255
,
0.9
);
background
:
rgba
(
255
,
255
,
255
,
0.9
);
backdrop-filter
:
blur
(
10px
);
backdrop-filter
:
blur
(
10px
);
...
@@ -89,11 +89,11 @@
...
@@ -89,11 +89,11 @@
}
}
.event
:nth-child
(
odd
)
.event-content
{
.event
:nth-child
(
odd
)
.event-content
{
left
:
5
5
%
;
left
:
5
7
%
;
}
}
.event
:nth-child
(
even
)
.event-content
{
.event
:nth-child
(
even
)
.event-content
{
left
:
0
;
left
:
3%
;
}
}
.event-date
{
.event-date
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment