Skip to content

Commit

Permalink
docs: update theme
Browse files Browse the repository at this point in the history
  • Loading branch information
BroKun committed Sep 16, 2024
1 parent 92e92fa commit 3139e93
Show file tree
Hide file tree
Showing 43 changed files with 3,550 additions and 1,379 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# <img src="./docs/assets//logo.svg" width="30"> magent
# <img src="./docs/site/public/logo.svg" width="30"> magent

智能体研发产品方案

Expand Down Expand Up @@ -64,4 +64,4 @@ MAGENT_UI_SERVER_XX
#### 通过钉钉群联系我们

😊 加入我们的钉钉答疑群与我们联系。
![](./docs/assets/magent-dingding-group.png)
![](./docs/site/public/magent-dingding-group.png)
Binary file removed docs/assets/magent-dingding-group.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
138 changes: 132 additions & 6 deletions docs/site/.dumi/theme/componets/banner/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
position: relative;
width: 100%;
height: 548px;
background-color: #fff;
background-image: url('https://mdn.alipayobjects.com/huamei_usjdcg/afts/img/A*D4cjRIorZ9oAAAAAAAAAAAAADo6HAQ/original');
background-color: rgba(241, 249, 255, 90%);
// background-image: url('https://mdn.alipayobjects.com/huamei_usjdcg/afts/img/A*D4cjRIorZ9oAAAAAAAAAAAAADo6HAQ/original');
background-position: center;
background-repeat: no-repeat;
background-size: auto 548px;
Expand Down Expand Up @@ -98,10 +98,7 @@

.difizen-dumi-hero {
position: relative;
margin: -96px auto -160px;
max-width: 1392px;
height: 932px;
padding-top: 220px;
height: 100%;
text-align: center;
box-sizing: border-box;

Expand Down Expand Up @@ -158,3 +155,132 @@
}
}
}

.content-animate {
position: absolute;
top: 0;
bottom: 0;
left: 105px;
right: 105px;
background-image: url('./background.png');
pointer-events: none;
}

.circle-first {
position: absolute;
height: 590px;
width: 760px;
top: 256px;
left: 280px;
animation: rotate-animation 10s linear 1s 5 alternate;
animation: rotate-animation 10s linear infinite;
}

