trans 0.5.2 → 0.5.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tocmd/translator_trans.rb +16 -5
  3. data/lib/tocmd/version.rb +1 -1
  4. data/template/README.md +16 -0
  5. data/template/demo.html +344 -0
  6. data/{vendor → template}/meta.js +0 -0
  7. data/{vendor → template}/toc/css/component.css +4 -1
  8. data/template/toc/css/demo.css +330 -0
  9. data/{vendor → template}/toc/css/glyphicons-halflings-white.png +0 -0
  10. data/{vendor → template}/toc/css/glyphicons-halflings.png +0 -0
  11. data/{vendor → template}/toc/css/icons.css +0 -0
  12. data/template/toc/css/normalize.css +1 -0
  13. data/{vendor → template}/toc/css/zTreeStyle/img/diy/1_close.png +0 -0
  14. data/{vendor → template}/toc/css/zTreeStyle/img/diy/1_open.png +0 -0
  15. data/{vendor → template}/toc/css/zTreeStyle/img/diy/2.png +0 -0
  16. data/{vendor → template}/toc/css/zTreeStyle/img/diy/3.png +0 -0
  17. data/{vendor → template}/toc/css/zTreeStyle/img/diy/4.png +0 -0
  18. data/{vendor → template}/toc/css/zTreeStyle/img/diy/5.png +0 -0
  19. data/{vendor → template}/toc/css/zTreeStyle/img/diy/6.png +0 -0
  20. data/{vendor → template}/toc/css/zTreeStyle/img/diy/7.png +0 -0
  21. data/{vendor → template}/toc/css/zTreeStyle/img/diy/8.png +0 -0
  22. data/{vendor → template}/toc/css/zTreeStyle/img/diy/9.png +0 -0
  23. data/{vendor → template}/toc/css/zTreeStyle/img/line_conn.gif +0 -0
  24. data/{vendor → template}/toc/css/zTreeStyle/img/loading.gif +0 -0
  25. data/{vendor → template}/toc/css/zTreeStyle/img/zTreeStandard.gif +0 -0
  26. data/{vendor → template}/toc/css/zTreeStyle/img/zTreeStandard.png +0 -0
  27. data/{vendor → template}/toc/css/zTreeStyle/zTreeStyle.css +0 -0
  28. data/{vendor → template}/toc/fonts/codropsicons/codropsicons.eot +0 -0
  29. data/{vendor → template}/toc/fonts/codropsicons/codropsicons.svg +0 -0
  30. data/{vendor → template}/toc/fonts/codropsicons/codropsicons.ttf +0 -0
  31. data/{vendor → template}/toc/fonts/codropsicons/codropsicons.woff +0 -0
  32. data/{vendor → template}/toc/fonts/codropsicons/license.txt +0 -0
  33. data/vendor/toc/fonts/linecons/Read Me.txt b/data/template/toc/fonts/linecons/Read → Me.txt +0 -0
  34. data/{vendor → template}/toc/fonts/linecons/license.txt +0 -0
  35. data/{vendor → template}/toc/fonts/linecons/linecons.dev.svg +0 -0
  36. data/{vendor → template}/toc/fonts/linecons/linecons.eot +0 -0
  37. data/{vendor → template}/toc/fonts/linecons/linecons.svg +0 -0
  38. data/{vendor → template}/toc/fonts/linecons/linecons.ttf +0 -0
  39. data/{vendor → template}/toc/fonts/linecons/linecons.woff +0 -0
  40. data/{vendor → template}/toc/fonts/linecons/lte-ie7.js +0 -0
  41. data/{vendor → template}/toc/img/glyphicons-halflings-white.png +0 -0
  42. data/{vendor → template}/toc/img/glyphicons-halflings.png +0 -0
  43. data/{vendor → template}/toc/img/icon-cog-shadow.png +0 -0
  44. data/{vendor → template}/toc/img/icon-cog-small.png +0 -0
  45. data/{vendor → template}/toc/img/icon-cog.png +0 -0
  46. data/{vendor → template}/toc/img/pattern-2.png +0 -0
  47. data/{vendor → template}/toc/js/classie.js +0 -0
  48. data/{vendor → template}/toc/js/jquery-1.4.4.min.js +0 -0
  49. data/{vendor → template}/toc/js/jquery.js +0 -0
  50. data/template/toc/js/jquery.transtool.js +159 -0
  51. data/{vendor → template}/toc/js/jquery.ztree.all-3.5.min.js +0 -0
  52. data/{vendor → template}/toc/js/mlpushmenu.js +0 -0
  53. data/{vendor → template}/toc/js/modernizr.custom.js +0 -0
  54. data/{vendor → template}/toc/js/ztree_toc.js +74 -58
  55. data/template/toc/js/ztree_toc.min.js +4 -0
  56. data/vendor/toc/style/Clearness Dark.css b/data/template/toc/style/Clearness → Dark.css +0 -0
  57. data/{vendor → template}/toc/style/Clearness.css +0 -0
  58. data/{vendor → template}/toc/style/GitHub.css +0 -0
  59. data/{vendor → template}/toc/style/GitHub2.css +0 -0
  60. data/{vendor → template}/toc/style/github-bf51422f4bb36427d391e4b75a1daa083c2d840e.css +0 -0
  61. data/{vendor → template}/toc/style/github2-d731afd4f624c99a4b19ad69f3083cd6d02b81d5.css +0 -0
  62. data/{vendor → template}/toc/style/makedownpad.css +0 -0
  63. data/template/toc/toc_conf.js +54 -0
  64. metadata +62 -61
  65. data/vendor/template.html +0 -0
  66. data/vendor/toc/css/bootstrap.icons.css +0 -487
  67. data/vendor/toc/css/demo.css +0 -33
  68. data/vendor/toc/css/normalize.css +0 -1
  69. data/vendor/toc/js/ztree_toc.min.js +0 -4
  70. data/vendor/toc/toc_conf.js +0 -20
