Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add recommend extension for site (#1922)
- Loading branch information
Showing
7 changed files
with
18,808 additions
and
2,152 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { Block } from './Block'; | ||
import React from 'react'; | ||
import { styled } from '../styled'; | ||
|
||
const Container = styled('div', { | ||
display: 'flex', | ||
flexDirection: 'row', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
}); | ||
|
||
const ExtensionHref = styled('a', { | ||
display: 'flex', | ||
borderRadius: 8, | ||
}); | ||
|
||
const Extension = styled('img', { | ||
height: 200, | ||
borderRadius: 8, | ||
}); | ||
|
||
const RecommendList = [ | ||
{ | ||
image: 'https://img.alicdn.com/imgextra/i3/O1CN01IZJkEY1bJrCKViAAc_!!6000000003445-2-tps-600-200.png', | ||
link: 'https://cool-js.com/', | ||
title: 'Cool js, 面向未来的后台开发框架', | ||
}, | ||
]; | ||
|
||
export function Recommend() { | ||
return ( | ||
<Block title="Recommend" subtitle="Great extensions from the open source community" background="light"> | ||
<Container> | ||
{RecommendList.map((item) => { | ||
return ( | ||
<ExtensionHref key={item.link} href={item.link} target="_blank"> | ||
<Extension alt={item.title} src={item.image} /> | ||
</ExtensionHref> | ||
); | ||
})} | ||
</Container> | ||
</Block> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters