From 27d570b49b38a106f86627e221f6734c010b32ac Mon Sep 17 00:00:00 2001 From: mapan-nju <2246839805@qq.com> Date: Wed, 20 Nov 2024 14:53:25 +0800 Subject: [PATCH 1/7] new homepage --- app/newpage/layout.tsx | 19 ++++++++ app/newpage/page.tsx | 89 +++++++++++++++++++++++++++++++++++++ app/newpage/search/page.tsx | 74 ++++++++++++++++++++++++++++++ app/newpage/styles.css | 0 4 files changed, 182 insertions(+) create mode 100644 app/newpage/layout.tsx create mode 100644 app/newpage/page.tsx create mode 100644 app/newpage/search/page.tsx create mode 100644 app/newpage/styles.css diff --git a/app/newpage/layout.tsx b/app/newpage/layout.tsx new file mode 100644 index 0000000..30e72fa --- /dev/null +++ b/app/newpage/layout.tsx @@ -0,0 +1,19 @@ +import '@/app/ui/global.css'; + + +export const metadata = { + title: 'cratespro', + description: 'Generated by Next.js', +} + +export default function RootLayout({ + children, +}: { + children: React.ReactNode +}) { + return ( + + {children} + + ) +} diff --git a/app/newpage/page.tsx b/app/newpage/page.tsx new file mode 100644 index 0000000..b7708b7 --- /dev/null +++ b/app/newpage/page.tsx @@ -0,0 +1,89 @@ +import React from 'react'; +import '@/app/ui/global.css'; + + +const HomePage = () => { + return ( + //紫色渐变 + //
+ // {/* 头部和搜索部分 */} + //
+ //
+ //
open/source/insights
+ // + //
+ //
+ //

Understand your dependencies

+ //

Your software and your users rely not only on the code you write, but also on the code your code depends on, the code that code depends on, and so on.

+ //
+ // + // + //
+ //
+ //
+ + + //绿色渐变 + < div className="min-h-screen bg-gray-900 text-white" > +
+
open/source/insights
+ +
+ {/* 搜索部分 */} +
+

Understand your dependencies

+

Your software and your users rely not only on the code you write, but also on the code your code depends on, the code that code depends on, and so on.

+
+ + +
+
+ + + {/* 分割线部分 */} +
+ + {/* 一些介绍 */} +
+
+

New features in the deps.dev API

+

The deps.dev API, which provides free access to the data that powers this website, now has experimental batch and pull support, as well as a new version that comes with a stability guarantee and deprecation policy.

+

Learn more about the new features on our blog, or get started with the API documentation, and code examples.

+
+ +
+

Seeing the big picture can be difficult—but it shouldn't be

+

The Open Source Insights page for each package shows the full dependency graph and updates it every day. The information provided can help you make informed decisions about using, building, and maintaining your software.

+

With Open Source Insights, you can actually see the dependency graph for a package, then isolate the paths to a particular dependency. Or see whether a vulnerability in a dependency might affect your code. Or compare two versions of a package to see how the dependencies have changed in a new release.

+
+ +
+

How it works

+

The service repeatedly examines sites such as github.com, npmjs.com, and pkg.go.dev to find up-to-date information about open source software packages. Using that information, it builds for each package the full dependency graph from scratch—not just from package lock files—connecting it to the packages it depends on and to those that depend on it. This transitive dependency graph allows problems in any package to be made visible to the owners and users of any software they affect.

+
+
+
+ ); +} + +export default HomePage; diff --git a/app/newpage/search/page.tsx b/app/newpage/search/page.tsx new file mode 100644 index 0000000..267b632 --- /dev/null +++ b/app/newpage/search/page.tsx @@ -0,0 +1,74 @@ +"use client"; + +import { useState } from 'react'; + +export default function Home() { + //const [query,] = useState(''); //const [query, setQuery] = useState(''); + // 使用假数据进行测试,const [results, setResults] = useState([ + const [results,] = useState([ + { crate_name: "tokio", version: "1.41.1", date: "2023-01-01" }, + { crate_name: "tokio", version: "0.1.2", date: "2023-02-01" }, + ]); + + // const search = async () => { + // // 待替换api + // const apiUrl = 'api'; + + // try { + // const response = await fetch(apiUrl, { + // method: 'POST', + // headers: { + // 'Content-Type': 'application/json', + // }, + // body: JSON.stringify({ query }), + // }); + + // const data = await response.json(); + // setResults(data.results); + // } catch (error) { + // console.error('Error fetching data:', error); + // } + // }; + + return ( + //页面顶部和搜索框 +
+
+
+
+ open + / + source + / + insights +
+
+ + +
+
+
+ + {/*搜索数据展示 */} +
+
+ {results.map((item, index) => ( +
+ {item.crate_name} +
Crate {item.version}Published {item.date}
+
+ ))} +
+
+
+ ); +} \ No newline at end of file diff --git a/app/newpage/styles.css b/app/newpage/styles.css new file mode 100644 index 0000000..e69de29 From 9f9f73f74bf25dfdf94adf8b87f6a84a5aca78b3 Mon Sep 17 00:00:00 2001 From: mapan-nju <2246839805@qq.com> Date: Wed, 20 Nov 2024 15:21:47 +0800 Subject: [PATCH 2/7] with gpg --- app/newpage/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/newpage/page.tsx b/app/newpage/page.tsx index b7708b7..e940c27 100644 --- a/app/newpage/page.tsx +++ b/app/newpage/page.tsx @@ -79,7 +79,7 @@ const HomePage = () => {

How it works

-

The service repeatedly examines sites such as github.com, npmjs.com, and pkg.go.dev to find up-to-date information about open source software packages. Using that information, it builds for each package the full dependency graph from scratch—not just from package lock files—connecting it to the packages it depends on and to those that depend on it. This transitive dependency graph allows problems in any package to be made visible to the owners and users of any software they affect.

+

The service repeatedly examinesabaaba sites such as github.com, npmjs.com, and pkg.go.dev to find up-to-date information about open source software packages. Using that information, it builds for each package the full dependency graph from scratch—not just from package lock files—connecting it to the packages it depends on and to those that depend on it. This transitive dependency graph allows problems in any package to be made visible to the owners and users of any software they affect.

From 078f718497b680970b108f49b3e71b76c78c9613 Mon Sep 17 00:00:00 2001 From: mapan-nju <2246839805@qq.com> Date: Wed, 20 Nov 2024 15:21:47 +0800 Subject: [PATCH 3/7] with gpg --- app/newpage/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/newpage/page.tsx b/app/newpage/page.tsx index b7708b7..e940c27 100644 --- a/app/newpage/page.tsx +++ b/app/newpage/page.tsx @@ -79,7 +79,7 @@ const HomePage = () => {

How it works

-

The service repeatedly examines sites such as github.com, npmjs.com, and pkg.go.dev to find up-to-date information about open source software packages. Using that information, it builds for each package the full dependency graph from scratch—not just from package lock files—connecting it to the packages it depends on and to those that depend on it. This transitive dependency graph allows problems in any package to be made visible to the owners and users of any software they affect.

+

The service repeatedly examinesabaaba sites such as github.com, npmjs.com, and pkg.go.dev to find up-to-date information about open source software packages. Using that information, it builds for each package the full dependency graph from scratch—not just from package lock files—connecting it to the packages it depends on and to those that depend on it. This transitive dependency graph allows problems in any package to be made visible to the owners and users of any software they affect.

From fe71383e64bb563df0321d41e0436840c0065c36 Mon Sep 17 00:00:00 2001 From: mapan-nju <2246839805@qq.com> Date: Wed, 20 Nov 2024 15:52:36 +0800 Subject: [PATCH 4/7] 111 --- app/newpage/page.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/newpage/page.tsx b/app/newpage/page.tsx index e940c27..b02b304 100644 --- a/app/newpage/page.tsx +++ b/app/newpage/page.tsx @@ -68,18 +68,18 @@ const HomePage = () => {

New features in the deps.dev API

The deps.dev API, which provides free access to the data that powers this website, now has experimental batch and pull support, as well as a new version that comes with a stability guarantee and deprecation policy.

-

Learn more about the new features on our blog, or get started with the API documentation, and code examples.

+

Learn more1 about the new features11 on our blog, or get started with the API documentation, and code examples.

Seeing the big picture can be difficult—but it shouldn't be

The Open Source Insights page for each package shows the full dependency graph and updates it every day. The information provided can help you make informed decisions about using, building, and maintaining your software.

-

With Open Source Insights, you can actually see the dependency graph for a package, then isolate the paths to a particular dependency. Or see whether a vulnerability in a dependency might affect your code. Or compare two versions of a package to see how the dependencies have changed in a new release.

+

With Open Source Insights, you1 can actually11 see the dependency graph for a package, then isolate the paths to a particular dependency. Or see whether a vulnerability in a dependency might affect your code. Or compare two versions of a package to see how the dependencies have changed in a new release.

How it works

-

The service repeatedly examinesabaaba sites such as github.com, npmjs.com, and pkg.go.dev to find up-to-date information about open source software packages. Using that information, it builds for each package the full dependency graph from scratch—not just from package lock files—connecting it to the packages it depends on and to those that depend on it. This transitive dependency graph allows problems in any package to be made visible to the owners and users of any software they affect.

+

The service repeatedly examines11 sites11 such as github.com, npmjs.com, and pkg.go.dev to find up-to-date information about open source software packages. Using that information, it builds for each package the full dependency graph from scratch—not just from package lock files—connecting it to the packages it depends on and to those that depend on it. This transitive dependency graph allows problems in any package to be made visible to the owners and users of any software they affect.

From b4805ff5b1fab57dd7740241f27d89de02ff9ba1 Mon Sep 17 00:00:00 2001 From: mapan-nju <2246839805@qq.com> Date: Wed, 20 Nov 2024 14:53:25 +0800 Subject: [PATCH 5/7] new gpg gpg --- app/newpage/layout.tsx | 19 ++++++++ app/newpage/page.tsx | 89 +++++++++++++++++++++++++++++++++++++ app/newpage/search/page.tsx | 74 ++++++++++++++++++++++++++++++ app/newpage/styles.css | 0 4 files changed, 182 insertions(+) create mode 100644 app/newpage/layout.tsx create mode 100644 app/newpage/page.tsx create mode 100644 app/newpage/search/page.tsx create mode 100644 app/newpage/styles.css diff --git a/app/newpage/layout.tsx b/app/newpage/layout.tsx new file mode 100644 index 0000000..30e72fa --- /dev/null +++ b/app/newpage/layout.tsx @@ -0,0 +1,19 @@ +import '@/app/ui/global.css'; + + +export const metadata = { + title: 'cratespro', + description: 'Generated by Next.js', +} + +export default function RootLayout({ + children, +}: { + children: React.ReactNode +}) { + return ( + + {children} + + ) +} diff --git a/app/newpage/page.tsx b/app/newpage/page.tsx new file mode 100644 index 0000000..b7708b7 --- /dev/null +++ b/app/newpage/page.tsx @@ -0,0 +1,89 @@ +import React from 'react'; +import '@/app/ui/global.css'; + + +const HomePage = () => { + return ( + //紫色渐变 + //
+ // {/* 头部和搜索部分 */} + //
+ //
+ //
open/source/insights
+ // + //
+ //
+ //

Understand your dependencies

+ //

Your software and your users rely not only on the code you write, but also on the code your code depends on, the code that code depends on, and so on.

+ //
+ // + // + //
+ //
+ //
+ + + //绿色渐变 + < div className="min-h-screen bg-gray-900 text-white" > +
+
open/source/insights
+ +
+ {/* 搜索部分 */} +
+

Understand your dependencies

+

Your software and your users rely not only on the code you write, but also on the code your code depends on, the code that code depends on, and so on.

+
+ + +
+
+ + + {/* 分割线部分 */} +
+ + {/* 一些介绍 */} +
+
+

New features in the deps.dev API

+

The deps.dev API, which provides free access to the data that powers this website, now has experimental batch and pull support, as well as a new version that comes with a stability guarantee and deprecation policy.

+

Learn more about the new features on our blog, or get started with the API documentation, and code examples.

+
+ +
+

Seeing the big picture can be difficult—but it shouldn't be

+

The Open Source Insights page for each package shows the full dependency graph and updates it every day. The information provided can help you make informed decisions about using, building, and maintaining your software.

+

With Open Source Insights, you can actually see the dependency graph for a package, then isolate the paths to a particular dependency. Or see whether a vulnerability in a dependency might affect your code. Or compare two versions of a package to see how the dependencies have changed in a new release.

+
+ +
+

How it works

+

The service repeatedly examines sites such as github.com, npmjs.com, and pkg.go.dev to find up-to-date information about open source software packages. Using that information, it builds for each package the full dependency graph from scratch—not just from package lock files—connecting it to the packages it depends on and to those that depend on it. This transitive dependency graph allows problems in any package to be made visible to the owners and users of any software they affect.

+
+
+
+ ); +} + +export default HomePage; diff --git a/app/newpage/search/page.tsx b/app/newpage/search/page.tsx new file mode 100644 index 0000000..267b632 --- /dev/null +++ b/app/newpage/search/page.tsx @@ -0,0 +1,74 @@ +"use client"; + +import { useState } from 'react'; + +export default function Home() { + //const [query,] = useState(''); //const [query, setQuery] = useState(''); + // 使用假数据进行测试,const [results, setResults] = useState([ + const [results,] = useState([ + { crate_name: "tokio", version: "1.41.1", date: "2023-01-01" }, + { crate_name: "tokio", version: "0.1.2", date: "2023-02-01" }, + ]); + + // const search = async () => { + // // 待替换api + // const apiUrl = 'api'; + + // try { + // const response = await fetch(apiUrl, { + // method: 'POST', + // headers: { + // 'Content-Type': 'application/json', + // }, + // body: JSON.stringify({ query }), + // }); + + // const data = await response.json(); + // setResults(data.results); + // } catch (error) { + // console.error('Error fetching data:', error); + // } + // }; + + return ( + //页面顶部和搜索框 +
+
+
+
+ open + / + source + / + insights +
+
+ + +
+
+
+ + {/*搜索数据展示 */} +
+
+ {results.map((item, index) => ( +
+ {item.crate_name} +
Crate {item.version}Published {item.date}
+
+ ))} +
+
+
+ ); +} \ No newline at end of file diff --git a/app/newpage/styles.css b/app/newpage/styles.css new file mode 100644 index 0000000..e69de29 From d1cdfdb1cf228eadc4b32a12728c7633bf70ef4f Mon Sep 17 00:00:00 2001 From: mapan-nju <2246839805@qq.com> Date: Wed, 20 Nov 2024 16:22:34 +0800 Subject: [PATCH 6/7] a --- app/newpage/layout.tsx | 19 ++++++++ app/newpage/page.tsx | 95 +++++++++++++++++++++++++++++++++++++ app/newpage/search/page.tsx | 74 +++++++++++++++++++++++++++++ app/newpage/styles.css | 0 4 files changed, 188 insertions(+) create mode 100644 app/newpage/layout.tsx create mode 100644 app/newpage/page.tsx create mode 100644 app/newpage/search/page.tsx create mode 100644 app/newpage/styles.css diff --git a/app/newpage/layout.tsx b/app/newpage/layout.tsx new file mode 100644 index 0000000..30e72fa --- /dev/null +++ b/app/newpage/layout.tsx @@ -0,0 +1,19 @@ +import '@/app/ui/global.css'; + + +export const metadata = { + title: 'cratespro', + description: 'Generated by Next.js', +} + +export default function RootLayout({ + children, +}: { + children: React.ReactNode +}) { + return ( + + {children} + + ) +} diff --git a/app/newpage/page.tsx b/app/newpage/page.tsx new file mode 100644 index 0000000..0e61643 --- /dev/null +++ b/app/newpage/page.tsx @@ -0,0 +1,95 @@ +import React from 'react'; +import '@/app/ui/global.css'; + + +const HomePage = () => { + return ( + //紫色渐变 + //
+ // {/* 头部和搜索部分 */} + //
+ //
+ //
open/source/insights
+ // + //
+ //
+ //

Understand your dependencies

+ //

Your software and your users rely not only on the code you write, but also on the code your code depends on, the code that code depends on, and so on.

+ //
+ // + // + //
+ //
+ //
+ + + //绿色渐变 + < div className="min-h-screen bg-gray-900 text-white" > +
+
open/source/insights
+ +
+ {/* 搜索部分 */} +
+

Understand your dependencies

+

Your software and your users rely not only on the code you write, but also on the code your code depends on, the code that code depends on, and so on.

+
+ + +
+
+ + + {/* 分割线部分 */} +
+ + {/* 一些介绍 */} +
+
+

New features in the deps.dev API

+

The deps.dev API, which provides free access to the data that powers this website, now has experimental batch and pull support, as well as a new version that comes with a stability guarantee and deprecation policy.

+ +

Learn more about the new features on our blog, or get started with the API documentation, and code examples.

+ +
+ +
+

Seeing the big picture can be difficult—but it shouldn't be

+

The Open Source Insights page for each package shows the full dependency graph and updates it every day. The information provided can help you make informed decisions about using, building, and maintaining your software.

+ +

With Open Source Insights, you can actually see the dependency graph for a package, then isolate the paths to a particular dependency. Or see whether a vulnerability in a dependency might affect your code. Or compare two versions of a package to see how the dependencies have changed in a new release.

+ +
+ +
+

How it works

+ +

The service repeatedly examines sites such as github.com, npmjs.com, and pkg.go.dev to find up-to-date information about open source software packages. Using that information, it builds for each package the full dependency graph from scratch—not just from package lock files—connecting it to the packages it depends on and to those that depend on it. This transitive dependency graph allows problems in any package to be made visible to the owners and users of any software they affect.

+ +
+
+
+ ); +} + +export default HomePage; diff --git a/app/newpage/search/page.tsx b/app/newpage/search/page.tsx new file mode 100644 index 0000000..267b632 --- /dev/null +++ b/app/newpage/search/page.tsx @@ -0,0 +1,74 @@ +"use client"; + +import { useState } from 'react'; + +export default function Home() { + //const [query,] = useState(''); //const [query, setQuery] = useState(''); + // 使用假数据进行测试,const [results, setResults] = useState([ + const [results,] = useState([ + { crate_name: "tokio", version: "1.41.1", date: "2023-01-01" }, + { crate_name: "tokio", version: "0.1.2", date: "2023-02-01" }, + ]); + + // const search = async () => { + // // 待替换api + // const apiUrl = 'api'; + + // try { + // const response = await fetch(apiUrl, { + // method: 'POST', + // headers: { + // 'Content-Type': 'application/json', + // }, + // body: JSON.stringify({ query }), + // }); + + // const data = await response.json(); + // setResults(data.results); + // } catch (error) { + // console.error('Error fetching data:', error); + // } + // }; + + return ( + //页面顶部和搜索框 +
+
+
+
+ open + / + source + / + insights +
+
+ + +
+
+
+ + {/*搜索数据展示 */} +
+
+ {results.map((item, index) => ( +
+ {item.crate_name} +
Crate {item.version}Published {item.date}
+
+ ))} +
+
+
+ ); +} \ No newline at end of file diff --git a/app/newpage/styles.css b/app/newpage/styles.css new file mode 100644 index 0000000..e69de29 From 54b56dda307b0756f63865f671dc43916e05ec36 Mon Sep 17 00:00:00 2001 From: mapan-nju <2246839805@qq.com> Date: Fri, 22 Nov 2024 12:30:31 +0800 Subject: [PATCH 7/7] static page --- app/homepage/[name]/[version]/dependencies/page.tsx | 8 +++++--- app/homepage/[name]/[version]/page.tsx | 10 +++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/app/homepage/[name]/[version]/dependencies/page.tsx b/app/homepage/[name]/[version]/dependencies/page.tsx index cc4682d..1126518 100644 --- a/app/homepage/[name]/[version]/dependencies/page.tsx +++ b/app/homepage/[name]/[version]/dependencies/page.tsx @@ -1,5 +1,6 @@ import React from 'react'; -import { Link, useLocation } from 'react-router-dom'; +import Link from 'next/link'; + const CratePage = () => { // Other code @@ -48,11 +49,11 @@ const CratePage = () => { -