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:52 UTC

[43/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/8a5e0ee7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/8a5e0ee7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/8a5e0ee7

Branch: refs/heads/master
Commit: 8a5e0ee7819e2c085b17fafc9b2ff6b86a3b4b46
Parents: bf87411
Author: tancy <ro...@gmail.com>
Authored: Wed Jul 19 17:15:49 2017 +0800
Committer: tancy <ro...@gmail.com>
Committed: Wed Jul 19 17:15:49 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/8a5e0ee7/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
    */