Repository: incubator-weex Updated Branches: refs/heads/dev bf874113e -> 8a5e0ee78
*[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/dev Commit: 8a5e0ee7819e2c085b17fafc9b2ff6b86a3b4b46 Parents: bf87411 Author: tancy <ron...@gmail.com> Authored: Wed Jul 19 17:15:49 2017 +0800 Committer: tancy <ron...@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 */