@bbki.ng/site 1.0.13 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/package.json +1 -1
- package/src/app.tsx +2 -1
- package/src/pages/cover/index.tsx +2 -2
- package/src/pages/extensions/png/index.tsx +8 -26
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/app.tsx
CHANGED
|
@@ -39,6 +39,7 @@ const Layout = () => {
|
|
|
39
39
|
|
|
40
40
|
const NowInMidCol = threeColWrapper(NowPage);
|
|
41
41
|
const ContentInMidCol = threeColWrapper(Txt);
|
|
42
|
+
const ProjectsInMidCol = threeColWrapper(Png);
|
|
42
43
|
const ArticleInMidCol = threeColWrapper(ArticlePage);
|
|
43
44
|
const TagsInMidCol = threeColWrapper(Tags);
|
|
44
45
|
const LoginInMidCol = threeColWrapper(Login);
|
|
@@ -55,7 +56,7 @@ export const App = () => {
|
|
|
55
56
|
<Route path="/" element={<Layout />}>
|
|
56
57
|
<Route index element={<CoverInMidCol />} />
|
|
57
58
|
|
|
58
|
-
<Route path="/projects" element={<
|
|
59
|
+
<Route path="/projects" element={<ProjectsInMidCol />} />
|
|
59
60
|
<Route path="/projects/:id" element={<PhotoProjects />} />
|
|
60
61
|
|
|
61
62
|
<Route path="blog" element={<ContentInMidCol />} />
|
|
@@ -7,14 +7,14 @@ export const Cover = (props: { className: string }) => {
|
|
|
7
7
|
links={[
|
|
8
8
|
{
|
|
9
9
|
to: "/projects",
|
|
10
|
-
name: "
|
|
10
|
+
name: "cd ./projects",
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
to: "/blog",
|
|
14
14
|
name: "ls *.md",
|
|
15
15
|
},
|
|
16
16
|
]}
|
|
17
|
-
title="
|
|
17
|
+
title=" "
|
|
18
18
|
/>
|
|
19
19
|
);
|
|
20
20
|
};
|
|
@@ -1,35 +1,17 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import classnames from "classnames";
|
|
1
|
+
import React from "react";
|
|
3
2
|
import { useProjects } from "@/hooks/use_projects";
|
|
4
|
-
import { Link, Gallery, ImageRenderer } from "@bbki.ng/components";
|
|
3
|
+
import { Link, Gallery, ImageRenderer, LinkList } from "@bbki.ng/components";
|
|
5
4
|
import { MySuspense } from "@/components";
|
|
6
|
-
import { imageFormatter } from "@/utils";
|
|
7
5
|
|
|
8
6
|
const Projects = () => {
|
|
9
7
|
const { projects } = useProjects("", true);
|
|
10
|
-
const renderImage: ImageRenderer = useCallback(
|
|
11
|
-
(img, index, col) => {
|
|
12
|
-
const project = projects[index];
|
|
13
|
-
return (
|
|
14
|
-
<div
|
|
15
|
-
className={classnames("mb-128", {
|
|
16
|
-
"md:mr-64": col === 0,
|
|
17
|
-
"md:ml-64": col !== 0,
|
|
18
|
-
})}
|
|
19
|
-
>
|
|
20
|
-
<Link to={`/projects/${project.name}`}>{img}</Link>
|
|
21
|
-
</div>
|
|
22
|
-
);
|
|
23
|
-
},
|
|
24
|
-
[projects]
|
|
25
|
-
);
|
|
26
8
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
9
|
+
const links = projects.map((p: any) => ({
|
|
10
|
+
to: `/projects/${p.name}`,
|
|
11
|
+
name: p.name,
|
|
12
|
+
}));
|
|
13
|
+
|
|
14
|
+
return <LinkList links={links} title="图片" />;
|
|
33
15
|
};
|
|
34
16
|
|
|
35
17
|
export default () => {
|