You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

dir_preview.tmpl 7.0 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. {{if .Dirs}}
  2. <style>
  3. /* ul{
  4. display: flex;;
  5. position: absolute;
  6. list-style: none;
  7. transform: translate(-50%,-50%);
  8. }
  9. li{
  10. position: relative;
  11. padding: 20px;
  12. color: #000;
  13. line-height: 1;
  14. transition: 0.2s all linear;
  15. cursor: pointer;
  16. }
  17. li::before{
  18. content: "";
  19. position: absolute;
  20. } */
  21. ul,li{
  22. list-style: none;
  23. }
  24. div#nav{
  25. border: 1px solid #ccc;
  26. }
  27. div#nav ul{
  28. border-bottom: 1px solid #ccc;
  29. }
  30. div#nav li{
  31. position: relative;
  32. display: inline-block;
  33. line-height: 3em;
  34. text-align: center;
  35. width: 50%;
  36. cursor: pointer;
  37. transition: 0.2s all linear;
  38. }
  39. div.hide{
  40. display: none;
  41. }
  42. div#nav li.active{
  43. color: rgba(0,0,0,.85);
  44. font-weight: 700;
  45. opacity: 1;
  46. border-bottom: 2px solid rgba(0,0,0,.85);
  47. transition: 0.2s all linear;
  48. }
  49. /* div#nav li::before{
  50. content: "";
  51. position: absolute;
  52. top: 0;
  53. left: 100%;
  54. width: 0;
  55. height: 100%;
  56. border-bottom: 2px solid #f000;
  57. transition: 0.2s all linear;
  58. }
  59. .active ~ li::before{
  60. left: 0;
  61. }
  62. .active::before{
  63. width: 100%;
  64. left: 0;
  65. top: 0;
  66. }
  67. .hover::before{
  68. width: 50%;
  69. } */
  70. </style>
  71. <div id="uuid_div" style="display: none">
  72. <input type="" value="{{$.Uuid}}" id="hide_uuidid" style="display:none;">
  73. </div>
  74. <div id="myCanvas_div" style="width:100%;height:100% ; position: relative;">
  75. <!-- <div style="display:inline-block; width:6%;height: 100%; position: relative; vertical-align: middle;">
  76. <img src="/img/left_new_new.png" onclick="clickLast()" style="margin-left: 15px" />
  77. </div> -->
  78. <div style="display:inline-block; width:71%; height: 100%; position: relative;border: 1px solid #ccc;border-radius: 6px;">
  79. <!-- <div style="text-align:center">
  80. <a>
  81. 文件名:
  82. <span id="filename"></span>
  83. </a>
  84. </div> -->
  85. <div id="win_canvas" style="width:100%;height:42em">
  86. <canvas id="myCanvas" style="display:none;">
  87. </canvas>
  88. <code id="textcontent" style="display:none;overflow: auto;">这是一个测试。</code>
  89. <div style="padding:0.2em 0;position: absolute;border-top: 1px solid #ccc;width: 100%;bottom:0;font-size: 1em;padding: 0.5em 1em;">
  90. <div id="breadFile" class="ui small breadcrumb">
  91. <!-- <div class="section">Home</div>
  92. <div class="divider"> / </div>
  93. <div class="active section">Search</div> -->
  94. </div>
  95. </div>
  96. </div>
  97. <div style="font-size: 1.5rem; opacity: 0.7; position: absolute;left: 0.5rem;top: 20rem;cursor: pointer;" onclick="clickLast()"><i class="chevron circle left icon" ></i></div>
  98. <div style="font-size: 1.5rem; opacity: 0.7; position: absolute;right: 0.5rem;top: 20rem;cursor: pointer;" onclick="clickNext()"><i class="chevron circle right icon" ></i></div>
  99. </div>
  100. <!-- <div style="display:inline-block; width:6%;height: 100%; position: relative; vertical-align: middle;">
  101. <img src="/img/right_new_new.png" onclick="clickNext()" style="margin-left: 15px"/>
  102. </div> -->
  103. <div id="nav" style="display:inline-block; width:25%;height: 100%; position: relative;vertical-align: top; background: #ffffff;margin-left: 20px;border-radius: 6px;">
  104. <ul style="display: flex;padding: 0;margin: 0;">
  105. <li id="0" class="active">文件列表</li>
  106. <li id="1">标签列表</li>
  107. </ul>
  108. <div class="tabpannel">
  109. <!-- <h4 class="ui top attached header">
  110. 文件列表
  111. </h4> -->
  112. <!-- <table class="ui single line table" id="filelist" style="table-layout:fixed;word-break: break-all;word-wrap: break-word;">
  113. </table> -->
  114. <div class="ui list" id="filelist"></div>
  115. <div class="panel-body" id="filepanel" style='position: absolute;bottom: 0;padding: 0.9em 0;width: 100%;border-top: 1px #ccc solid;'>
  116. <div style="width: 90%; margin: 0 auto;">
  117. <a id="prePage" href="" style="margin-right: 0.2em;color: #000;"><i class="angle left icon"></i></a>
  118. <span id="startIndex">0</span>-<span id="endIndex">0</span>/<span id="totalNum">0</span>
  119. <span style="margin-left: 0.2em;">第</span><span id="displayPage1">1</span><span style="margin-right: 0.2em;">页</span>
  120. <span>跳到</span><input type="text" id="goNum" style="width: 2em;border-radius: 4px;padding: 0 0.4em;margin: 0 0.4em;height: 1.2em;border: 1px solid;" maxlength="5" oninput="value=value.replace(/[^\d]/g,'')"><span>页</span>
  121. <a style="margin-left: 0.4em;color: #000;" id="nextPage" href=""><i class="angle right icon"></i></a>
  122. <!-- 第<span id="startIndex">0</span>至<span id="endIndex">0</span>条,&nbsp;共<span id="totalNum">0</span>条.&nbsp;&nbsp;
  123. <span >
  124. <span >
  125. &nbsp;当前页:<span id="displayPage1">1</span>&nbsp;
  126. </span>
  127. <a id="nextPage" href="">下一页</a>
  128. <span>
  129. &nbsp;共<span id="totalPageNum"></span>页&nbsp;
  130. </span>
  131. </span>
  132. <span>&nbsp;跳转至:<input type="text" id="goNum" style="width: 50px;border-radius: 6px" maxlength="5" oninput="value=value.replace(/[^\d]/g,'')"><a id="goHref" href="javascript:goPage()">&nbsp;GO</a></span> -->
  133. </div>
  134. </div>
  135. </div>
  136. <div class="hide tabpannel">
  137. <div style="margin-top: 1em;" id="labellist">
  138. </div>
  139. </div>
  140. <!-- <div class="ui pointing secondary menu">
  141. <a class="item " data-tab="first">First</a>
  142. <a class="item active" data-tab="second">Second</a>
  143. </div>
  144. <div class="ui bottom attached tab segment active" data-tab="first">
  145. First
  146. </div>
  147. <div class="ui bottom attached tab segment" data-tab="second">
  148. Second
  149. </div>
  150. -->
  151. </div>
  152. </div>
  153. <script>
  154. var ulObj = document.getElementById('nav').getElementsByTagName('ul')[0];
  155. var divObj = document.getElementsByClassName('tabpannel');
  156. var liObj = document.getElementById('nav').getElementsByTagName('li')
  157. ulObj.onclick = function(event){
  158. var ev = window.event || event;
  159. var item = ev.srcElement || ev.target;
  160. var id = item.getAttribute("id")
  161. for (var i=0; i<divObj.length;i++){
  162. if(i == id){
  163. divObj[i].style.display = 'block'
  164. liObj[i].classList.add('active')
  165. }
  166. else{
  167. divObj[i].style.display = 'none'
  168. liObj[i].classList.remove('active')
  169. }
  170. }
  171. }
  172. </script>
  173. <script src="{{StaticUrlPrefix}}/self/dataset_preview.js"></script>
  174. {{end}}