You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by wa...@apache.org on 2021/08/31 02:17:19 UTC
[echarts-www] branch master updated: add noscript tips for enabling
javascript. apache/echarts#15621
This is an automated email from the ASF dual-hosted git repository.
wangzx pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/echarts-www.git
The following commit(s) were added to refs/heads/master by this push:
new b81d3f8 add noscript tips for enabling javascript. apache/echarts#15621
b81d3f8 is described below
commit b81d3f87b8b912b4781c59a423584d40085813ca
Author: plainheart <yh...@all-my-life.cn>
AuthorDate: Tue Aug 31 10:13:44 2021 +0800
add noscript tips for enabling javascript. apache/echarts#15621
---
_jade/layouts/basic.jade | 6 ++++++
_scss/main.scss | 17 +++++++++++++++++
bin/build.js | 2 +-
3 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/_jade/layouts/basic.jade b/_jade/layouts/basic.jade
index 5b3d14a..9a0b7b1 100644
--- a/_jade/layouts/basic.jade
+++ b/_jade/layouts/basic.jade
@@ -52,6 +52,12 @@ html(lang='#{htmlAttrLang}')
<!--[if (gt IE 8)|!(IE)]>
body(class="#{pageTitle}")
<![endif]-->
+ noscript
+ div.no-script
+ if ecWWWLang == 'en'
+ strong We're sorry, but Apache ECharts website doesn't work properly without JavaScript enabled. Please enable it to continue.
+ else
+ strong 很抱歉,Apache ECharts 网站需要启用 JavaScript 才能正常运行。
#apache-banner
.txt
if ecWWWLang == 'en'
diff --git a/_scss/main.scss b/_scss/main.scss
index a2e4548..ae28ef6 100644
--- a/_scss/main.scss
+++ b/_scss/main.scss
@@ -116,6 +116,18 @@ body {
@import 'pages.spa';
+.no-script {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ padding: 30px 40px;
+ z-index: 10001;
+ background-color: rgba(0, 0, 0, 0.6);
+ color: #fff;
+ text-align: center;
+}
+
#apache-banner {
position: fixed;
left: 0;
@@ -172,6 +184,11 @@ body {
}
@media (max-width: 768px) {
+ .no-script {
+ text-align: left;
+ padding: 20px;
+ }
+
#apache-banner {
padding: 15px;
diff --git a/bin/build.js b/bin/build.js
index a9a3953..07f4eb3 100644
--- a/bin/build.js
+++ b/bin/build.js
@@ -163,7 +163,7 @@ async function buildSASS(config) {
}
async function getFolderHash(globPattern) {
- const files = await globby(globPattern);
+ const files = await globby(globPattern.replace(/\\/g, '/'));
if (!files.length) {
throw new Error('No file exists for pattern ' + globPattern);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org