Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
JOU-amjs committed Sep 18, 2024
2 parents c76d7e1 + fa8f06e commit 80345ec
Show file tree
Hide file tree
Showing 15 changed files with 121 additions and 39 deletions.
9 changes: 9 additions & 0 deletions docs/showcase.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Showcase
---

Show your project here by commiting a PR that add your project to [**showcase.json**](https://https://github.com/alovajs/alovajs.github.io/blob/main/showcase.json)

import Showcase from '@site/src/components/Showcase';

<Showcase />
5 changes: 5 additions & 0 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ const config: Config = {
}
]
},
{
to: 'showcase',
position: 'left',
label: 'Showcase'
},
{
type: 'search',
className: 'doc-search',
Expand Down
9 changes: 9 additions & 0 deletions i18n/zh-CN/docusaurus-plugin-content-docs/current/showcase.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: 案例展示
---

通过提交一个 PR,在[**showcase.json**](https://https://github.com/alovajs/alovajs.github.io/blob/main/showcase.json)中添加你的项目,从而在此处展示你的项目。

import Showcase from '@site/src/components/Showcase';

<Showcase />
Original file line number Diff line number Diff line change
Expand Up @@ -422,10 +422,17 @@ flowchart LR
- [从 v2 迁移到 v3](/tutorial/project/migration/v2-to-v3)
- [从 axios 低成本迁移到 alova 的指南](/tutorial/project/migration/from-axios)

## 脚手架推荐
## 项目推荐

<NavCard list={[
{
Image: <img src="/img/project/naive-ui-admin.png"/>,
title: 'Naive Admin',
desc: '开箱即用的中后台框架/简化您的中后台开发',
link: 'https://www.naiveadmin.com/',
target: '__blank'
},
{
Image: <img src="https://codercup.github.io/unibest-docs/logo.svg"/>,
title: 'Uniapp 脚手架 - unibest',
desc: '集成了最新前端技术栈的跨端解决方案',
Expand Down
4 changes: 4 additions & 0 deletions i18n/zh-CN/docusaurus-theme-classic/navbar.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
"message": "社区贡献",
"description": "Navbar item with label Contributing"
},
"item.label.Showcase": {
"message": "案例展示",
"description": "Navbar item with label Showcase"
},
"item.label.About": {
"message": "关于",
"description": "Navbar item with label About"
Expand Down
44 changes: 44 additions & 0 deletions showcase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
[
{
"title": "Naive Admin",
"logo": "/img/project/naive-ui-admin.png",
"desc": "开箱即用的中后台框架/简化您的中后台开发",
"link": "https://www.naiveadmin.com/"
},
{
"title": "Nova-admin",
"logo": "/img/project/nova-admin.png",
"desc": "A simple and flexible admin template based on Vue3, Vite, TypeScript, NaiveUI",
"link": "https://github.com/chansee97/nova-admin"
},
{
"title": "EMS-ESP",
"logo": "/img/project/ems-esp.png",
"desc": "ESP32 firmware to read and control EMS and Heatronic compatible equipment such as boilers, thermostats, solar modules, and heat pumps",
"link": "https://github.com/emsesp/EMS-ESP32"
},
{
"title": "MallChat",
"logo": "/img/project/mall-chat.png",
"desc": "mallchat的前端项目,是一个既能购物又能聊天的电商系统。",
"link": "https://github.com/Evansy/MallChatWeb"
},
{
"title": "KoKo",
"logo": "/img/project/koko.png",
"desc": "a connector of JumpServer for secure connections using character protocols, supporting SSH, Telnet, Kubernetes, SFTP and database protocols",
"link": "https://github.com/jumpserver/koko"
},
{
"title": "5Minutes",
"logo": "/img/project/5minutes.png",
"desc": "5minutes is a mentor-mentee learning platform where mentors share content that is consumable in no more than 5minutes.",
"link": "https://app.5minutes.ng/"
},
{
"title": "vue-shopping-cart",
"logo": "/img/project/vue-shopping-cart.png",
"desc": "Simple shopping cart with Vue.js and Deno.js",
"link": "https://github.com/dangvanthanh/vue-shopping-cart"
}
]
11 changes: 8 additions & 3 deletions src/common/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,14 @@ const alovaInstance = createAlova({
];

export const Project: UserDescProps[] = [
{
avatar: '/img/project/naive-ui-admin.png',
name: 'Naive Admin',
to: 'https://www.naiveadmin.com/'
},
{
avatar: '/img/project/nova-admin.png',
name: 'Nova-admin',
name: 'Nova admin',
to: 'https://github.com/chansee97/nova-admin'
},
{
Expand All @@ -189,7 +194,7 @@ export const DeveloperComments: UserDescProps[] = [
avatar: '/img/avatar/scott-hu.png',
name: 'Scott Hu',
description: translate({
message: 'The creator of alova',
message: 'Creator of alova',
id: 'homepage.projects.Scott Hu.desc'
}),
children: (
Expand Down Expand Up @@ -225,7 +230,7 @@ export const DeveloperComments: UserDescProps[] = [
{
avatar: '/img/avatar/ah-jung.png',
name: 'Ah jung',
description: 'Developer',
description: 'Author of Naive Admin',
children: (
<p>
<Translate id="homepage.projects.Ah jung.comment">
Expand Down
38 changes: 20 additions & 18 deletions src/components/NavCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,27 @@ interface IProps {
}
const NavCard = ({ list }: IProps) => {
return (
<div className={styles.cardWrapper}>
{list.map(({ Image, target, title, desc, link }) => (
<Link
to={link}
key={title}
target={target}
className={clsx(styles.cardItem)}>
<div className={styles.cardTitle}>
<div className="flex-row align-center">
{Image ? <div className={styles.image}>{Image}</div> : null}
<strong>{title}</strong>
<div className="use-tailwind">
<div className="grid grid-rows-1 gap-3 xl:gap-4 xl:grid-cols-3">
{list.map(({ Image, target, title, desc, link }) => (
<Link
to={link}
key={title}
target={target}
className={clsx(styles.cardItem, desc ? '' : 'justify-center')}>
<div className={styles.cardTitle}>
<div className="flex-row align-center">
{Image ? <div className={styles.image}>{Image}</div> : null}
<strong>{title}</strong>
</div>
<IconFont
name="youjiantou"
width={18}></IconFont>
</div>
<IconFont
name="youjiantou"
width={18}></IconFont>
</div>
{desc ? <span className={styles.cardDesc}>{desc}</span> : null}
</Link>
))}
{desc ? <span className={styles.cardDesc}>{desc}</span> : null}
</Link>
))}
</div>
</div>
);
};
Expand Down
17 changes: 1 addition & 16 deletions src/components/NavCard/style.module.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
.cardWrapper {
display: flex;
}
.cardItem {
display: flex;
flex-direction: column;
Expand All @@ -18,9 +15,6 @@
background: transparent;
box-shadow: 2px 2px 8px var(--ifm-color-emphasis-300);
}
.cardItem:not(:last-child) {
margin-right: 1rem;
}
.cardTitle {
display: flex;
align-items: center;
Expand All @@ -38,19 +32,10 @@
.image {
width: 1.8rem;
margin-right: 0.6rem;
display: flex;
}
.image svg {
width: 100%;
height: auto;
display: block;
}

@media screen and (max-width: 996px) {
.cardWrapper {
flex-direction: column;
}
.cardItem:not(:last-child) {
margin-bottom: 1rem;
margin-right: 0;
}
}
13 changes: 13 additions & 0 deletions src/components/Showcase.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import showcase from '@site/showcase.json';
import NavCard from '@site/src/components/NavCard';

export default function Showcase(): JSX.Element {
return (
<NavCard
list={showcase.map(item => ({
Image: <img src={item.logo} />,
target: '__blank',
...item
}))}></NavCard>
);
}
1 change: 0 additions & 1 deletion src/pages/_indexComponent/UserDescription/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ function renderAvatar(avatar: UserDescProps['avatar'], size = 40, radius = 0) {
return typeof avatar === 'string' ? (
<img
style={{
width: `${size}px`,
height: `${size}px`,
borderRadius: `${radius}px`
}}
Expand Down
Binary file added static/img/project/5minutes.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 static/img/project/koko.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 static/img/project/naive-ui-admin.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 static/img/project/vue-shopping-cart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 80345ec

Please sign in to comment.