You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by zs...@apache.org on 2017/08/01 02:29:55 UTC

[46/50] [abbrv] incubator-weex git commit: *[doc] add color-name file color block

*[doc] add color-name file color block


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/fbf39cd2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/fbf39cd2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/fbf39cd2

Branch: refs/heads/master
Commit: fbf39cd2f61d8b78a285244ab69e5996ac187042
Parents: b16f36f
Author: tancy <ro...@gmail.com>
Authored: Wed Jul 19 17:15:49 2017 +0800
Committer: misakuo <mi...@apache.org>
Committed: Fri Jul 21 15:33:06 2017 +0800

----------------------------------------------------------------------
 doc/themes/weex/source/js/common.js | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/fbf39cd2/doc/themes/weex/source/js/common.js
----------------------------------------------------------------------
diff --git a/doc/themes/weex/source/js/common.js b/doc/themes/weex/source/js/common.js
index 3e92ba4..c3f6631 100644
--- a/doc/themes/weex/source/js/common.js
+++ b/doc/themes/weex/source/js/common.js
@@ -105,6 +105,28 @@
 
   initPickLang()
 
+ /**
+   * color name
+   */
+
+  function colorname(){
+    if(location.pathname.indexOf('references/color-names.html')>0){
+      var t = document.querySelectorAll("table");
+      Array.prototype.forEach.call(t, function (table) {
+          var d = table.getElementsByTagName("tbody")[0].getElementsByTagName("tr");
+          Array.prototype.forEach.call(d, function (tr) {
+            var r = tr.getElementsByTagName("td")[1];
+            r.innerHTML ='<span style="background:'+ r.innerHTML +';color:'+ r.innerHTML +'"> yy </span>  ' + r.innerHTML
+          });
+
+      });
+    }
+  }
+
+  colorname();
+
+
+
   /**
    *  Search
    */