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

fanjia pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/seatunnel-website.git


The following commit(s) were added to refs/heads/main by this push:
     new b3ac50256cf [Improve] Support dark mode (#329)
b3ac50256cf is described below

commit b3ac50256cffde0cf6c03887591ba1aa3bb3edc5
Author: Jia Fan <[email protected]>
AuthorDate: Tue Sep 3 20:28:38 2024 +0800

    [Improve] Support dark mode (#329)
---
 docusaurus.config.js      |   5 +++--
 src/css/custom.css        |   8 ++++++++
 src/pages/home/index.less |  16 ++++++++--------
 src/styles/base.less      |   6 +++---
 static/image/favicon.ico  | Bin 1595 -> 140184 bytes
 5 files changed, 22 insertions(+), 13 deletions(-)

diff --git a/docusaurus.config.js b/docusaurus.config.js
index fad24fedf70..d5ebe2c7a99 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -78,7 +78,8 @@ const config = {
     hideOnScroll: false, // Whether to hide the sidebar on scroll
     colorMode: {
       defaultMode: "light",
-      disableSwitch: true,
+      disableSwitch: false,
+      respectPrefersColorScheme: true,
     },
     navbar: {
       title: "Apache SeaTunnel",
@@ -247,7 +248,7 @@ const config = {
         },
       ],
       copyright: `
-            <div style="margin-top: 20px;background: #f4f8fa">
+            <div style="margin-top: 20px;">
                 <img style="height:50px;margin: 30px 0 10px;" alt="Apache 
Software Foundation" src="/image/asf_logo_wide.svg" />
                 <div style="border-top: 1px solid #ccc;min-height: 
60px;line-height: 20px;text-align: center;font-family: Avenir-Medium;font-size: 
14px;color: #999;display: flex;align-items: center;"><span>Copyright © 
2021-${new Date().getFullYear()} The Apache Software Foundation. Apache 
SeaTunnel, SeaTunnel, and its feather logo are trademarks of The Apache 
Software Foundation.</span></div>
                 <div style="text-align: center;">
diff --git a/src/css/custom.css b/src/css/custom.css
index 0f93a882821..2d0a692bc4e 100644
--- a/src/css/custom.css
+++ b/src/css/custom.css
@@ -59,3 +59,11 @@ html {
 .footer__link-item svg,.navbar__link svg {
   display: none;
 }
+
+.menu__link {
+  font-weight: var(--ifm-font-weight-bold);
+}
+
+html[data-theme='dark']  img {
+  filter: brightness(.8) contrast(1.2)
+}
\ No newline at end of file
diff --git a/src/pages/home/index.less b/src/pages/home/index.less
index 3556745388f..72a953d6256 100644
--- a/src/pages/home/index.less
+++ b/src/pages/home/index.less
@@ -18,7 +18,7 @@
   }
 
   &.slogan {
-    background-color: #fff;
+    //background-color: #fff;
     margin-top: -54px;
 
     .block {
@@ -27,7 +27,7 @@
   }
 
   &.feature {
-    background-color: rgba(219, 238, 253, 0.3);
+    //background-color: rgba(219, 238, 253, 0.3);
     .block {
       width: 80%;
     }
@@ -257,7 +257,7 @@
       }
 
       .item-title {
-        color: #333;
+        //color: #333;
         font-weight: 700;
         line-height: 32px;
         font-size: 20px;
@@ -265,7 +265,7 @@
       }
 
       .item-desc {
-        color: #666666;
+        //color: #666666;
         line-height: 32px;
         font-size: 16px;
         font-weight: 400;
@@ -275,8 +275,8 @@
     }
 
     .feature_item:hover {
-      background-color: #fff;
-      box-shadow: 0 0 12px 0 rgb(0 15 32 / 10%);
+      //background-color: #fff;
+      //box-shadow: 0 0 12px 0 rgb(0 15 32 / 10%);
     }
   }
 
@@ -292,7 +292,7 @@
       .apache {
         font-size: 5rem;
         font-weight: lighter;
-        color: #0f1223;
+        //color: #0f1223;
         letter-spacing: 2px;
         white-space: nowrap;
         margin-right: 10px;
@@ -329,7 +329,7 @@
     .main_slogan {
       margin-bottom: 80px;
       font-size: 30px;
-      color: #0f1223;
+      //color: #0f1223;
       text-align: center;
       line-height: 32px;
       font-weight: 500;
diff --git a/src/styles/base.less b/src/styles/base.less
index 942a4daf5df..fdc41dcd0ca 100644
--- a/src/styles/base.less
+++ b/src/styles/base.less
@@ -22,10 +22,10 @@ p {
 
 body {
   min-width: 1200px;
-  font-size: 14px;
-  color: #4A4A4A;
+  font-size: 15px;
+  //color: #4A4A4A;
   line-height: 26px;
-  background: #ffffff;
+  //background: #ffffff;
   font-family: PingFangSC-Regular, -apple-system, BlinkMacSystemFont, "Segoe 
UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
 }
 
diff --git a/static/image/favicon.ico b/static/image/favicon.ico
index b6b6c2c6ef1..34de06ac5d8 100644
Binary files a/static/image/favicon.ico and b/static/image/favicon.ico differ

Reply via email to