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

85 lines
2.8 KiB

  1. <html>
  2. <head>
  3. <title>Examples of all HTTP exchanges with this app</title>
  4. <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
  5. <style type="text/css">
  6. a{
  7. color: white;
  8. text-decoration: inherit;
  9. font-variant: small-caps;
  10. font-family: sans-serif;
  11. }
  12. .container{
  13. width: 500px;
  14. padding: 10px;
  15. font-family: sans-serif;
  16. }
  17. .item{ margin: 10px; font-family: sans-serif;}
  18. .subItem{ margin: 5px; font-family: sans-serif;}
  19. .container li > a > span {
  20. float: right;
  21. font-size: 19px;
  22. font-weight: bolder;
  23. font-family: sans-serif;
  24. }
  25. .container li > a > span {
  26. width: 20px;
  27. height: 20px;
  28. text-align: center;
  29. font-family: sans-serif;
  30. }
  31. .container li.open > a > span:after { content: '\25b4'; }
  32. .container li > a > span:after { content: '\25be'; }
  33. .container li { list-style: none; }
  34. .ic{ margin: 5px; }
  35. .itemC{
  36. margin: 5px;
  37. padding: 5px;
  38. padding-top: 9px;
  39. min-height: 22px;
  40. border-radius: 5px;
  41. background-color: #03A2CC;
  42. font-family: sans-serif;
  43. }
  44. </style>
  45. </head>
  46. <body>
  47. <ul class="container">
  48. {{#each files}}
  49. <li class="itemC">
  50. <a class="item" href="{{fsPath}}"><span class="openItem"></span>{{context}}</a>
  51. <ul class="subItem">
  52. {{#each examples}}
  53. <li class="ic">
  54. <a href="{{fsPath}}#{{anchor}}">{{description}}</a>
  55. </li>
  56. {{/each}}
  57. </ul>
  58. </li>
  59. {{/each}}
  60. <!-- @@MORE-INDEX-FILES@@ -->
  61. </ul>
  62. </body>
  63. <script type="text/javascript">
  64. $(document).ready(function () {
  65. var $subitem = $(".subitem");
  66. $subitem.hide();
  67. $('.itemC').removeClass('open');
  68. $('.openItem').on("click", function (e) {
  69. e.preventDefault();
  70. isOpened = $($(this).parent().parent()).hasClass('open');
  71. $('.itemC').removeClass('open');
  72. $subitem.hide();
  73. if(!isOpened){
  74. $('.subitem', $(this).parent().parent()).show();
  75. $($(this).parent().parent()).addClass('open');
  76. }
  77. });
  78. });
  79. </script>
  80. </html>