You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by li...@apache.org on 2022/12/13 11:55:25 UTC

[dolphinscheduler-website] branch master updated: [Improvement] Some improvements. (#855)

This is an automated email from the ASF dual-hosted git repository.

liudongkai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 647b7e9d9b [Improvement] Some improvements. (#855)
647b7e9d9b is described below

commit 647b7e9d9b502397e89e8dabd92bcef6d6104b32
Author: Amy0104 <wa...@apache.org>
AuthorDate: Tue Dec 13 19:55:19 2022 +0800

    [Improvement] Some improvements. (#855)
    
    - added 404 page
    - replaced banner images on the home page
    - added not found component
---
 README.md                         |   2 +-
 public/404.html                   |  41 ++++++++++++++++++++++++++++++++++++++
 public/favicon.ico                | Bin 4286 -> 0 bytes
 public/images/home/home-1-1.png   | Bin 58283 -> 245235 bytes
 public/images/home/home-1-2.png   | Bin 75449 -> 272176 bytes
 public/images/home/home-1-3.png   | Bin 189422 -> 542342 bytes
 public/images/home/home-1-4.png   | Bin 165431 -> 520799 bytes
 public/images/home/home-3-3.png   | Bin 103580 -> 103828 bytes
 src/App.jsx                       |   2 +-
 src/components/NavBar/useMenu.jsx |   8 ++++++--
 src/views/404.jsx                 |   5 -----
 src/views/NotFound.jsx            |  27 +++++++++++++++++++++++++
 12 files changed, 76 insertions(+), 9 deletions(-)

diff --git a/README.md b/README.md
index 820b2b2b3c..5c0d097773 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,7 @@ node version is 10+, version lower than 10.x is not supported yet.
    2.1. Run `export PROTOCOL_MODE=ssh` tells Git clone resource via SSH protocol instead of HTTPS protocol
    2.2. Run `./scripts/prepare_docs.sh` prepare all related resources, for more information you could see [how prepare script work](HOW_PREPARE_WOKR.md)
 3. Run `yarn generate` in the root directory to format and perpare the data.
-4. Run `yarn start` in the root directory to start a local server, you will see the website in 'http://localhost:8080'.
+4. Run `yarn dev` in the root directory to start a local server, you will see the website in 'http://localhost:8080'.
 
 ```
 Note: if you clone the code in Windows, not Mac or Linux. Please read the details below.
diff --git a/public/404.html b/public/404.html
new file mode 100644
index 0000000000..c76667b444
--- /dev/null
+++ b/public/404.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1" />
+    <meta name="theme-color" content="#000000" />
+    <meta
+      name="description"
+      content="Apache DolphinScheduler is a distributed and easy-to-extend visual workflow scheduler system, dedicated to solving the complex task dependencies in data processing, making the scheduling system out of the box for data processing."
+    />
+    <!--
+      manifest.json provides metadata used when your web app is installed on a
+      user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
+    -->
+    <!--
+      Notice the use of %PUBLIC_URL% in the tags above.
+      It will be replaced with the URL of the `public` folder during the build.
+      Only files inside the `public` folder can be referenced from the HTML.
+
+      Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
+      work correctly both with client-side routing and a non-root public URL.
+      Learn how to configure a non-root public URL by running `npm run build`.
+    -->
+    <title>Apache DolphinScheduler</title>
+  </head>
+  <body>
+    <script>
+      window.location.href = "/";
+    </script>
+    <!--
+      This HTML file is a template.
+      If you open it directly in the browser, you will see an empty page.
+
+      You can add webfonts, meta tags, or analytics to this file.
+      The build step will place the bundled scripts into the <body> tag.
+
+      To begin the development, run `npm start` or `yarn start`.
+      To create a production bundle, use `npm run build` or `yarn build`.
+    -->
+  </body>
+</html>
diff --git a/public/favicon.ico b/public/favicon.ico
deleted file mode 100644
index acf4cf74c8..0000000000
Binary files a/public/favicon.ico and /dev/null differ
diff --git a/public/images/home/home-1-1.png b/public/images/home/home-1-1.png
index dda926ba0b..68b3562f09 100644
Binary files a/public/images/home/home-1-1.png and b/public/images/home/home-1-1.png differ
diff --git a/public/images/home/home-1-2.png b/public/images/home/home-1-2.png
index 1de832f6a6..e5ac231795 100644
Binary files a/public/images/home/home-1-2.png and b/public/images/home/home-1-2.png differ
diff --git a/public/images/home/home-1-3.png b/public/images/home/home-1-3.png
index c6b4b1187a..ce4001fe20 100644
Binary files a/public/images/home/home-1-3.png and b/public/images/home/home-1-3.png differ
diff --git a/public/images/home/home-1-4.png b/public/images/home/home-1-4.png
index 9d7333e56e..faaac5099e 100644
Binary files a/public/images/home/home-1-4.png and b/public/images/home/home-1-4.png differ
diff --git a/public/images/home/home-3-3.png b/public/images/home/home-3-3.png
index 8d69207d97..0e8d9b54c3 100644
Binary files a/public/images/home/home-3-3.png and b/public/images/home/home-3-3.png differ
diff --git a/src/App.jsx b/src/App.jsx
index 0ce9240124..ee3e433d6c 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -15,7 +15,7 @@ import Download, { Deployment, Version } from "./views/Download";
 import Blog, { BlogDetail } from "./views/Blog";
 import Event, { EventDetail } from "./views/Event";
 import Support from "./views/Support";
-import NotFound from "./views/404";
+import NotFound from "./views/NotFound";
 import getLocales from "./api/getLocales";
 import getVersions from "./api/getVersions";
 
diff --git a/src/components/NavBar/useMenu.jsx b/src/components/NavBar/useMenu.jsx
index c5997ef4ca..684a575ace 100644
--- a/src/components/NavBar/useMenu.jsx
+++ b/src/components/NavBar/useMenu.jsx
@@ -49,7 +49,7 @@ export const useMenu = (t) => {
       children: [
         {
           label: (
-            <a href="https://www.apache.org/" target="_blank">
+            <a href="https://www.apache.org/" target="_blank" rel="noreferrer">
               Foundation
             </a>
           ),
@@ -57,7 +57,11 @@ export const useMenu = (t) => {
         },
         {
           label: (
-            <a href="https://www.apache.org/licenses/" target="_blank">
+            <a
+              href="https://www.apache.org/licenses/"
+              target="_blank"
+              rel="noreferrer"
+            >
               License
             </a>
           ),
diff --git a/src/views/404.jsx b/src/views/404.jsx
deleted file mode 100644
index 9893f39cb0..0000000000
--- a/src/views/404.jsx
+++ /dev/null
@@ -1,5 +0,0 @@
-const NotFound = () => {
-  return <div>404</div>;
-};
-
-export default NotFound;
diff --git a/src/views/NotFound.jsx b/src/views/NotFound.jsx
new file mode 100644
index 0000000000..a4093c71b0
--- /dev/null
+++ b/src/views/NotFound.jsx
@@ -0,0 +1,27 @@
+import { Result, Button } from "antd";
+import { useParams, useNavigate } from "react-router-dom";
+
+const NotFound = () => {
+  const params = useParams();
+  const navigate = useNavigate();
+  return (
+    <Result
+      status="404"
+      title="404"
+      subTitle="Sorry, the page you visited does not exist."
+      extra={
+        <Button
+          type="primary"
+          onClick={() => {
+            navigate(`/${params.locale || "en-us"}`);
+          }}
+          shape="round"
+        >
+          Back Home
+        </Button>
+      }
+    />
+  );
+};
+
+export default NotFound;