@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 CHANGED
@@ -1,5 +1,7 @@
1
1
  # @bbki.ng/site
2
2
 
3
+ ## 1.0.14
4
+
3
5
  ## 1.0.13
4
6
 
5
7
  ## 1.0.12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbki.ng/site",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "code behind bbki.ng",
5
5
  "main": "index.js",
6
6
  "scripts": {
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={<Png />} />
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: "ls *.png",
10
+ name: "cd ./projects",
11
11
  },
12
12
  {
13
13
  to: "/blog",
14
14
  name: "ls *.md",
15
15
  },
16
16
  ]}
17
- title="history"
17
+ title=" "
18
18
  />
19
19
  );
20
20
  };
@@ -1,35 +1,17 @@
1
- import React, { useCallback, useEffect } from "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
- return (
28
- <Gallery
29
- images={projects.map((p: any) => p.cover).map(imageFormatter)}
30
- imageRenderer={renderImage}
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 () => {