.circle-first-one {
position: absolute;
bottom: 0;
left: 0;
width: 480px;
height: 480px;
background: linear-gradient(to right, #ffde16, #02ffce);
filter: blur(50px);
border-radius: 50%;
opacity: 0.1;
}

.circle-first-two {
position: absolute;
top: 0;
right: 0;
width: 480px;
height: 480px;
background: linear-gradient(to right, #0266ff, #167aff);
filter: blur(50px);
border-radius: 50%;
opacity: 0.1;
}

.circle-second {
position: absolute;
top: 132px;
left: 233px;
width: 100px;
height: 100px;
background-color: #1677ff;
opacity: 0.2;
filter: blur(50px);
border-radius: 50%;
}

.circle-third {
position: absolute;
top: 100px;
left: 0;
width: 200px;
height: 200px;
background-color: #1677ff;
opacity: 0.2;
filter: blur(50px);
border-radius: 50%;
}

.start-btn {
height: 40px;
width: 140px;
padding: 4px;
background: linear-gradient(135deg, rgb(98, 83, 225), rgb(4, 190, 254));
border: unset;
}

.start-btn:hover {
background: linear-gradient(135deg, rgb(98, 83, 225), rgb(4, 190, 254)) !important;
}

.install-btn {
margin-left: 40px;
border: none;
}

.feature-title,
.feature-title-libro {
font-size: 1.875rem;
color: #27272e;
font-weight: 600;
text-align: center;
}

.feature-title-libro {
margin-top: 28px;
}

.user-item {
display: flex;
align-items: center;
font-size: 32px;
justify-content: center;
background: #fff;
margin: 0 10px 20px;
padding: 12px;
box-shadow: -1px 4px 20px 0 rgba(213, 168, 255, 19%);
height: 84px;

&-img {
height: 60px;
object-fit: contain;
margin-right: 12px;
width: 258px;

&-sm {
height: 45px;
}
}
}

.user-container {
display: flex;
justify-content: center;
margin-top: 20px;
row-gap: 10px;
margin-left: -62px;
margin-right: -62px;
}
113 changes: 35 additions & 78 deletions docs/site/.dumi/theme/componets/banner/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { Button, message } from 'antd';
import { Link, useSiteData } from 'dumi';
import React, { useEffect, useState } from 'react';
import { CopyToClipboard } from 'react-copy-to-clipboard';
import './index.less';
import '../../tailwind.out.css';

const Banner: React.FC = () => {
const [animate, setAnimate] = useState({
Expand All @@ -25,88 +28,42 @@ const Banner: React.FC = () => {
return (
<div className="difizen-dumi-banner">
<div className="difizen-dumi-banner-main">
{themeConfig.banner.coverImage ? (
<>
<div
className="difizen-dumi-banner-content"
style={{
opacity: animate.imgOpacity,
transform: animate.imgTranslate,
}}
>
<div className="difizen-dumi-banner-content-title">
{themeConfig.banner.title}
</div>
<div className="difizen-dumi-banner-content-detail">
<p>{themeConfig.banner.desc}</p>
</div>
<div className="difizen-dumi-banner-content-actions">
{bottons.map((it: { link: string; name: string }) => {
return (
<Link
style={{
margin: '0 8px',
textDecoration: 'none',
border: '1px dashed #d9d9d9',
backgroundColor: '#fff',
padding: '4px 15px',
color: 'rgba(0, 0, 0, 0.88)',
}}
to={it.link}
key={`${it.name}-${it.link}`}
>
{it.name}{' '}
</Link>
);
})}
<div className="from-zinc-50 to-white dark:from-zinc-950 to-black relative">
<div className="absolute bg-[url('/_convertfast/gradient-bg-0.svg')] bg-auto bg-no-repeat z-0 inset-0 top-0 bottom-0 left-0 right-0 grayscale"></div>
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-20 sm:py-24 lg:py-32 relative z-10">
<div className="max-w-3xl">
<div className="content-animate">
<div className="circle-first">
<div className="circle-first-one" />
<div className="circle-first-two" />
</div>
<div className="circle-second"></div>
<div className="circle-third"></div>
</div>
</div>
<div>
<img
className="difizen-dumi-banner-img"
style={{
transition: 'all 1s ease-out',
opacity: animate.imgOpacity,
transform: animate.imgTranslate,
<h1 className="text-4xl sm:text-5xl lg:text-6xl font-bold tracking-tight text-primary mb-6 drop-shadow-md">
{themeConfig.banner.title}
</h1>
<p className="text-xl sm:text-2xl text-muted-foreground mb-8">
{themeConfig.banner.desc}
</p>
<Link to={'/introduction'}>
<Button type="primary" size="large" className="start-btn">
Start now
</Button>
</Link>
<CopyToClipboard
text="npm install @difizen/mana-app"
onCopy={() => {
message.success('已复制');
}}
src="https://mdn.alipayobjects.com/huamei_usjdcg/afts/img/A*BQWiQbC8LkMAAAAAAAAAAAAADo6HAQ/original"
/>
</div>
</>
) : (
<div className="difizen-dumi-hero">
<h1 className="difizen-dumi-hero-title">
<span>{themeConfig.banner.title}</span>
</h1>
<p className="difizen-dumi-hero-desc">{themeConfig.banner.desc}</p>
<div className="difizen-dumi-hero-actions">
{bottons.map(({ name, link }, index) => {
const style =
index === 0
? {
color: '#fff',
backgroundColor: '#1677ff',
}
: {};
return /^(\w+:)\/\/|^(mailto|tel):/.test(link) ? (
<a
style={style}
href={link}
target="_blank"
rel="noreferrer"
key={name}
>
{name}
</a>
) : (
<Link style={style} key={name} to={link}>
{name}
</Link>
);
})}
>
<Button size="large" className="install-btn">
pip install magent-ui
</Button>
</CopyToClipboard>
</div>
</div>
)}
</div>
</div>
</div>
);
Expand Down
Loading

0 comments on commit 3139e93

Please sign in to comment.