From d2f09c565b31e9fe6e3695ebb2107cfd1f947cc0 Mon Sep 17 00:00:00 2001 From: "zorro.zhang" Date: Mon, 21 Nov 2022 21:18:33 +0800 Subject: [PATCH] =?UTF-8?q?ENH:=20Add=20darkmode=20of=20Html=EF=BC=8Cdepen?= =?UTF-8?q?d=20on=20UserAgent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I8b60db9e2cb7b0d163288e3d8a23db10b64b9bb3 --- resources/web/guide/1/index.html | 3 +- resources/web/guide/11/11.css | 5 --- resources/web/guide/11/index.html | 5 ++- resources/web/guide/21/21.js | 2 +- resources/web/guide/21/index.html | 35 ++++++++------- resources/web/guide/22/index.html | 1 + resources/web/guide/23/index.html | 1 + resources/web/guide/24/24.js | 2 +- resources/web/guide/24/index.html | 1 + resources/web/guide/3/3.css | 5 ++- resources/web/guide/3/index.html | 5 ++- resources/web/guide/5/index.html | 5 ++- resources/web/guide/css/common.css | 8 ++++ resources/web/guide/css/dark.css | 49 +++++++++++++++++++++ resources/web/guide/js/globalapi.js | 60 +++++++++++++++++++++++++ resources/web/homepage/css/dark.css | 50 +++++++++++++++++++++ resources/web/homepage/css/home.css | 10 +++-- resources/web/homepage/css/light.css | 0 resources/web/homepage/index.html | 61 +++++++++++++------------- resources/web/homepage/js/globalapi.js | 60 +++++++++++++++++++++++++ resources/web/homepage/js/home.js | 4 +- 21 files changed, 305 insertions(+), 67 deletions(-) create mode 100644 resources/web/guide/css/dark.css create mode 100644 resources/web/homepage/css/dark.css create mode 100644 resources/web/homepage/css/light.css diff --git a/resources/web/guide/1/index.html b/resources/web/guide/1/index.html index dea1d22991a..8565bf7a8ae 100644 --- a/resources/web/guide/1/index.html +++ b/resources/web/guide/1/index.html @@ -4,7 +4,8 @@ 引导_P1 - + + diff --git a/resources/web/guide/11/11.css b/resources/web/guide/11/11.css index b05d4356497..9584f1d598c 100644 --- a/resources/web/guide/11/11.css +++ b/resources/web/guide/11/11.css @@ -48,11 +48,6 @@ color: #fff; } -.RegionSelected:hover -{ - background-color:#00AE42; - color: #fff; -} #ChangeTip { diff --git a/resources/web/guide/11/index.html b/resources/web/guide/11/index.html index 8581fea0915..e503b475f0a 100644 --- a/resources/web/guide/11/index.html +++ b/resources/web/guide/11/index.html @@ -4,8 +4,9 @@ 引导_P21 - + + @@ -20,7 +21,7 @@
-
Asia-Pacific
+
Asia-Pacific
China
Europe
North America
diff --git a/resources/web/guide/21/21.js b/resources/web/guide/21/21.js index fbc32ced38c..fc7877892e0 100644 --- a/resources/web/guide/21/21.js +++ b/resources/web/guide/21/21.js @@ -89,7 +89,7 @@ function HandleModelList( pVal ) for(let m=0;m'+nNozzel+'mm nozzle
'; + HtmlNozzel+='
'+nNozzel+'mm nozzle
'; } let CoverImage="../../image/printer/"+OneModel['model']+"_cover.png"; diff --git a/resources/web/guide/21/index.html b/resources/web/guide/21/index.html index ad3f6854863..0f84af5ef45 100644 --- a/resources/web/guide/21/index.html +++ b/resources/web/guide/21/index.html @@ -6,6 +6,7 @@ 引导_P21 + @@ -35,28 +36,28 @@
BBL-3DP-V4NORMAL
-
0.4mm nozzle
-
0.1mm nozzle
+
0.4mm nozzle
+
0.1mm nozzle
BBL-3DP-V4NORMAL
-
0.4mm nozzle
-
0.22mm nozzle
-
0.1mm nozzle
+
0.4mm nozzle
+
0.22mm nozzle
+
0.1mm nozzle
BBL-3DP-V4NORMAL
-
0.4mm nozzle
-
0.11mm nozzle
+
0.4mm nozzle
+
0.11mm nozzle
BBL-3DP-V4NORMAL
-
0.4mm nozzle
-
0.22mm nozzle
-
0.1mm nozzle
+
0.4mm nozzle
+
0.22mm nozzle
+
0.1mm nozzle
@@ -77,16 +78,16 @@
-
BBL-3DP-V4NORMAL
-
0.4mm nozzle
-
0.1mm nozzle
+
BBL-3DP-V4NORMAL
+
0.4mm nozzle
+
0.1mm nozzle
-
BBL-3DP-V4NORMAL
-
0.4mm nozzle
-
0.2mm nozzle
-
0.1mm nozzle
+
BBL-3DP-V4NORMAL
+
0.4mm nozzle
+
0.2mm nozzle
+
0.1mm nozzle
diff --git a/resources/web/guide/22/index.html b/resources/web/guide/22/index.html index 08d4df86a97..f2dac89463a 100644 --- a/resources/web/guide/22/index.html +++ b/resources/web/guide/22/index.html @@ -6,6 +6,7 @@ 引导_P21 + diff --git a/resources/web/guide/23/index.html b/resources/web/guide/23/index.html index fcafcff7b15..fb66fe37236 100644 --- a/resources/web/guide/23/index.html +++ b/resources/web/guide/23/index.html @@ -6,6 +6,7 @@ 引导_P21 + diff --git a/resources/web/guide/24/24.js b/resources/web/guide/24/24.js index c1b7d339158..b6b38e15995 100644 --- a/resources/web/guide/24/24.js +++ b/resources/web/guide/24/24.js @@ -89,7 +89,7 @@ function HandleModelList( pVal ) for(let m=0;m'+nNozzel+'mm nozzle'; + HtmlNozzel+='
'+nNozzel+'mm nozzle
'; } let CoverImage="../../image/printer/"+OneModel['model']+"_cover.png"; diff --git a/resources/web/guide/24/index.html b/resources/web/guide/24/index.html index 6f77f8e09b9..eab77638532 100644 --- a/resources/web/guide/24/index.html +++ b/resources/web/guide/24/index.html @@ -6,6 +6,7 @@ 引导_P21 + diff --git a/resources/web/guide/3/3.css b/resources/web/guide/3/3.css index 7879352d623..97ff41ca191 100644 --- a/resources/web/guide/3/3.css +++ b/resources/web/guide/3/3.css @@ -1,7 +1,10 @@ +.PolicyArea +{ + background-color: #EBEBEB; +} #PolicyTxt { - background-color: #EBEBEB; padding: 12px; word-wrap:break-word; overflow-y: scroll; diff --git a/resources/web/guide/3/index.html b/resources/web/guide/3/index.html index 62ae67cafc3..744a60a869e 100644 --- a/resources/web/guide/3/index.html +++ b/resources/web/guide/3/index.html @@ -6,6 +6,7 @@ 引导_P1 + @@ -18,7 +19,7 @@
We kindly request your help to improve
everyone's printing
-
+
diff --git a/resources/web/guide/5/index.html b/resources/web/guide/5/index.html index 2482174d206..13ee66a0169 100644 --- a/resources/web/guide/5/index.html +++ b/resources/web/guide/5/index.html @@ -5,6 +5,7 @@ 引导_P1 + @@ -20,7 +21,7 @@
diff --git a/resources/web/guide/css/common.css b/resources/web/guide/css/common.css index fff5dd71384..002ae1416a7 100644 --- a/resources/web/guide/css/common.css +++ b/resources/web/guide/css/common.css @@ -163,3 +163,11 @@ body cursor: pointer; } + + +/*----------------Light Mode-------------------*/ + + + + + diff --git a/resources/web/guide/css/dark.css b/resources/web/guide/css/dark.css new file mode 100644 index 00000000000..a53710f2329 --- /dev/null +++ b/resources/web/guide/css/dark.css @@ -0,0 +1,49 @@ +* +{ + color: #fff; +} + +body +{ + background-color:#54545A; + color: #fff; +} + + +/*-----Button-----*/ +.GrayBtn +{ + border: 1px solid #B9B9BC; + color: #B9B9BC; +} + +.GrayBtn:hover +{ + background-color:#E8E8E8; + color: #565656; +} + +/*-------Text------*/ + +.TextS1 +{ + +} + +.TextS2 +{ + color:#B9B9BC; +} + +/*---Policy---*/ +.TextArea1 +{ + background-color: #4A4A51; + color: #BEBEC0; +} + +/*----Region---*/ +.RegionItem:hover +{ + background-color:#4C4C55; +} \ No newline at end of file diff --git a/resources/web/guide/js/globalapi.js b/resources/web/guide/js/globalapi.js index 392d152c003..2463dbe5376 100644 --- a/resources/web/guide/js/globalapi.js +++ b/resources/web/guide/js/globalapi.js @@ -277,3 +277,63 @@ function SendWXMessage( strMsg ) } } +/*------CSS Link Control----*/ +function RemoveCssLink( LinkPath ) +{ + let pNow=$("head link[href='"+LinkPath+"']"); + + let nTotal=pNow.length; + for( let n=0;n0) + RemoveCssLink(DarkCssPath); + } + else + { + if(nNow==0) + AddCssLink(DarkCssPath); + } +} + +SwitchDarkMode( "../css/dark.css" ); \ No newline at end of file diff --git a/resources/web/homepage/css/dark.css b/resources/web/homepage/css/dark.css new file mode 100644 index 00000000000..ba7267e517c --- /dev/null +++ b/resources/web/homepage/css/dark.css @@ -0,0 +1,50 @@ +body +{ + background-color:black; +} + +* +{ + border-color: #494949; +} + + +.TextS1 +{ + color:#fff; +} + + + + +/*----Left Menu Button----*/ +#LogoutBtn:hover +{ + background: #243E30; + color: #fff; +} + + +.BtnItem:hover +{ + color: #000; + background-color: #243E30; +} + +.BtnItemSelected +{ + background-color: #243E30; +} + +/*-----Right Top MenuBtn-----*/ +.MenuItem:hover +{ + border-color: #4CAA50; + background-color: #243E30; +} + +/*----User Manual------*/ +.UG_DESC +{ + color:#A4A4A4; +} \ No newline at end of file diff --git a/resources/web/homepage/css/home.css b/resources/web/homepage/css/home.css index a1c8b53bc28..5cbb290aa91 100644 --- a/resources/web/homepage/css/home.css +++ b/resources/web/homepage/css/home.css @@ -4,6 +4,7 @@ border: 0px; margin: 0px; font-family: "system-ui", "Segoe UI", Roboto, Oxygen, Ubuntu, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-sans; + border-color: #D7D7D7; } html, body { @@ -48,7 +49,8 @@ body #LeftBoard { - border-right: 1px solid #EFF0F0; + border-right-width: 1px; + border-right-style: solid; width:262px; height: 100%; } @@ -228,7 +230,8 @@ body .MenuItem { - border: 1px solid #EEEEEE; + border-width: 1px; + border-style: solid; border-radius: 12px; height: 101px; width: 253px; @@ -288,7 +291,8 @@ body display:flex; align-items: center; padding: 6px; - border-bottom: 1px solid #D9D9D9; + border-bottom-width: 1px; + border-bottom-style: solid; } #RecentClearAllBtn diff --git a/resources/web/homepage/css/light.css b/resources/web/homepage/css/light.css new file mode 100644 index 00000000000..e69de29bb2d diff --git a/resources/web/homepage/index.html b/resources/web/homepage/index.html index f2e96534419..0f282f76138 100644 --- a/resources/web/homepage/index.html +++ b/resources/web/homepage/index.html @@ -3,28 +3,29 @@ - + homepage + - +
-
login/register
+
login/register
-
+
log out
@@ -37,11 +38,11 @@
-
recent
+
recent
-
UserGuide
+
UserGuide
@@ -53,21 +54,21 @@ @@ -77,76 +78,76 @@
-
recent open
+
recent open
Clear all
+
-->
@@ -170,44 +171,44 @@
-
Quick Start
+
Quick Start
This article introduces the most basic usage of Bambu Studio. It guides users to configure software, create projects, and complete the first printing task step by step.
-
Project Based Workflow
+
Project Based Workflow
Bambu Studio has put forward a leading workflow to truly achieve an “all in one” project. Based on the mainstream 3MF project format, it provides a series of revolutionary new features, such as Multi-Plate Support, a Project Resource Manager, and Assembly/Part View. It greatly improves the efficiency of both creators and regular users.
-
High Speed Print at Quality
+
High Speed Print at Quality
It is challenging to print at high speed while maintaining high quality. Bambu Studio makes this happen. "Arch Move" makes the toolhead move smoothly and reduces the machine's vibration. The smart cooling is based on fine-tuned cooling parameters for each filament type. "Auto slow down" for overhang walls works to prevent deformation at high speeds.
-
Multi-Color Printing
+
Multi-Color Printing
Bambu Studio provides versatile colorizing tools to make a colorful model. You can freely add/remove filaments in a project and colorize your model with different brushes. Before printing, each filament will be auto-mapped to an AMS slot, not needing to manually change the spool placement in the AMS.
-
Setting Guide of Slicing Parameters
+
Setting Guide of Slicing Parameters
The parameter management features in Bambu Studio provide very flexible and powerful control over the slicing process. This article introduces the organization of parameters and provides some skills on taking full advantage of these capabilities.
-
Remote Control & Monitoring
+
Remote Control & Monitoring
Bambu Studio support sending print job to your printer over WAN/LAN network, controlling & monitoring every aspect of your 3D printer and printing jobs. If you have more than one printer, you can easily switch between them in the device list.
-
STEP Format
+
STEP Format
Compared with STL, STEP brings more effective information. Thanks to the high accuracy of STEP, a lot of extrusion paths can be generated as arcs. STEP also includes the assembly relationship of each part of a model, which can be used to restore the assembly view after a model is split.
-
3D Text
+
3D Text
With 3D Text tool, users can easily create various 3D text shapes in the project, making the model more personalized. Bambu Studio provides dozens of fonts and supports bold and italic styles to give text greater flexibility.
diff --git a/resources/web/homepage/js/globalapi.js b/resources/web/homepage/js/globalapi.js index 3d560150186..ab7d5e6a20a 100644 --- a/resources/web/homepage/js/globalapi.js +++ b/resources/web/homepage/js/globalapi.js @@ -278,3 +278,63 @@ function SendWXMessage( strMsg ) } +/*------CSS Link Control----*/ +function RemoveCssLink( LinkPath ) +{ + let pNow=$("head link[href='"+LinkPath+"']"); + + let nTotal=pNow.length; + for( let n=0;n0) + RemoveCssLink(DarkCssPath); + } + else + { + if(nNow==0) + AddCssLink(DarkCssPath); + } +} + +SwitchDarkMode("css/dark.css"); \ No newline at end of file diff --git a/resources/web/homepage/js/home.js b/resources/web/homepage/js/home.js index 2472625c739..b62cf3adbb5 100644 --- a/resources/web/homepage/js/home.js +++ b/resources/web/homepage/js/home.js @@ -117,7 +117,7 @@ function HandleStudio( pVal ) { $("#NoPluginTip").hide(); } - } + } } function GotoMenu( strMenu ) @@ -188,7 +188,7 @@ function ShowRecentFileList( pList ) let TmpHtml='
'+ ''+ '
No Image
'+ - ''+sName+''+ + ''+sName+''+ '
'+sTime+'
'+ '
';