@@ -1,33 +0,0 @@
1
- html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
2
- margin: 0;padding: 0;border: 0;outline: 0;font-weight: inherit;font-style: inherit;font-size: 100%;font-family: inherit;vertical-align: baseline;}
3
- body {color: #2f332a;font: 15px/21px Arial, Helvetica, simsun, sans-serif;background: #f0f6e4 \9;}
4
- h1, h2, h3, h4, h5, h6 {color: #2f332a;font-weight: bold;font-family: Helvetica, Arial, sans-serif;padding-bottom: 5px;}
5
- h1 {font-size: 24px;line-height: 34px;text-align: center;}
6
- h2 {font-size: 14px;line-height: 24px;padding-top: 5px;}
7
- h6 {font-weight: normal;font-size: 12px;letter-spacing: 1px;line-height: 24px;text-align: center;}
8
- a {color:#3C6E31;text-decoration: underline;}
9
- a:hover {background-color:#3C6E31;color:white;}
10
- input.radio {margin: 0 2px 0 8px;}
11
- input.radio.first {margin-left:0;}
12
- input.empty {color: lightgray;}
13
- code {color: #2f332a;}
14
- .highlight_red {color:#A60000;}
15
- .highlight_green {color:#A7F43D;}
16
- li {list-style: circle;font-size: 12px;}
17
- li.title {list-style: none;}
18
- ul.list {margin-left: 17px;}
19
-
20
- div.content_wrap {width: 600px;height:380px;}
21
- div.content_wrap div.left{float: left;width: 250px;}
22
- div.content_wrap div.right{float: right;width: 340px;}
23
- div.zTreeDemoBackground {width:250px;height:362px;text-align:left;}
24
-
25
- ul.ztree {margin-top: 10px;border: 1px solid #617775;background: #f0f6e4;width:220px;height:360px;overflow-y:scroll;overflow-x:auto;}
26
- ul.log {border: 1px solid #617775;background: #f0f6e4;width:300px;height:170px;overflow: hidden;}
27
- ul.log.small {height:45px;}
28
- ul.log li {color: #666666;list-style: none;padding-left: 10px;}
29
- ul.log li.dark {background-color: #E3E3E3;}
30
-
31
- /* ruler */
32
- div.ruler {height:20px; width:220px; background-color:#f0f6e4;border: 1px solid #333; margin-bottom: 5px; cursor: pointer}
33
- div.ruler div.cursor {height:20px; width:30px; background-color:#3C6E31; color:white; text-align: right; padding-right: 5px; cursor: pointer}
@@ -1 +0,0 @@
1
- article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block;}audio,canvas,video{display:inline-block;}audio:not([controls]){display:none;height:0;}[hidden]{display:none;}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;}body{margin:0;}a:focus{outline:thin dotted;}a:active,a:hover{outline:0;}h1{font-size:2em;margin:0.67em 0;}abbr[title]{border-bottom:1px dotted;}b,strong{font-weight:bold;}dfn{font-style:italic;}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0;}mark{background:#ff0;color:#000;}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em;}pre{white-space:pre-wrap;}q{quotes:"\201C" "\201D" "\2018" "\2019";}small{font-size:80%;}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}sup{top:-0.5em;}sub{bottom:-0.25em;}img{border:0;}svg:not(:root){overflow:hidden;}figure{margin:0;}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em;}legend{border:0;padding:0;}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0;}button,input{line-height:normal;}button,select{text-transform:none;}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer;}button[disabled],html input[disabled]{cursor:default;}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0;}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0;}
@@ -1,4 +0,0 @@
1
- /*! ztree_toc - v0.2.2 - 2014-02-08
2
- * https://github.com/i5ting/jQuery.zTree_Toc.js
3
- * Copyright (c) 2014 alfred.sang; Licensed MIT */
4
- function encode_id_with_array(a,b){for(var c=0,d=0;d<b.length;d++)c+=factor(a,b.length-d,b[d]);return c}function get_parent_id_with_array(a,b){for(var c=[],d=0;d<b.length;d++)c.push(b[d]);c.pop();for(var e=0,d=0;d<c.length;d++)e+=factor(a,c.length-d,c[d]);return e}function factor(opts,count,current){if(1==count)return current;for(var str="",i=count-1;i>0;i--)str+=current*opts.step+"*";return eval(str+"1")}!function(a){function b(b){a(b.documment_selector).find(":header").each(function(){var c=parseInt(this.nodeName.substring(1),10);d(b,this,c),e(b,a(this))})}function c(b){var c=a(b._zTree);c=a.fn.zTree.init(c,b.ztreeSetting,b._header_nodes).expandAll(b.is_expand_all),a(b._zTree).css(b.ztreeStyle)}function d(b,c,d){if(b._headers.length==d)b._headers[d-1]++;else if(b._headers.length>d)b._headers=b._headers.slice(0,d),b._headers[d-1]++;else if(b._headers.length<d)for(var e=0;e<d-b._headers.length;e++)b._headers.push(1);1==b.is_auto_number&&(-1!=a(c).text().indexOf(b._headers.join("."))||a(c).text(b._headers.join(".")+". "+a(c).text()))}function e(b,c){var d=encode_id_with_array(b,b._headers),e=get_parent_id_with_array(b,b._headers);a(c).attr("id",d),h(a(c).text()),b._header_offsets.push(a(c).offset().top-b.highlight_offset),h("h offset ="+(a(c).offset().top-b.highlight_offset)),b._header_nodes.push({id:d,pId:e,name:a(c).text()||"null",open:!0,url:"#"+d,target:"_self"})}function f(b){var c,d=function(){c&&clearTimeout(c),c=setTimeout(function(){var c=a(window).scrollTop();b.debug&&console.log("top="+c);for(var d=0,e=b._header_offsets.length;e>d;d++)if(b._header_offsets[d]>=c+5){console.log("opts._header_offsets["+d+"] = "+b._header_offsets[d]),a("a").removeClass("curSelectedNode"),a("#tree_"+(d+1)+"_a").addClass("curSelectedNode");break}},b.refresh_scroll_time)};b.highlight_on_scroll&&(a(window).bind("scroll",d),d())}function g(b){b.highlight_offset=a(b.documment_selector).offset().top}function h(a){}a.fn.ztree_toc=function(d){var e=a.extend({},a.fn.ztree_toc.defaults,d);return this.each(function(){e._zTree=a(this),g(e),b(e),c(e),f(e)})},a.fn.ztree_toc.defaults={_zTree:null,_headers:[],_header_offsets:[],_header_nodes:[{id:1,pId:0,name:"Table of Content",open:!0}],debug:!0,highlight_offset:0,highlight_on_scroll:!0,refresh_scroll_time:50,documment_selector:"body",is_posion_top:!1,is_auto_number:!1,is_expand_all:!0,is_highlight_selected_line:!0,step:100,ztreeStyle:{width:"260px",overflow:"auto",position:"fixed","z-index":2147483647,border:"0px none",left:"0px",bottom:"0px"},ztreeSetting:{view:{dblClickExpand:!1,showLine:!0,showIcon:!1,selectedMulti:!1},data:{simpleData:{enable:!0,idKey:"id",pIdKey:"pId"}},callback:{beforeClick:function(b,c){a("a").removeClass("curSelectedNode"),1==c.id&&console.log("click root table of content"),1==a.fn.ztree_toc.defaults.is_highlight_selected_line&&a("#"+c.id).css("color","red").fadeOut("slow",function(){a(this).show().css("color","black")})},onRightClick:function(a,b,c){1==c.id&&console.log("right_click root table of content")}}}}}(jQuery);
@@ -1,20 +0,0 @@
1
- var jquery_ztree_toc_opts = {
2
- debug:false,
3
- is_auto_number:true,
4
- documment_selector:'.markdown-body',
5
- ztreeStyle: {
6
- width:'326px',
7
- overflow: 'auto',
8
- position: 'fixed',
9
- 'z-index': 2147483647,
10
- border: '0px none',
11
- left: '0px',
12
- top: '0px',
13
- // 'overflow-x': 'hidden',
14
- 'height': $(window).height() + 'px'
15
- }
16
- }
17
- var markdown_panel_style = {
18
- 'width':'70%',
19
- 'margin-left':'25%'
20
- };